mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
dtc: fix endian issue when reading blobs
The reserve mem regions are screwy if you read a blob on x86. I'm guessing there may be a few more of these lurking in the code. Signed-off-by: Michael Neuling <mikey@neuling.org>
This commit is contained in:
parent
a73b7d43d4
commit
332c536425
1 changed files with 2 additions and 0 deletions
|
@ -619,6 +619,8 @@ static struct reserve_info *flat_read_mem_reserve(struct inbuf *inb)
|
|||
p = inb->ptr;
|
||||
while (1) {
|
||||
flat_read_chunk(inb, &re, sizeof(re));
|
||||
re.address = be64_to_cpu(re.address);
|
||||
re.size = be64_to_cpu(re.size);
|
||||
if (re.size == 0)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue