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_TYPE type, ACPI_HANDLE start_object, uint32_t max_depth, NamespaceCallable cbk)
acpi::status<> WalkResources (ACPI_HANDLE object, const char * resource_name, ResourcesCallable cbk)
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_HANDLE object, 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_HANDLE object, uint32_t mode, NotifyHandlerCallable callable, void * context)
acpi::status<> RemoveNotifyHandler (ACPI_HANDLE object, uint32_t mode, NotifyHandlerCallable callable)
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_HANDLE object, ACPI_ADR_SPACE_TYPE space_id, AddressSpaceHandler handler, AddressSpaceSetup setup, void * context)
acpi::status<> InstallAddressSpaceHandler (ACPI_HANDLE object, ACPI_ADR_SPACE_TYPE space_id, AddressSpaceHandler handler, AddressSpaceSetup setup, void * context)
acpi::status<> RemoveAddressSpaceHandler (ACPI_HANDLE object, ACPI_ADR_SPACE_TYPE space_id, AddressSpaceHandler handler)
acpi::status<> RemoveAddressSpaceHandler (ACPI_HANDLE object, ACPI_ADR_SPACE_TYPE space_id, AddressSpaceHandler handler)
acpi::status<> InstallGpeHandler (ACPI_HANDLE device, uint32_t number, uint32_t type, GpeHandler handler, void * context)
acpi::status<> RemoveGpeHandler (ACPI_HANDLE device, uint32_t number, GpeHandler handler)
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_HANDLE wake_dev, ACPI_HANDLE gpe_dev, uint32_t gpe_num)
Set up the given GPE for wake.
acpi::status<> SetGpeWakeMask (ACPI_HANDLE gpe_dev, uint32_t gpe_num, bool set_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