From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: edk2-devel@lists.01.org, lersek@redhat.com
Cc: zhaoshenglong@huawei.com, sakar.arora@nxp.com,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH 1/4] ArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties
Date: Thu, 15 Sep 2016 14:30:30 +0100 [thread overview]
Message-ID: <1473946233-10547-2-git-send-email-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <1473946233-10547-1-git-send-email-ard.biesheuvel@linaro.org>
Currently, the code in FdtClientDxe assumes #address-cells and
of <base, size> tuples, this means the size of the entire property
should always be a multiple of 16 bytes (i.e, 4 * sizeof(UINT32),
not 8. So fix this.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
ArmVirtPkg/FdtClientDxe/FdtClientDxe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
index c336e2410033..2063a597323b 100644
--- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
+++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
@@ -178,7 +178,7 @@ FindCompatibleNodeReg (
return Status;
}
- if ((*RegSize % 8) != 0) {
+ if ((*RegSize % 16) != 0) {
DEBUG ((EFI_D_ERROR,
"%a: '%a' compatible node has invalid 'reg' property (size == 0x%x)\n",
__FUNCTION__, CompatibleString, *RegSize));
--
2.7.4
next prev parent reply other threads:[~2016-09-15 13:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-15 13:30 [PATCH 0/4] ArmVirtPkg: FdtClientDxe & HighMemDxe updates Ard Biesheuvel
2016-09-15 13:30 ` Ard Biesheuvel [this message]
2016-09-15 13:38 ` [PATCH 1/4] ArmVirtPkg/FdtClientDxe: fix check for size of "reg" properties Laszlo Ersek
2016-09-15 13:40 ` Ard Biesheuvel
2016-09-15 13:30 ` [PATCH 2/4] ArmVirtPkg/FdtClientDxe: report address and size cell count directly Ard Biesheuvel
2016-09-15 13:42 ` Laszlo Ersek
2016-09-15 13:30 ` [PATCH 3/4] ArmVirtPkg/FdtClient: add methods to iterate over memory nodes Ard Biesheuvel
2016-09-15 13:57 ` Laszlo Ersek
2016-09-15 14:04 ` Ard Biesheuvel
2016-09-15 13:30 ` [PATCH 4/4] ArmVirtPkg/HighMemDxe: move to FDT client protocol Ard Biesheuvel
2016-09-15 14:15 ` Laszlo Ersek
2016-09-15 14:18 ` Ard Biesheuvel
2016-09-15 13:34 ` [PATCH 0/4] ArmVirtPkg: FdtClientDxe & HighMemDxe updates Ard Biesheuvel
2016-09-15 14:40 ` Ard Biesheuvel
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-list 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=1473946233-10547-2-git-send-email-ard.biesheuvel@linaro.org \
--to=devel@edk2.groups.io \
/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