diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 8207d9c057fb166758f8d20375112e23b22d0da7..99d213c1827f399874fe966cb193dd99ea2b2c4d 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -397,6 +397,17 @@ Aml *aml_name_decl(const char *name, Aml *val) return var; } +/* ACPI 1.0b: 16.2.6.1 Arg Objects Encoding */ +Aml *aml_arg(int pos) +{ + Aml *var; + uint8_t op = 0x68 /* ARG0 op */ + pos; + + assert(pos <= 6); + var = aml_opcode(op); + return var; +} + /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ Aml *aml_if(Aml *predicate) { diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index e7fa9771b10e3323f5dd80ece681380c66d48984..63e9754ad6bcad46454e3c386f56a4bfc9dfe9e3 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -64,6 +64,7 @@ Aml *aml_name(const char *name_format, ...) GCC_FMT_ATTR(1, 2); Aml *aml_name_decl(const char *name, Aml *val); Aml *aml_return(Aml *val); Aml *aml_int(const uint64_t val); +Aml *aml_arg(int pos); /* Block AML object primitives */ Aml *aml_scope(const char *name_format, ...) GCC_FMT_ATTR(1, 2);