summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/FdtClientDxe
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-15 14:15:14 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-09-15 15:31:24 +0100
commitcfc8d51c0cbf97b5e71cfd92dcc6c5760940214f (patch)
tree8330973059c6b0d3de0daf3d7da1a962ff40f0f6 /ArmVirtPkg/FdtClientDxe
parent38ed4a9e3a65185e7e7b3c891feab1ddc865fdb5 (diff)
downloadedk2-cfc8d51c0cbf97b5e71cfd92dcc6c5760940214f.tar.gz
edk2-cfc8d51c0cbf97b5e71cfd92dcc6c5760940214f.tar.bz2
edk2-cfc8d51c0cbf97b5e71cfd92dcc6c5760940214f.zip
ArmVirtPkg/FdtClientDxe: report address and size cell count directly
The FDT client protocol methods dealing with "reg" properties return the size of a "reg" element. Currently, we have hardcoded this as '8', since #address-cells == #size-cells == 2 in most cases. However, for different values, have a single 'reg' element size is not unambiguous, since - however unlikely - if #address-cells != #size-cells, we do not know which is which. So before adding more methods to the protocol, fix up this oversight. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'ArmVirtPkg/FdtClientDxe')
-rw-r--r--ArmVirtPkg/FdtClientDxe/FdtClientDxe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
index 2063a59732..382e9af6bf 100644
--- a/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
+++ b/ArmVirtPkg/FdtClientDxe/FdtClientDxe.c
@@ -159,7 +159,8 @@ FindCompatibleNodeReg (
IN FDT_CLIENT_PROTOCOL *This,
IN CONST CHAR8 *CompatibleString,
OUT CONST VOID **Reg,
- OUT UINT32 *RegElemSize,
+ OUT UINTN *AddressCells,
+ OUT UINTN *SizeCells,
OUT UINT32 *RegSize
)
{
@@ -185,7 +186,8 @@ FindCompatibleNodeReg (
return EFI_NOT_FOUND;
}
- *RegElemSize = 8;
+ *AddressCells = 2;
+ *SizeCells = 2;
return EFI_SUCCESS;
}