Skip to content

Commit 9bfca9d

Browse files
committed
libacpi: Create stand/efi ACPI lib
1 parent db356c9 commit 9bfca9d

File tree

3 files changed

+59
-48
lines changed

3 files changed

+59
-48
lines changed

stand/efi/libacpi/Makefile

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
.include <bsd.init.mk>
2+
3+
LIB= acpi
4+
5+
.if ${MACHINE} == "amd64"
6+
CFLAGS+= -DACPI_SINGLE_THREADED \
7+
-DACPI_USE_NATIVE_RSDP_POINTER \
8+
-DACPI_USE_NATIVE_MEMORY_MAPPING \
9+
-DACPI_REDUCED_HARDWARE \
10+
-DACPI_DEBUG_OUTPUT
11+
12+
.PATH: ${.CURDIR}/../libefi
13+
.PATH: ${.CURDIR}/amd64/Osd
14+
.PATH: ${.CURDIR}/../contrib/dev/acpica/os_specific/service_layers
15+
.PATH: ${SYSDIR}/contrib/dev/acpica/os_specific/service_layers
16+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/tables
17+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/namespace
18+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/utilities
19+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/dispatcher
20+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/executer
21+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/hardware
22+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/events
23+
.PATH: ${SYSDIR}/contrib/dev/acpica/components/parser
24+
25+
SRCS+= libefi.c OsdMemory.c osunixxf.c utinit.c utglobal.c utresrc.c utlock.c \
26+
utownerid.c utcopy.c uthex.c utmath.c utstrsuppt.c utstrtoul64.c \
27+
utpredef.c uterror.c uteval.c utids.c utbuffer.c utmisc.c utalloc.c \
28+
utxferror.c utexcep.c utaddress.c utascii.c utcache.c utcksum.c \
29+
utdebug.c utdecode.c utdelete.c utmutex.c utobject.c utosi.c \
30+
utstring.c utxfinit.c utnonansi.c utstate.c tbdata.c tbxfload.c \
31+
tbfadt.c tbinstal.c tbprint.c tbutils.c tbxface.c tbxfroot.c \
32+
tbfind.c nsxfobj.c nsxfeval.c nsinit.c nsparse.c nsload.c \
33+
nsrepair2.c nsconvert.c nsrepair.c nsprepkg.c nsarguments.c nseval.c \
34+
nsxfname.c nsdump.c nswalk.c nssearch.c nsnames.c nsutils.c \
35+
nsaccess.c nsalloc.c nsobject.c nspredef.c dsinit.c dsfield.c \
36+
dspkginit.c dsopcode.c dsdebug.c dsmethod.c dscontrol.c dsobject.c \
37+
dsutils.c dswexec.c dswload2.c dswload.c dsmthdat.c dswstate.c \
38+
dsargs.c dswscope.c exregion.c exfldio.c exserial.c exstorob.c \
39+
exstoren.c exdebug.c exmutex.c exconcat.c exmisc.c exconfig.c \
40+
excreate.c exoparg6.c exoparg3.c exoparg2.c exoparg1.c exdump.c \
41+
exprep.c exresop.c exsystem.c exnames.c exresolv.c exstore.c \
42+
exfield.c exconvrt.c exresnte.c exutils.c extrace.c hwpci.c \
43+
hwregs.c hwxface.c hwvalid.c hwacpi.c evmisc.c evregion.c evrgnini.c \
44+
evxface.c evevent.c evxfevnt.c evhandler.c evxfregn.c psobject.c \
45+
psloop.c pstree.c pswalk.c psopinfo.c psscope.c psutils.c psargs.c \
46+
psparse.c psxface.c psopcode.c
47+
48+
CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include
49+
CFLAGS+= -I${EFISRC}/include
50+
CFLAGS+= -I${EFISRC}/acpica/include
51+
CFLAGS+= -I${EFISRC}/include/${MACHINE_ARCH}
52+
.endif # amd64
53+
54+
.include <bsd.lib.mk>
File renamed without changes.

stand/efi/loader/Makefile

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -30,56 +30,9 @@ SRCS= autoload.c \
3030
gfx_fb.c \
3131
8x16.c
3232

33-
# ACPICA Loader Initialization
34-
SRCS+= acpi_detect.c
33+
SRCS+= acpi_detect.c init_acpi.c
3534
.PATH: ${.CURDIR}/../acpica
3635

