libacpi: fixes for iasl >= 20180427
PATCH 1/1 libacpi: fixes for iasl >= 20180427
New versions of iasl have introduced improved C file generation, as reported in the changelog:
iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project):
1) Create a unique name for the table, to simplify use of multiple
SSDTs.
2) Add a protection #ifdef in the file, similar to a .h header file.
The net effect of that on generated files is:
-unsigned char AmlCode[] =
+#ifndef __SSDT_S4_HEX__
+#define __SSDT_S4_HEX__
+
+unsigned char ssdt_s4_aml_code[] =
The above example is from ssdt_s4.asl.
Fix the build with newer versions of iasl by stripping the '_aml_code' suffix from the variable name on generated files.
---
Cc: Jan Beulich <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Juergen Gross <[email protected]>
---
IMO, this should be in 4.11 in order to be compatible with new iasl versions.
--- tools/libacpi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libacpi/Makefile +2 -2
@@ -43,7 +43,7 @@ all: $(C_SRC) $(H_SRC) $(H_SRC): $(ACPI_BUILD_DIR)/%.h: %.asl iasl iasl -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $< - sed -e 's/AmlCode/$*/g' $(ACPI_BUILD_DIR)/$*.hex >$@ + sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex >$@ rm -f $(addprefix $(ACPI_BUILD_DIR)/, $*.aml $*.hex) $(MK_DSDT): mk_dsdt.c
@@ -76,7 +76,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT) $(C_SRC): $(ACPI_BUILD_DIR)/%.c: iasl $(ACPI_BUILD_DIR)/%.asl iasl -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $(ACPI_BUILD_DIR)/$*.asl - sed -e 's/AmlCode/$*/g' $(ACPI_BUILD_DIR)/$*.hex > $@.$(TMP_SUFFIX) + sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex > $@.$(TMP_SUFFIX) echo "int $*_len=sizeof($*);" >> $@.$(TMP_SUFFIX) mv -f $@.$(TMP_SUFFIX) $@ rm -f $(addprefix $(ACPI_BUILD_DIR)/, $*.aml $*.hex)
Signature · 7 lines
2.17.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Roger Pau Monne
New versions of iasl have introduced improved C file generation, as reported in the changelog:
iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project):
1) Create a unique name for the table, to simplify use of multiple
SSDTs.
2) Add a protection #ifdef in the file, similar to a .h header file.The net effect of that on generated files is:
(quoted diff) +4
-1-unsigned char AmlCode[] = +#ifndef __SSDT_S4_HEX__ +#define __SSDT_S4_HEX__ + +unsigned char ssdt_s4_aml_code[] =
Quoted 6 lines
The above example is from ssdt_s4.asl.
Fix the build with newer versions of iasl by stripping the '
_aml_code' suffix from the variable name on generated files.Signed-off-by Roger Pau Monné <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Roger Pau Monne
New versions of iasl have introduced improved C file generation, as reported in the changelog:
iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project):
1) Create a unique name for the table, to simplify use of multiple
SSDTs.
2) Add a protection #ifdef in the file, similar to a .h header file.The net effect of that on generated files is:
(quoted diff) +4
-1-unsigned char AmlCode[] = +#ifndef __SSDT_S4_HEX__ +#define __SSDT_S4_HEX__ + +unsigned char ssdt_s4_aml_code[] =
Quoted 6 lines
The above example is from ssdt_s4.asl.
Fix the build with newer versions of iasl by stripping the '
_aml_code' suffix from the variable name on generated files.Signed-off-by Roger Pau Monné <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 22 lines · Roger Pau Monne
New versions of iasl have introduced improved C file generation, as reported in the changelog:
iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project):
1) Create a unique name for the table, to simplify use of multiple
SSDTs.
2) Add a protection #ifdef in the file, similar to a .h header file.The net effect of that on generated files is:
(quoted diff) +4
-1-unsigned char AmlCode[] = +#ifndef __SSDT_S4_HEX__ +#define __SSDT_S4_HEX__ + +unsigned char ssdt_s4_aml_code[] =The above example is from ssdt_s4.asl.
Fix the build with newer versions of iasl by stripping the '
_aml_code' suffix from the variable name on generated files.
Quoted 6 lines
Signed-off-by Roger Pau Monné <[email protected]>---
Cc: Jan Beulich <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Juergen Gross <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel