aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2020-04-27 21:08:10 +1000
committerOliver O'Halloran <oohall@gmail.com>2020-06-11 12:52:55 +1000
commit1e0ac5f5ef0fda36e62d545831138023fe02b588 (patch)
treee7d6ab374783d87cd1f79923b3f56edf8c851cbf /hdata
parente275fa73106f47b68b3213c27c41f4415dca6fcd (diff)
downloadskiboot-1e0ac5f5ef0fda36e62d545831138023fe02b588.zip
skiboot-1e0ac5f5ef0fda36e62d545831138023fe02b588.tar.gz
skiboot-1e0ac5f5ef0fda36e62d545831138023fe02b588.tar.bz2
hdata: MS AREA endian fix
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [oliver: fix up drift] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'hdata')
-rwxr-xr-xhdata/memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdata/memory.c b/hdata/memory.c
index f2c4405..bd47fee 100755
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -512,14 +512,14 @@ static void add_memory_buffer_mmio(const struct HDIF_common_hdr *msarea)
const struct HDIF_array_hdr *array;
unsigned int i, count, ranges = 0;
struct dt_node *membuf;
- uint64_t *reg, *flags;
+ beint64_t *reg, *flags;
if (PVR_TYPE(mfspr(SPR_PVR)) != PVR_TYPE_P9P)
return;
- if (be32_to_cpu(msarea->version) < 0x50) {
+ if (be16_to_cpu(msarea->version) < 0x50) {
prlog(PR_WARNING, "MS AREA: Inconsistent MSAREA version %x for P9P system",
- be32_to_cpu(msarea->version));
+ be16_to_cpu(msarea->version));
return;
}