x86,boot: Don't reserve regular memory region
It's incorrect to add a region in boot_state.mem_p_regs to the reserved region list. The reserved region list's purpose is for restricting the creation of any untyped objects. This error was being masked by a second call to reserve_region with a partially overlapping region that caused the memory region to get actually turned into regular untypeds, but the other reserved region to still get turned into device untypeds. Now the range [0x0, 0x100000] isn't being added to a reserved region and will still be turned into device untypeds. This change shouldn't change the untypeds given to userlevel. Signed-off-by: Kent McLeod <kent@kry10.com>
This commit is contained in:
parent
64a14f8fe7
commit
bf7c1aa37b
2 changed files with 5 additions and 2 deletions
|
|
@ -72,7 +72,10 @@ BOOT_CODE static bool_t arch_init_freemem(p_region_t ui_p_reg,
|
|||
mem_p_regs_t *mem_p_regs,
|
||||
word_t extra_bi_size_bits)
|
||||
{
|
||||
ui_p_reg.start = 0;
|
||||
// Extend the reserved region down to include the base of the kernel image.
|
||||
// KERNEL_ELF_PADDR_BASE is the lowest physical load address used
|
||||
// in the x86 linker script.
|
||||
ui_p_reg.start = KERNEL_ELF_PADDR_BASE;
|
||||
reserved[0] = paddr_to_pptr_reg(ui_p_reg);
|
||||
return init_freemem(mem_p_regs->count, mem_p_regs->list, MAX_RESERVED,
|
||||
reserved, it_v_reg, extra_bi_size_bits);
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ static BOOT_CODE bool_t add_mem_p_regs(p_region_t reg)
|
|||
printf("Adding physical memory region 0x%lx-0x%lx\n", reg.start, reg.end);
|
||||
boot_state.mem_p_regs.list[boot_state.mem_p_regs.count] = reg;
|
||||
boot_state.mem_p_regs.count++;
|
||||
return reserve_region(reg);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue