On 25/11/16 19:06, Julien Grall wrote: > The tools (such as mk_dsdt) can be cross-built when it may not be > desirable to build them on the target. > > The commit c4ac1077 "libxl/arm: Generate static ACPI DSDT table" > introduced support of ARM64 in mk_dsdt but also break cross-building > tools because the ACPI tables are not correct. > > While mk_dsdt should generate ACPI table for the target architecture, it > currently generates the one for the host. This is because the source > code contains reference to the host architecture (__aarch64__, > __x86_64__, __i386__) when it should be the target architecture. > > Replace all __aarch64__, __x86_64__, __i386__ by the corresponding > CONFIG_*. > > Also expose the CONFIG_* to the source code as the currently only > exposed to the Makefile. > > Reported-by: Andrii Anisov <andrii.ani...@gmail.com> > Suggested-by: Wei Liu <wei.l...@citrix.com> > Signed-off-by: Julien Grall <julien.gr...@arm.com>
Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>, with one tweak, > @@ -27,6 +27,11 @@ DSDT_FILES ?= $(C_SRC-y) > C_SRC = $(addprefix $(ACPI_BUILD_DIR)/, $(DSDT_FILES)) > H_SRC = $(addprefix $(ACPI_BUILD_DIR)/, ssdt_s3.h ssdt_s4.h ssdt_pm.h > ssdt_tpm.h) > > +MKDSDT_CFLAGS-$(CONFIG_ARM_64) = -DCONFIG_ARM_64 > +MKDSDT_CFLAGS-$(CONFIG_X86) = -DCONFIG_X86 > + > +MKDSDT_CFLAGS = $(MKDSDT_CFLAGS-y) := to avoid excessive re-evaluation. > + > # Suffix for temporary files. > # > # We will also use this suffix to workaround a bug in older iasl > _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel