Deleted Added
full compact
identcpu.c (328215) identcpu.c (329462)
1/*-
2 * Copyright (c) 1992 Terrence R. Lambert.
3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
4 * Copyright (c) 1997 KATO Takenori.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz.

--- 25 unchanged lines hidden (view full) ---

34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
39 */
40
41#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1992 Terrence R. Lambert.
3 * Copyright (c) 1982, 1987, 1990 The Regents of the University of California.
4 * Copyright (c) 1997 KATO Takenori.
5 * All rights reserved.
6 *
7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz.

--- 25 unchanged lines hidden (view full) ---

34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * from: Id: machdep.c,v 1.193 1996/06/18 01:22:04 bde Exp
39 */
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: stable/11/sys/x86/x86/identcpu.c 328215 2018-01-21 10:39:57Z kib $");
42__FBSDID("$FreeBSD: stable/11/sys/x86/x86/identcpu.c 329462 2018-02-17 18:00:01Z kib $");
43
44#include "opt_cpu.h"
45
46#include <sys/param.h>
47#include <sys/bus.h>
48#include <sys/cpu.h>
49#include <sys/eventhandler.h>
50#include <sys/limits.h>

--- 1550 unchanged lines hidden (view full) ---

1601 cpu_vendor_id = CPU_VENDOR_IBM;
1602 cpu = CPU_BLUE;
1603 return;
1604 }
1605 }
1606#endif
1607}
1608
43
44#include "opt_cpu.h"
45
46#include <sys/param.h>
47#include <sys/bus.h>
48#include <sys/cpu.h>
49#include <sys/eventhandler.h>
50#include <sys/limits.h>

--- 1550 unchanged lines hidden (view full) ---

1601 cpu_vendor_id = CPU_VENDOR_IBM;
1602 cpu = CPU_BLUE;
1603 return;
1604 }
1605 }
1606#endif
1607}
1608
1609int
1610pti_get_default(void)
1611{
1612
1613 if (strcmp(cpu_vendor, AMD_VENDOR_ID) == 0)
1614 return (0);
1615 if ((cpu_ia32_arch_caps & IA32_ARCH_CAP_RDCL_NO) != 0)
1616 return (0);
1617 return (1);
1618}
1619
1609static u_int
1610find_cpu_vendor_id(void)
1611{
1612 int i;
1613
1614 for (i = 0; i < nitems(cpu_vendors); i++)
1615 if (strcmp(cpu_vendor, cpu_vendors[i].vendor) == 0)
1616 return (cpu_vendors[i].vendor_id);

--- 841 unchanged lines hidden ---
1620static u_int
1621find_cpu_vendor_id(void)
1622{
1623 int i;
1624
1625 for (i = 0; i < nitems(cpu_vendors); i++)
1626 if (strcmp(cpu_vendor, cpu_vendors[i].vendor) == 0)
1627 return (cpu_vendors[i].vendor_id);

--- 841 unchanged lines hidden ---