[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v5 13/21] acpi: Move ACPI code to tools/libacpi



Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 MAINTAINERS                                                |  1 +
 tools/firmware/hvmloader/Makefile                          | 14 ++++++++------
 tools/firmware/hvmloader/ovmf.c                            |  2 +-
 tools/firmware/rombios/32bit/Makefile                      |  2 +-
 tools/firmware/rombios/32bit/tcgbios/Makefile              |  2 +-
 tools/{firmware/hvmloader/acpi => libacpi}/COPYING         |  0
 tools/{firmware/hvmloader/acpi => libacpi}/Makefile        |  2 +-
 tools/{firmware/hvmloader/acpi => libacpi}/README          |  0
 tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h       |  0
 tools/{firmware/hvmloader/acpi => libacpi}/build.c         |  0
 tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl        |  0
 .../hvmloader/acpi => libacpi}/dsdt_acpi_info.asl          |  0
 tools/{firmware/hvmloader/acpi => libacpi}/gpl/COPYING     |  0
 .../hvmloader/acpi => libacpi}/gpl/mk_dsdt_gpl.sh          |  0
 tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h       |  0
 tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c       |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl     |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl     |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl     |  0
 tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl    |  0
 tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c |  0
 21 files changed, 13 insertions(+), 10 deletions(-)
 rename tools/{firmware/hvmloader/acpi => libacpi}/COPYING (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/Makefile (98%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/README (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/acpi2_0.h (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/build.c (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/dsdt.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/dsdt_acpi_info.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/gpl/COPYING (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/gpl/mk_dsdt_gpl.sh (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/libacpi.h (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/mk_dsdt.c (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_pm.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s3.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_s4.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/ssdt_tpm.asl (100%)
 rename tools/{firmware/hvmloader/acpi => libacpi}/static_tables.c (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 97720a8..07545f3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -138,6 +138,7 @@ S:  Supported
 F:     xen/arch/x86/acpi/
 F:     xen/drivers/acpi/
 F:     xen/include/acpi/
+F:     tools/libacpi/
 
 AMD IOMMU
 M:     Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
diff --git a/tools/firmware/hvmloader/Makefile 
b/tools/firmware/hvmloader/Makefile
index 7b3641c..c19986a 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -20,10 +20,7 @@
 XEN_ROOT = $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
-export ACPI_BUILD_DIR=$(CURDIR)
-SUBDIRS := acpi
 
-# The HVM loader is started in 32-bit mode at the address below:
 LOADADDR = 0x100000
 
 # SMBIOS spec requires format mm/dd/yyyy
@@ -71,16 +68,20 @@ GPL = y
 export GPL
 
 .PHONY: all
-all: subdirs-all
+all: acpi subdirs-all
        $(MAKE) hvmloader
 
+.PHONY: acpi
+acpi:
+       $(MAKE) -C $(ACPI_PATH)  ACPI_BUILD_DIR=$(CURDIR)
+
 rombios.o: roms.inc
 smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(SMBIOS_REL_DATE)\""
 
-ACPI_PATH = acpi
+ACPI_PATH = ../../libacpi
 ACPI_FILES = dsdt_anycpu.c dsdt_15cpu.c dsdt_anycpu_qemu_xen.c
 ACPI_OBJS = $(patsubst %.c,%.o,$(ACPI_FILES)) build.o static_tables.o
-$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"../util.h\"
+$(ACPI_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/util.h\"
 CFLAGS += -I$(ACPI_PATH)
 vpath build.c $(ACPI_PATH)
 vpath static_tables.c $(ACPI_PATH)
@@ -122,6 +123,7 @@ endif
 clean: subdirs-clean
        rm -f roms.inc roms.inc.new acpi.h
        rm -f hvmloader hvmloader.tmp *.o $(DEPS)
+       $(MAKE) -C $(ACPI_PATH)  ACPI_BUILD_DIR=$(CURDIR) clean
 
 .PHONY: distclean
 distclean: clean
diff --git a/tools/firmware/hvmloader/ovmf.c b/tools/firmware/hvmloader/ovmf.c
index 0ac3416..4ff7f1d 100644
--- a/tools/firmware/hvmloader/ovmf.c
+++ b/tools/firmware/hvmloader/ovmf.c
@@ -23,7 +23,7 @@
 
 #include "config.h"
 #include "smbios_types.h"
-#include "acpi/libacpi.h"
+#include "libacpi.h"
 #include "apic_regs.h"
 #include "../rombios/config.h"
 #include "util.h"
diff --git a/tools/firmware/rombios/32bit/Makefile 
b/tools/firmware/rombios/32bit/Makefile
index 71399d2..b0583c9 100644
--- a/tools/firmware/rombios/32bit/Makefile
+++ b/tools/firmware/rombios/32bit/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET = 32bitbios_flat.h
 
-CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../hvmloader/acpi
+CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi
 
 SUBDIRS = tcgbios
 
diff --git a/tools/firmware/rombios/32bit/tcgbios/Makefile 
b/tools/firmware/rombios/32bit/tcgbios/Makefile
index 6822027..f87d130 100644
--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
+++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 TARGET  = tcgbiosext.o
 
-CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../hvmloader/acpi
+CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../../libacpi
 
 .PHONY: all
 all: $(TARGET)
diff --git a/tools/firmware/hvmloader/acpi/COPYING b/tools/libacpi/COPYING
similarity index 100%
rename from tools/firmware/hvmloader/acpi/COPYING
rename to tools/libacpi/COPYING
diff --git a/tools/firmware/hvmloader/acpi/Makefile b/tools/libacpi/Makefile
similarity index 98%
rename from tools/firmware/hvmloader/acpi/Makefile
rename to tools/libacpi/Makefile
index 3550a84..aecac04 100644
--- a/tools/firmware/hvmloader/acpi/Makefile
+++ b/tools/libacpi/Makefile
@@ -12,7 +12,7 @@
 # NU Lesser General Public License for more details.
 #
 
-XEN_ROOT = $(CURDIR)/../../../..
+XEN_ROOT = $(CURDIR)/../..
 include $(XEN_ROOT)/tools/firmware/Rules.mk
 
 MK_DSDT = $(ACPI_BUILD_DIR)/mk_dsdt
diff --git a/tools/firmware/hvmloader/acpi/README b/tools/libacpi/README
similarity index 100%
rename from tools/firmware/hvmloader/acpi/README
rename to tools/libacpi/README
diff --git a/tools/firmware/hvmloader/acpi/acpi2_0.h b/tools/libacpi/acpi2_0.h
similarity index 100%
rename from tools/firmware/hvmloader/acpi/acpi2_0.h
rename to tools/libacpi/acpi2_0.h
diff --git a/tools/firmware/hvmloader/acpi/build.c b/tools/libacpi/build.c
similarity index 100%
rename from tools/firmware/hvmloader/acpi/build.c
rename to tools/libacpi/build.c
diff --git a/tools/firmware/hvmloader/acpi/dsdt.asl b/tools/libacpi/dsdt.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/dsdt.asl
rename to tools/libacpi/dsdt.asl
diff --git a/tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl 
b/tools/libacpi/dsdt_acpi_info.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/dsdt_acpi_info.asl
rename to tools/libacpi/dsdt_acpi_info.asl
diff --git a/tools/firmware/hvmloader/acpi/gpl/COPYING 
b/tools/libacpi/gpl/COPYING
similarity index 100%
rename from tools/firmware/hvmloader/acpi/gpl/COPYING
rename to tools/libacpi/gpl/COPYING
diff --git a/tools/firmware/hvmloader/acpi/gpl/mk_dsdt_gpl.sh 
b/tools/libacpi/gpl/mk_dsdt_gpl.sh
similarity index 100%
rename from tools/firmware/hvmloader/acpi/gpl/mk_dsdt_gpl.sh
rename to tools/libacpi/gpl/mk_dsdt_gpl.sh
diff --git a/tools/firmware/hvmloader/acpi/libacpi.h b/tools/libacpi/libacpi.h
similarity index 100%
rename from tools/firmware/hvmloader/acpi/libacpi.h
rename to tools/libacpi/libacpi.h
diff --git a/tools/firmware/hvmloader/acpi/mk_dsdt.c b/tools/libacpi/mk_dsdt.c
similarity index 100%
rename from tools/firmware/hvmloader/acpi/mk_dsdt.c
rename to tools/libacpi/mk_dsdt.c
diff --git a/tools/firmware/hvmloader/acpi/ssdt_pm.asl 
b/tools/libacpi/ssdt_pm.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/ssdt_pm.asl
rename to tools/libacpi/ssdt_pm.asl
diff --git a/tools/firmware/hvmloader/acpi/ssdt_s3.asl 
b/tools/libacpi/ssdt_s3.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/ssdt_s3.asl
rename to tools/libacpi/ssdt_s3.asl
diff --git a/tools/firmware/hvmloader/acpi/ssdt_s4.asl 
b/tools/libacpi/ssdt_s4.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/ssdt_s4.asl
rename to tools/libacpi/ssdt_s4.asl
diff --git a/tools/firmware/hvmloader/acpi/ssdt_tpm.asl 
b/tools/libacpi/ssdt_tpm.asl
similarity index 100%
rename from tools/firmware/hvmloader/acpi/ssdt_tpm.asl
rename to tools/libacpi/ssdt_tpm.asl
diff --git a/tools/firmware/hvmloader/acpi/static_tables.c 
b/tools/libacpi/static_tables.c
similarity index 100%
rename from tools/firmware/hvmloader/acpi/static_tables.c
rename to tools/libacpi/static_tables.c
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.