From: Robert Hoo <robert.hu@linux.intel.com>
To: imammedo@redhat.com, mst@redhat.com,
xiaoguangrong.eric@gmail.com, ani@anisinha.ca,
dan.j.williams@intel.com, jingqi.liu@intel.com
Cc: qemu-devel@nongnu.org, robert.hu@intel.com,
Robert Hoo <robert.hu@linux.intel.com>
Subject: [PATCH v3 2/5] acpi/ssdt: Fix aml_or() and aml_and() in if clause
Date: Thu, 1 Sep 2022 11:27:18 +0800 [thread overview]
Message-ID: <20220901032721.1392482-3-robert.hu@linux.intel.com> (raw)
In-Reply-To: <20220901032721.1392482-1-robert.hu@linux.intel.com>
In If condition, using bitwise and/or, rather than logical and/or.
The result change in AML code:
If (((Local6 == Zero) | (Arg0 != Local0)))
==>
If (((Local6 == Zero) || (Arg0 != Local0)))
If (((ObjectType (Arg3) == 0x04) & (SizeOf (Arg3) == One)))
==>
If (((ObjectType (Arg3) == 0x04) && (SizeOf (Arg3) == One)))
Fixes: 90623ebf603 ("nvdimm acpi: check UUID")
Fixes: 4568c948066 ("nvdimm acpi: save arg3 of _DSM method")
Signed-off-by: Robert Hoo <robert.hu@linux.intel.com>
Reviewed-by: Jingqi Liu <jingqi.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
---
hw/acpi/nvdimm.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 31e46df0bd..201317c611 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
@@ -1037,7 +1037,7 @@ static void nvdimm_build_common_dsm(Aml *dev,
uuid_invalid = aml_lnot(aml_equal(uuid, expected_uuid));
- unsupport = aml_if(aml_or(unpatched, uuid_invalid, NULL));
+ unsupport = aml_if(aml_lor(unpatched, uuid_invalid));
/*
* function 0 is called to inquire what functions are supported by
@@ -1069,10 +1069,9 @@ static void nvdimm_build_common_dsm(Aml *dev,
* in the DSM Spec.
*/
pckg = aml_arg(3);
- ifctx = aml_if(aml_and(aml_equal(aml_object_type(pckg),
+ ifctx = aml_if(aml_land(aml_equal(aml_object_type(pckg),
aml_int(4 /* Package */)) /* It is a Package? */,
- aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */,
- NULL));
+ aml_equal(aml_sizeof(pckg), aml_int(1)) /* 1 element? */));
pckg_index = aml_local(2);
pckg_buf = aml_local(3);
--
2.31.1
next prev parent reply other threads:[~2022-09-01 3:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 3:27 [PATCH v3 0/5] Support ACPI NVDIMM Label Methods Robert Hoo
2022-09-01 3:27 ` [PATCH v3 1/5] tests/acpi: allow SSDT changes Robert Hoo
2022-09-01 3:27 ` Robert Hoo [this message]
2022-09-01 3:27 ` [PATCH v3 3/5] acpi/nvdimm: define macro for NVDIMM Device _DSM Robert Hoo
2022-09-07 9:15 ` Igor Mammedov
2022-09-01 3:27 ` [PATCH v3 4/5] acpi/nvdimm: Implement ACPI NVDIMM Label Methods Robert Hoo
2022-09-09 13:39 ` Igor Mammedov
2022-09-09 14:02 ` Robert Hoo
2022-09-12 8:48 ` Igor Mammedov
2022-09-16 2:27 ` Robert Hoo
2022-09-16 7:37 ` Igor Mammedov
2022-09-16 13:15 ` Robert Hoo
2022-09-20 9:13 ` Igor Mammedov
2022-09-20 12:28 ` Robert Hoo
2022-09-21 13:29 ` Igor Mammedov
2022-09-22 1:22 ` Robert Hoo
2022-09-01 3:27 ` [PATCH v3 5/5] test/acpi/bios-tables-test: SSDT: update golden master binaries Robert Hoo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901032721.1392482-3-robert.hu@linux.intel.com \
--to=robert.hu@linux.intel.com \
--cc=ani@anisinha.ca \
--cc=dan.j.williams@intel.com \
--cc=imammedo@redhat.com \
--cc=jingqi.liu@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=robert.hu@intel.com \
--cc=xiaoguangrong.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).