On 03/11/2015 03:17 AM, Shannon Zhao wrote:
On 2015/3/10 23:31, Marcel Apfelbaum wrote:
Add encoding for ACPI DefOr Opcode.
Reviewed-by: Shannon Zhao zhaoshenglong@huawei.com Reviewed-by: Igor Mammedov imammedo@redhat.com Signed-off-by: Marcel Apfelbaum marcel@redhat.com
hw/acpi/aml-build.c | 10 ++++++++++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ace180b..db8d346 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -452,6 +452,16 @@ Aml *aml_and(Aml *arg1, Aml *arg2) return var; }
+/* ACPI 1.0b: 16.2.5.4 Type 2 Opcodes Encoding: DefOr */ +Aml *aml_or(Aml *arg1, Aml *arg2) +{
- Aml *var = aml_opcode(0x7D /* OrOp */);
- aml_append(var, arg1);
- aml_append(var, arg2);
- build_append_int(var->buf, 0x00); /* NullNameOp */
Maybe you forgot to fix this. Same with patch 03, 05, 06, 07.
Strange, I was sure I took care of it.
Thanks for bringing this up again! Marcel
Thanks, Shannon
- return var;
+}
- /* ACPI 1.0b: 16.2.5.3 Type 1 Opcodes Encoding: DefNotify */ Aml *aml_notify(Aml *arg1, Aml *arg2) {
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index 17d3beb..c0eb691 100644 --- a/include/hw/acpi/aml-build.h +++ b/include/hw/acpi/aml-build.h @@ -137,6 +137,7 @@ Aml *aml_int(const uint64_t val); Aml *aml_arg(int pos); Aml *aml_store(Aml *val, Aml *target); Aml *aml_and(Aml *arg1, Aml *arg2); +Aml *aml_or(Aml *arg1, Aml *arg2); Aml *aml_notify(Aml *arg1, Aml *arg2); Aml *aml_call1(const char *method, Aml *arg1); Aml *aml_call2(const char *method, Aml *arg1, Aml *arg2);