<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/26352">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Makefile.inc: Ignore IASL empty resource template warnings<br><br>As I mention in the comment, this is valid ASL, which was added as<br>a warning with the comment "This would appear to be worthless in<br>real-world ASL code."  While code using empty resource templates<br>could probably be rewritten, this seems like an arbitrary choice<br>to generate this as a warning, since it's valid.<br><br>This gets rid of warnings such as this one:<br>dsdt.aml   2975:    Return (ResourceTemplate() {})<br>Warning  3150 - Empty Resource Template (END_TAG only)<br><br>Which is generated by this code in google/rambi/acpi/mainboard.asl:<br>Method (_CRS)<br>{<br>  /* Only return interrupt if I2C1 is PCI mode */<br>  If (LEqual (\S1EN, 0)) {<br>    Return (^RBUF)<br>  }<br>  /* Return empty resource template otherwise */<br>  Return (ResourceTemplate() {})<br>}<br><br>Change-Id: I9cfe9069c738a284aa85feada9d58e1aee97e433<br>Signed-off-by: Martin Roth <martinroth@google.com><br>---<br>M Makefile.inc<br>1 file changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/26352/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Makefile.inc b/Makefile.inc</span><br><span>index b11f6e2..e845541 100644</span><br><span>--- a/Makefile.inc</span><br><span>+++ b/Makefile.inc</span><br><span>@@ -241,6 +241,15 @@</span><br><span> # Add handler to compile ACPI's ASL</span><br><span> # arg1: base file name</span><br><span> # arg2: y or n for including in cbfs. defaults to y</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# Empty resource templates were marked as a warning in IASL with the comment</span><br><span style="color: hsl(120, 100%, 40%);">+# "This would appear to be worthless in real-world ASL code.", which is</span><br><span style="color: hsl(120, 100%, 40%);">+# possibly true in many cases.  In other cases it seems that an empty</span><br><span style="color: hsl(120, 100%, 40%);">+# ResourceTemplate is the correct code.</span><br><span style="color: hsl(120, 100%, 40%);">+# As it's valid ASL, disable the warning.</span><br><span style="color: hsl(120, 100%, 40%);">+EMPTY_RESOURCE_TEMPLATE_WARNING = 3150</span><br><span style="color: hsl(120, 100%, 40%);">+IGNORED_IASL_WARNINGS = -vw $(EMPTY_RESOURCE_TEMPLATE_WARNING)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> define asl_template</span><br><span> $(CONFIG_CBFS_PREFIX)/$(1).aml-file = $(obj)/$(1).aml</span><br><span> $(CONFIG_CBFS_PREFIX)/$(1).aml-type = raw</span><br><span>@@ -250,7 +259,7 @@</span><br><span> $(obj)/$(1).aml: $(src)/mainboard/$(MAINBOARDDIR)/$(1).asl $(obj)/config.h</span><br><span>   @printf "    IASL       $$(subst $(top)/,,$$(@))\n"</span><br><span>        $(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 $$@</span><br><span style="color: hsl(0, 100%, 40%);">-    cd $$(dir $$@); $(IASL) -we -p $$(notdir $$@) $$(notdir $$@)</span><br><span style="color: hsl(120, 100%, 40%);">+  cd $$(dir $$@); $(IASL) $(IGNORED_IASL_WARNINGS) -we -p $$(notdir $$@) $$(notdir $$@)</span><br><span>        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</span><br><span> endef</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/26352">change 26352</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/26352"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I9cfe9069c738a284aa85feada9d58e1aee97e433 </div>
<div style="display:none"> Gerrit-Change-Number: 26352 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>