37-
.if ${MACHINE_ARCH} == "amd64"
38-
SRCS+= OsdMemory.c osunixxf.c
39-
40-
.PATH: ${.CURDIR}/../acpica/amd64/Osd/
41-
.PATH: ${.CURDIR}/../contrib/dev/acpica/os_specific/service_layers
42-
43-
CFLAGS+= -DACPI_SINGLE_THREADED \
44-
-DACPI_USE_NATIVE_RSDP_POINTER \
45-
-DACPI_USE_NATIVE_MEMORY_MAPPING \
46-
-DACPI_REDUCED_HARDWARE \
47-
-DACPI_DEBUG_OUTPUT
48-
49-
SRCS+= libefi.c utinit.c utglobal.c utresrc.c utlock.c utownerid.c \
50-
utcopy.c uthex.c utmath.c utstrsuppt.c utstrtoul64.c utpredef.c \
51-
uterror.c uteval.c utids.c utbuffer.c utmisc.c utalloc.c utxferror.c \
52-
utexcep.c utaddress.c utascii.c utcache.c utcksum.c utdebug.c \
53-
utdecode.c utdelete.c utmutex.c utobject.c utosi.c utstring.c \
54-
utxfinit.c utnonansi.c utstate.c tbdata.c tbxfload.c tbfadt.c \
55-
tbinstal.c tbprint.c tbutils.c tbxface.c tbxfroot.c tbfind.c \
56-
nsxfobj.c nsxfeval.c nsinit.c nsparse.c nsload.c nsrepair2.c \
57-
nsconvert.c nsrepair.c nsprepkg.c nsarguments.c nseval.c nsxfname.c \
58-
nsdump.c nswalk.c nssearch.c nsnames.c nsutils.c nsaccess.c nsalloc.c \
59-
nsobject.c nspredef.c dsinit.c dsfield.c dspkginit.c dsopcode.c \
60-
dsdebug.c dsmethod.c dscontrol.c dsobject.c dsutils.c dswexec.c \
61-
dswload2.c dswload.c dsmthdat.c dswstate.c dsargs.c dswscope.c \
62-
exregion.c exfldio.c exserial.c exstorob.c exstoren.c exdebug.c \
63-
exmutex.c exconcat.c exmisc.c exconfig.c excreate.c exoparg6.c \
64-
exoparg3.c exoparg2.c exoparg1.c exdump.c exprep.c exresop.c \
65-
exsystem.c exnames.c exresolv.c exstore.c exfield.c exconvrt.c \
66-
exresnte.c exutils.c extrace.c hwpci.c hwregs.c hwxface.c hwvalid.c \
67-
hwacpi.c evmisc.c evregion.c evrgnini.c evxface.c evevent.c evxfevnt.c \
68-
evhandler.c evxfregn.c psobject.c psloop.c pstree.c pswalk.c psopinfo.c \
69-
psscope.c psutils.c psargs.c psparse.c psxface.c psopcode.c init_acpi.c
70-
71-
.PATH: ${.CURDIR}/../libefi
72-
.PATH: ${SYSDIR}/contrib/dev/acpica/os_specific/service_layers
73-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/tables
74-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/namespace
75-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/utilities
76-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/dispatcher
77-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/executer
78-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/hardware
79-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/events
80-
.PATH: ${SYSDIR}/contrib/dev/acpica/components/parser
81-
.endif # ACPICA
82-
8336
CFLAGS+= -I${.CURDIR}/../loader
8437
.if ${MK_LOADER_ZFS} != "no"
8538
CFLAGS+= -I${ZFSSRC}
@@ -187,10 +140,14 @@ ${LOADER}.efi: ${PROG}
187140

188141
LIBEFI= ${BOOTOBJ}/efi/libefi/libefi.a
189142
LIBEFI32= ${BOOTOBJ}/efi/libefi32/libefi.a
143+
LIBACPI= ${BOOTOBJ}/efi/libacpi/libacpi.a
190144

191145
.if ${__arch} == "i386"
192146
DPADD= ${LDR_INTERP32} ${LIBEFI32} ${LIBSA32} ${LDSCRIPT}
193147
LDADD= ${LDR_INTERP32} ${LIBEFI32} ${LIBSA32}
148+
.elif ${__arch} == "amd64"
149+
DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} ${LIBACPI} ${LDSCRIPT}
150+
LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} ${LIBACPI}
194151
.else
195152
DPADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA} ${LDSCRIPT}
196153
LDADD= ${LDR_INTERP} ${LIBEFI} ${LIBSAFDT} ${LIBEFI_FDT} ${LIBSA}

0 commit comments

Comments
 (0)