>-----Original Message----- >From: Stewart Hildebrand <[email protected]> >Sent: Wednesday, February 17, 2021 11:19 AM >To: OSv Development <[email protected]> >Cc: Stewart Hildebrand <[email protected]>; Waldek Kozaczuk ><[email protected]> >Subject: [PATCH 1/2] aarch64: fixup system RAM range > >The arguments to the free_initial_memory_range() call specify a memory range >beyond the end of system RAM. Subtract the reserved boot memory size from the >physical memory size so we don't exceed the end of physical RAM. I just realized that this is actually already taken care of in dtb_setup() [1]. I only ran into the issue once I started mapping the DTB in patch 2. So this patch is clearly not right, please disregard. [1] https://github.com/cloudius-systems/osv/blob/master/arch/aarch64/arch-dtb.cc#L715 >Signed-off-by: Stewart Hildebrand <[email protected]> >--- > arch/aarch64/arch-setup.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/arch/aarch64/arch-setup.cc b/arch/aarch64/arch-setup.cc >index 30fb0db6..6aff9580 100644 >--- a/arch/aarch64/arch-setup.cc >+++ b/arch/aarch64/arch-setup.cc >@@ -81,7 +81,8 @@ void arch_setup_free_memory() > extern void *elf_start; > > mmu::phys addr = (mmu::phys)elf_start + elf_size; >- mmu::free_initial_memory_range(addr, memory::phys_mem_size); >+ size_t reserved_size = addr - mmu::mem_addr; >+ mmu::free_initial_memory_range(addr, memory::phys_mem_size - >reserved_size); > > /* linear_map [TTBR1] */ > for (auto&& area : mmu::identity_mapped_areas) { >-- >2.30.0 -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/BN3P110MB0563E8E8FE423F4FE8E8B3548C869%40BN3P110MB0563.NAMP110.PROD.OUTLOOK.COM.
[osv-dev] RE: [PATCH 1/2] aarch64: fixup system RAM range
'Stewart Hildebrand' via OSv Development Wed, 17 Feb 2021 14:00:02 -0800
- [osv-dev] [PATCH 0/2] aarch64: bo... 'Stewart Hildebrand' via OSv Development
- [osv-dev] [PATCH 1/2] aarch6... 'Stewart Hildebrand' via OSv Development
- [osv-dev] RE: [PATCH 1/2... 'Stewart Hildebrand' via OSv Development
- [osv-dev] [RFC PATCH 2/2] aa... 'Stewart Hildebrand' via OSv Development
- [osv-dev] Re: [RFC PATCH... Waldek Kozaczuk
