From 3abdeb0af08209dfa86b0343c625b506498e8368 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 17 May 2018 10:18:01 -0600 Subject: Makefile.inc: Ignore IASL empty resource template warnings As I mention in the comment, this is valid ASL, which was added as a warning with the comment "This would appear to be worthless in real-world ASL code." While code using empty resource templates could probably be rewritten, this seems like an arbitrary choice to generate this as a warning, since it's valid. This gets rid of warnings such as this one: dsdt.aml 2975: Return (ResourceTemplate() {}) Warning 3150 - Empty Resource Template (END_TAG only) Which is generated by this code in google/rambi/acpi/mainboard.asl: Method (_CRS) { /* Only return interrupt if I2C1 is PCI mode */ If (LEqual (\S1EN, 0)) { Return (^RBUF) } /* Return empty resource template otherwise */ Return (ResourceTemplate() {}) } Change-Id: I9cfe9069c738a284aa85feada9d58e1aee97e433 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/26352 Reviewed-by: Patrick Georgi Reviewed-by: Duncan Laurie Tested-by: build bot (Jenkins) --- Makefile.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile.inc') diff --git a/Makefile.inc b/Makefile.inc index 10b7d1ba1e..151b87660a 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -241,6 +241,15 @@ endef # Add handler to compile ACPI's ASL # arg1: base file name # arg2: y or n for including in cbfs. defaults to y + +# Empty resource templates were marked as a warning in IASL with the comment +# "This would appear to be worthless in real-world ASL code.", which is +# possibly true in many cases. In other cases it seems that an empty +# ResourceTemplate is the correct code. +# As it's valid ASL, disable the warning. +EMPTY_RESOURCE_TEMPLATE_WARNING = 3150 +IGNORED_IASL_WARNINGS = -vw $(EMPTY_RESOURCE_TEMPLATE_WARNING) + define asl_template $(CONFIG_CBFS_PREFIX)/$(1).aml-file = $(obj)/$(1).aml $(CONFIG_CBFS_PREFIX)/$(1).aml-type = raw @@ -250,7 +259,7 @@ cbfs-files-$(if $(2),$(2),y) += $(CONFIG_CBFS_PREFIX)/$(1).aml $(obj)/$(1).aml: $(src)/mainboard/$(MAINBOARDDIR)/$(1).asl $(obj)/config.h @printf " IASL $$(subst $(top)/,,$$(@))\n" $(CC_ramstage) -x assembler-with-cpp -E -MMD -MT $$(@) $$(CPPFLAGS_ramstage) -D__ACPI__ -P -include $(src)/include/kconfig.h -I$(obj) -I$(src) -I$(src)/include -I$(src)/arch/$(ARCHDIR-$(ARCH-ramstage-y))/include -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$@ - cd $$(dir $$@); $(IASL) -we -p $$(notdir $$@) $$(notdir $$@) + cd $$(dir $$@); $(IASL) $(IGNORED_IASL_WARNINGS) -we -p $$(notdir $$@) $$(notdir $$@) if [ -z "$$$$($(IASL) -d $$@ 2>&1 | grep 'ACPI Warning')" ]; then echo " IASL $$@ disassembled correctly."; true; else echo "Error: Could not correctly disassemble $$@"; $(IASL) -d $$@; false; fi endef -- cgit v1.2.3