Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/xen/efi/pvefi.c
Show All 37 Lines | |||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <xen/xen-os.h> | #include <xen/xen-os.h> | ||||
#include <xen/error.h> | #include <xen/error.h> | ||||
#include <xen/hypervisor.h> | #include <xen/hypervisor.h> | ||||
#include <xen/interface/platform.h> | #include <xen/interface/platform.h> | ||||
extern char bootmethod[16]; | |||||
static int | static int | ||||
rt_ok(void) | rt_ok(void) | ||||
{ | { | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | modevents(module_t m, int event, void *arg __unused) | ||||
const static struct efi_ops *prev; | const static struct efi_ops *prev; | ||||
int rt_disabled; | int rt_disabled; | ||||
switch (event) { | switch (event) { | ||||
case MOD_LOAD: | case MOD_LOAD: | ||||
rt_disabled = 0; | rt_disabled = 0; | ||||
TUNABLE_INT_FETCH("efi.rt.disabled", &rt_disabled); | TUNABLE_INT_FETCH("efi.rt.disabled", &rt_disabled); | ||||
if (!xen_initial_domain() || strcmp("UEFI", bootmethod) != 0 || | if (!xen_initial_domain() || firmware_type != FW_UEFI || | ||||
rt_disabled == 1) | rt_disabled == 1) | ||||
return (0); | return (0); | ||||
prev = active_efi_ops; | prev = active_efi_ops; | ||||
active_efi_ops = &pvefi_ops; | active_efi_ops = &pvefi_ops; | ||||
return (0); | return (0); | ||||
case MOD_UNLOAD: | case MOD_UNLOAD: | ||||
Show All 20 Lines |