@@ -467,6 +467,17 @@ AcpiAml acpi_io(acpiIODecode dec, uint16_t min_base, uint16_t max_base,
return var;
}
+/* ACPI 5.0: 20.2.5.4 Type 2 Opcodes Encoding: DefLEqual */
+AcpiAml acpi_equal(AcpiAml arg1, AcpiAml arg2)
+{
+ AcpiAml var = aml_allocate_internal(0, NON_BLOCK);
+ build_append_byte(var.buf, 0x93); /* LequalOp */
+ aml_append(&var, arg1);
+ aml_append(&var, arg2);
+ build_append_int(var.buf, 0x00); /* NullNameOp */
+ return var;
+}
+
/* ACPI 5.0: 20.2.5.3 Type 1 Opcodes Encoding: DefIfElse */
AcpiAml acpi_if(AcpiAml predicate)
{
@@ -60,6 +60,7 @@ AcpiAml acpi_operation_region(const char *name, acpiRegionSpace rs,
AcpiAml acpi_named_field(const char *name, unsigned length);
AcpiAml GCC_FMT_ATTR(1, 2) acpi_string(const char *name_format, ...);
AcpiAml acpi_local0(void);
+AcpiAml acpi_equal(AcpiAml arg1, AcpiAml arg2);
/* Block ASL object primitives */
AcpiAml acpi_if(AcpiAml predicate);
Signed-off-by: Igor Mammedov <imammedo@redhat.com> --- hw/acpi/acpi_gen_utils.c | 11 +++++++++++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 12 insertions(+)