Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/identcpu.c
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
#include <sys/cpu.h> | #include <sys/cpu.h> | ||||
#include <sys/eventhandler.h> | #include <sys/eventhandler.h> | ||||
#include <sys/limits.h> | #include <sys/limits.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/power.h> | #include <sys/power.h> | ||||
#include <vm/vm.h> | |||||
#include <vm/pmap.h> | |||||
#include <machine/asmacros.h> | #include <machine/asmacros.h> | ||||
#include <machine/clock.h> | #include <machine/clock.h> | ||||
#include <machine/cputypes.h> | #include <machine/cputypes.h> | ||||
#include <machine/frame.h> | #include <machine/frame.h> | ||||
#include <machine/intr_machdep.h> | #include <machine/intr_machdep.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/segments.h> | #include <machine/segments.h> | ||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
▲ Show 20 Lines • Show All 2,463 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static void | static void | ||||
print_hypervisor_info(void) | print_hypervisor_info(void) | ||||
{ | { | ||||
if (*hv_vendor) | if (*hv_vendor) | ||||
printf("Hypervisor: Origin = \"%s\"\n", hv_vendor); | printf("Hypervisor: Origin = \"%s\"\n", hv_vendor); | ||||
} | |||||
/* | |||||
* Returns the maximum physical address that can be used with the | |||||
* current system. | |||||
*/ | |||||
vm_paddr_t | |||||
cpu_getmaxphyaddr(void) | |||||
{ | |||||
#if defined(__i386__) | |||||
if (!pae_mode) | |||||
return (0xffffffff); | |||||
#endif | |||||
return ((1ULL << cpu_maxphyaddr) - 1); | |||||
} | } |