class Acpi
Defined at line 29 of file ../../src/devices/board/lib/acpi/acpi.h
Wrapper class used to interface with ACPICA (in the real system),
or a mock ACPI implementation (in tests).
Public Members
static const uint32_t kMaxNamespaceDepth
Public Methods
acpi::status<> WalkNamespace (ACPI_OBJECT_TYPEtype,ACPI_HANDLEstart_object,uint32_tmax_depth,NamespaceCallablecbk)
acpi::status<> WalkResources (ACPI_HANDLEobject,const char *resource_name,ResourcesCallablecbk)
acpi::status<acpi::UniquePtr<ACPI_RESOURCE>> BufferToResource (cpp20::span<uint8_t> buffer)
acpi::status<> GetDevices (const char * hid, DeviceCallable cbk)
acpi::status<acpi::UniquePtr<ACPI_OBJECT>> EvaluateObject (ACPI_HANDLEobject,const char *pathname,std::optional<std::vector<ACPI_OBJECT>>args)
acpi::status<acpi::UniquePtr<ACPI_DEVICE_INFO>> GetObjectInfo (ACPI_HANDLE obj)
Get the ACPI_DEVICE_INFO for the given object.
acpi::status<ACPI_HANDLE> GetParent (ACPI_HANDLE child)
Get the parent of the given child.
acpi::status<ACPI_HANDLE> GetHandle (ACPI_HANDLE parent, const char * pathname)
Get the handle retrieved by resolving the given pathname from |parent|.
acpi::status<std::string> GetPath (ACPI_HANDLE object)
Get the absolute path to the given object.
acpi::status<> InstallNotifyHandler (ACPI_HANDLEobject,uint32_tmode,NotifyHandlerCallablecallable,void *context)
acpi::status<> RemoveNotifyHandler (ACPI_HANDLEobject,uint32_tmode,NotifyHandlerCallablecallable)
acpi::status<uint8_t> CallBbn (ACPI_HANDLE obj)
Defined at line 36 of file ../../src/devices/board/lib/acpi/acpi.cc
acpi::status<uint16_t> CallSeg (ACPI_HANDLE obj)
Defined at line 53 of file ../../src/devices/board/lib/acpi/acpi.cc
acpi::status<uint32_t> AcquireGlobalLock (uint16_t timeout)
Returns a handle which can be passed to ReleaseGlobalLock.
acpi::status<> ReleaseGlobalLock (uint32_t handle)
acpi::status<> InstallAddressSpaceHandler (ACPI_HANDLEobject,ACPI_ADR_SPACE_TYPEspace_id,AddressSpaceHandlerhandler,AddressSpaceSetupsetup,void *context)
acpi::status<> InstallAddressSpaceHandler (ACPI_HANDLEobject,ACPI_ADR_SPACE_TYPEspace_id,AddressSpaceHandlerhandler,AddressSpaceSetupsetup,void *context)
acpi::status<> RemoveAddressSpaceHandler (ACPI_HANDLEobject,ACPI_ADR_SPACE_TYPEspace_id,AddressSpaceHandlerhandler)
acpi::status<> RemoveAddressSpaceHandler (ACPI_HANDLEobject,ACPI_ADR_SPACE_TYPEspace_id,AddressSpaceHandlerhandler)
acpi::status<> InstallGpeHandler (ACPI_HANDLEdevice,uint32_tnumber,uint32_ttype,GpeHandlerhandler,void *context)
acpi::status<> RemoveGpeHandler (ACPI_HANDLEdevice,uint32_tnumber,GpeHandlerhandler)
acpi::status<> EnableGpe (ACPI_HANDLE device, uint32_t number)
acpi::status<> DisableGpe (ACPI_HANDLE device, uint32_t number)
acpi::status<> InitializeAcpi ()
Initialise the ACPI subsystem.
acpi::status<> SetupGpeForWake (ACPI_HANDLEwake_dev,ACPI_HANDLEgpe_dev,uint32_tgpe_num)
Set up the given GPE for wake.
acpi::status<> SetGpeWakeMask (ACPI_HANDLEgpe_dev,uint32_tgpe_num,boolset_wake_dev)
void ~Acpi ()
Defined at line 33 of file ../../src/devices/board/lib/acpi/acpi.h
acpi::status<> SetApicIrqMode ()
Switch interrupts to APIC mode, see ACPI v6.4 section 5.8.1.
Defined at line 68 of file ../../src/devices/board/lib/acpi/acpi.cc
acpi::status<> DiscoverWakeGpes ()
Walk _PRW methods, ensuring that ACPICA is aware of GPEs that can wake the system.
Defined at line 78 of file ../../src/devices/board/lib/acpi/acpi.cc