Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/fdtwalk/helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ status_t fdtwalk_reserve_fdt_memory(const void *fdt, paddr_t fdt_phys) {
return ERR_NOT_FOUND;
}

uint32_t length = fdt_totalsize(fdt);
size_t length = fdt_totalsize(fdt);

paddr_t base = fdt_phys;
base = PAGE_ALIGN(base);
length = ROUNDUP(length, PAGE_SIZE);
paddr_t base = ROUNDDOWN(fdt_phys, PAGE_SIZE);
size_t offset = fdt_phys - base;
length = ROUNDUP(length + offset, PAGE_SIZE);

dprintf(INFO, "FDT: reserving physical range for FDT: [%#lx, %#lx]\n", base, base + length - 1);

Expand Down