Skip to content
Snippets Groups Projects
Commit ce6b27a8 authored by Grant Likely's avatar Grant Likely Committed by Gerald Van Baren
Browse files

Fix off-by-one error in passing initrd end address via device tree


The initrd_end variable contains the address immediately *after* the
initrd blob, not the last address containing data.  This patch fixes
an inadvertent off-by-one when setting up the initrd reserved map.

Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent ed59e587
No related branches found
No related tags found
No related merge requests found
...@@ -183,7 +183,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force) ...@@ -183,7 +183,7 @@ int fdt_initrd(void *fdt, ulong initrd_start, ulong initrd_end, int force)
} }
} }
err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start + 1); err = fdt_add_mem_rsv(fdt, initrd_start, initrd_end - initrd_start);
if (err < 0) { if (err < 0) {
printf("fdt_initrd: %s\n", fdt_strerror(err)); printf("fdt_initrd: %s\n", fdt_strerror(err));
return err; return err;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment