diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-20 14:53:44 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-20 14:53:44 +0200 |
| commit | 6f8e5772d17d277842be3f6162ddd665a17e5be9 (patch) | |
| tree | 45f5a2b9df6b6c2f3c369cf5b7e5b46c9acbccdd /common | |
| parent | 6b2465318b2dc922de282deea96c1621f7f41039 (diff) | |
| download | kmi-6f8e5772d17d277842be3f6162ddd665a17e5be9.tar.gz kmi-6f8e5772d17d277842be3f6162ddd665a17e5be9.zip | |
More sensible init
+ Who knew some reservations were a good thing? (at least relativelyy
speaking)
Diffstat (limited to 'common')
| -rw-r--r-- | common/initrd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/initrd.c b/common/initrd.c index 6dd698d..61aaaff 100644 --- a/common/initrd.c +++ b/common/initrd.c @@ -1,4 +1,5 @@ #include <apos/initrd.h> +#include <apos/vmem.h> #include <apos/string.h> #include <apos/utils.h> #include <apos/attrs.h> @@ -60,7 +61,8 @@ pm_t get_initrdtop(void *fdt) void *initrd_end_ptr = (void *)fdt_getprop(fdt, chosen_offset, "linux,initrd-end", NULL); - return (pm_t)fdt_load_int_ptr(ci.addr_cells, initrd_end_ptr); + /* fdt is only aware of physical memory pointers */ + return (pm_t)__va(fdt_load_int_ptr(ci.addr_cells, initrd_end_ptr)); } pm_t get_initrdbase(void *fdt) @@ -71,7 +73,7 @@ pm_t get_initrdbase(void *fdt) void *initrd_base_ptr = (void *)fdt_getprop(fdt, chosen_offset, "linux,initrd-start", NULL); - return (pm_t)fdt_load_int_ptr(ci.addr_cells, initrd_base_ptr); + return (pm_t)__va(fdt_load_int_ptr(ci.addr_cells, initrd_base_ptr)); } static char init_n[] = "init"; |
