mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Fix endian problems with handling of memreserve entries (bug pointed out
by Pantelis Antoniou). The rule is that the memreserve data in struct boot_info is always stored big-endian.
This commit is contained in:
parent
230f253e9b
commit
6c0f36769a
2 changed files with 15 additions and 25 deletions
|
@ -168,8 +168,9 @@ void write_tree_source(FILE *f, struct boot_info *bi)
|
|||
bi->mem_reserve_data.val) + i;
|
||||
|
||||
fprintf(f, "/memreserve/\t%016llx-%016llx;\n",
|
||||
(unsigned long long)re->address,
|
||||
(unsigned long long)re->address + re->size - 1);
|
||||
(unsigned long long)be64_to_cpu(re->address),
|
||||
(unsigned long long)(be64_to_cpu(re->address)
|
||||
+ be64_to_cpu(re->size) - 1));
|
||||
}
|
||||
|
||||
write_tree_source_node(f, bi->dt, 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue