Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/cpu_machdep.c
Show First 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
#define STATE_MWAIT 0x1 | #define STATE_MWAIT 0x1 | ||||
#define STATE_SLEEPING 0x2 | #define STATE_SLEEPING 0x2 | ||||
#ifdef SMP | #ifdef SMP | ||||
static u_int cpu_reset_proxyid; | static u_int cpu_reset_proxyid; | ||||
static volatile u_int cpu_reset_proxy_active; | static volatile u_int cpu_reset_proxy_active; | ||||
#endif | #endif | ||||
char bootmethod[16]; | static char bootmethod[16]; | ||||
SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, | SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, | ||||
"System firmware boot method"); | "System firmware boot method"); | ||||
enum firmware_types firmware_type = FW_NONE; | |||||
/* | |||||
* Set the sysctl bootmethod for compatibility | |||||
*/ | |||||
static void set_bootmethod(const void *unused __unused) | |||||
{ | |||||
const char *const types[] = { | |||||
[FW_UEFI] = "UEFI", | |||||
[FW_BIOS] = "BIOS", | |||||
}; | |||||
const char *val = "unknown"; | |||||
if (firmware_type < nitems(types) && types[firmware_type] != NULL) | |||||
val = types[firmware_type]; | |||||
strlcpy(bootmethod, val, sizeof(bootmethod)); | |||||
} | |||||
C_SYSINIT(set_bootmethod, SI_SUB_LAST, SI_ORDER_SECOND, set_bootmethod, NULL); | |||||
struct msr_op_arg { | struct msr_op_arg { | ||||
u_int msr; | u_int msr; | ||||
int op; | int op; | ||||
uint64_t arg1; | uint64_t arg1; | ||||
uint64_t *res; | uint64_t *res; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,400 Lines • Show Last 20 Lines |