Message ID | 1418954562-13716-15-git-send-email-imammedo@redhat.com |
---|---|
State | New |
Headers | show |
On 19/12/2014 03:02, Igor Mammedov wrote: > + AcpiAml var = aml_allocate_internal(0, NON_BLOCK); > + build_append_byte(var.buf, 0x86); /* NotifyOp */ \ Extra backslash. Paolo > + aml_append(&var, arg1);
On Mon, 19 Jan 2015 13:32:48 +0100 Paolo Bonzini <pbonzini@redhat.com> wrote: > > > On 19/12/2014 03:02, Igor Mammedov wrote: > > + AcpiAml var = aml_allocate_internal(0, NON_BLOCK); > > + build_append_byte(var.buf, 0x86); /* NotifyOp */ \ > > Extra backslash. Thanks, I'll fix it. > > Paolo > > > + aml_append(&var, arg1);
diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 15a65c2..d6bdc16 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acpi_gen_utils.c @@ -376,6 +376,16 @@ AcpiAml acpi_and(AcpiAml arg1, AcpiAml arg2) return var; } +/* ACPI 5.0: 20.2.5.3 Type 1 Opcodes Encoding: DefNotify */ +AcpiAml acpi_notify(AcpiAml arg1, AcpiAml arg2) +{ + AcpiAml var = aml_allocate_internal(0, NON_BLOCK); + build_append_byte(var.buf, 0x86); /* NotifyOp */ \ + aml_append(&var, arg1); + aml_append(&var, arg2); + return var; +} + /* ACPI 5.0: 20.2.5.3 Type 1 Opcodes Encoding: DefIfElse */ AcpiAml acpi_if(AcpiAml predicate) { diff --git a/include/hw/acpi/acpi_gen_utils.h b/include/hw/acpi/acpi_gen_utils.h index 50bb1aa..1395b32 100644 --- a/include/hw/acpi/acpi_gen_utils.h +++ b/include/hw/acpi/acpi_gen_utils.h @@ -32,6 +32,7 @@ AcpiAml acpi_arg2(void); AcpiAml acpi_arg3(void); AcpiAml acpi_store(AcpiAml val, AcpiAml target); AcpiAml acpi_and(AcpiAml arg1, AcpiAml arg2); +AcpiAml acpi_notify(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 | 10 ++++++++++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 11 insertions(+)