Skip to content

Commit f278447

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 f278447

File tree

18 files changed

+1995
-49
lines changed

18 files changed

+1995
-49
lines changed

stand/efi/Makefile

Lines changed: 6 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
@@ -14,4 +16,8 @@ SUBDIR.${MK_LOADER_LUA}+= loader_lua
1416
SUBDIR.${MK_LOADER_IA32}+= loader_ia32
1517
SUBDIR.yes+= loader_simp
1618

19+
.if !defined(MK_FORTH) && !defined(MK_LOADER_IA32) && defined(MK_LOADER_LUA)
20+
SUBDIR.yes+= liblua
21+
.endif
22+
1723
.include <bsd.subdir.mk>

0 commit comments

Comments
 (0)