mrd.type = UKPLAT_MEMRT_FREE;
mrd.flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_WRITE;
- rc = ukplat_memregion_list_insert_split_phys(
- &bi->mrds, &mrd, __PAGE_SIZE);
- if (unlikely(rc < 0))
- lxboot_crash(rc, "Unable to add ram mapping");
} else {
mrd.type = UKPLAT_MEMRT_RESERVED;
mrd.flags = UKPLAT_MEMRF_READ | UKPLAT_MEMRF_MAP;
/* We assume that reserved regions cannot
* overlap with loaded modules.
*/
- rc = ukplat_memregion_list_insert(&bi->mrds, &mrd);
- if (unlikely(rc < 0))
- lxboot_crash(rc, "Unable to add ram mapping");
}
+
+ rc = ukplat_memregion_list_insert(&bi->mrds, &mrd);
+ if (unlikely(rc < 0))
+ lxboot_crash(rc, "Unable to add ram mapping");
+
}
}
lxboot_init_cmdline(bi, bp);
lxboot_init_initrd(bi, bp);
lxboot_init_mem(bi, bp);
+ ukplat_memregion_list_coalesce(&bi->mrds);
memcpy(bi->bootprotocol, "lxboot", sizeof("lxboot"));