Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi.c
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
#include <sys/linker.h> | #include <sys/linker.h> | ||||
#include <sys/mount.h> | #include <sys/mount.h> | ||||
#include <sys/power.h> | #include <sys/power.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/sched.h> | #include <sys/sched.h> | ||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/timetc.h> | #include <sys/timetc.h> | ||||
#include <sys/uuid.h> | #include <sys/uuid.h> | ||||
#include <sys/systm.h> | |||||
#if defined(__i386__) || defined(__amd64__) | #if defined(__i386__) || defined(__amd64__) | ||||
#include <machine/clock.h> | #include <machine/clock.h> | ||||
#include <machine/pci_cfgreg.h> | #include <machine/pci_cfgreg.h> | ||||
#endif | #endif | ||||
#include <machine/resource.h> | #include <machine/resource.h> | ||||
#include <machine/bus.h> | #include <machine/bus.h> | ||||
#include <sys/rman.h> | #include <sys/rman.h> | ||||
▲ Show 20 Lines • Show All 1,332 Lines • ▼ Show 20 Lines | acpi_reserve_resources(device_t dev) | ||||
STAILQ_FOREACH(rle, rl, link) { | STAILQ_FOREACH(rle, rl, link) { | ||||
/* | /* | ||||
* Don't reserve IRQ resources. There are many sticky things | * Don't reserve IRQ resources. There are many sticky things | ||||
* to get right otherwise (e.g. IRQs for psm, atkbd, and HPET | * to get right otherwise (e.g. IRQs for psm, atkbd, and HPET | ||||
* when using legacy routing). | * when using legacy routing). | ||||
*/ | */ | ||||
if (rle->type == SYS_RES_IRQ) | if (rle->type == SYS_RES_IRQ) | ||||
continue; | continue; | ||||
/* | |||||
* Don't reserve SYS_RES_MEMORY. Hyper-V ACPI firmware might try to | |||||
* allocate a massive range blocking other devices from being able | |||||
* to allocate memory later down the road. | |||||
*/ | |||||
if (vm_guest == VM_GUEST_HV && rle->type == SYS_RES_MEMORY) | |||||
continue; | |||||
/* | /* | ||||
* Don't reserve the resource if it is already allocated. | * Don't reserve the resource if it is already allocated. | ||||
* The acpi_ec(4) driver can allocate its resources early | * The acpi_ec(4) driver can allocate its resources early | ||||
* if ECDT is present. | * if ECDT is present. | ||||
*/ | */ | ||||
if (rle->res != NULL) | if (rle->res != NULL) | ||||
continue; | continue; | ||||
▲ Show 20 Lines • Show All 3,225 Lines • Show Last 20 Lines |