Skip to content

Commit b5d71ae

Browse files
committed
efi: create libacpi
Description: Refactored ACPICA for partial initialization in the loader. This work is the final preface for Lua bindings. Work on this commit involves: Subset ACPICA for loader land: For our Lua bindings, we need to be able to walk the ACPI namespace and evaluate objects. To do so, we need AcpiInitializeSubsystem, AcpiInitializeTables, AcpiEnableSubsystem, and AcpiLoadTables. Notes: -acpi_detect() moved into libacpi. -Libacpi conditionally compiles ACPICA and glue code on amd64. (arm64 will be addressed in a future update) -AcpiEnableSubsystem is initialized in reduced hardware mode, but with events enabled. This is so that we do not need to pull in all of ACPI_HARDWARE, but can evaluate objects. -Stubbed out Osd functions required for this limited initialization. -Conditionally exclude functions to make a minimal subset designed around loader's/lua binding's needs: --Exclude AcpiInitializeObjects, as we do not need this for walking the namespace and evaluating objects. (utxfinit.c) --Exclude notify handlers or fixed event handlers. (evxface.c) --Stub out print functions, as the loader does not have standard output. (osunixxf.c) --Stub out AcpiOsSleep and AcpiOsGetTimer, as the loader is not multi-threaded and does not implement timers. (osunixxf.c)
1 parent 7b4562e commit b5d71ae

File tree

17 files changed

+1982
-48
lines changed

17 files changed

+1982
-48
lines changed

stand/efi/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ NO_OBJ=t
55
SUBDIR.yes+= libefi
66
SUBDIR.${MK_LOADER_IA32}+= libefi32
77
SUBDIR.${MK_FDT}+= fdt
8+
SUBDIR.yes+= libacpi
9+
SUBDIR.${MK_LOADER_IA32}+= libacpi32
810
SUBDIR.yes+= .WAIT
911

1012
SUBDIR.yes+= boot1 gptboot

0 commit comments

Comments
 (0)