[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [PATCH v3 28/43] arm64: init the memory system
On 16/04/18 07:32, Huang Shijie wrote: +void arch_mm_preinit(void *dtb_pointer) +{ + paddr_t **dtb_p = dtb_pointer; + paddr_t *dtb = *dtb_p; + uintptr_t end = (uintptr_t) &_end; + + dtb = to_virt(((paddr_t)dtb)); + first_free_pfn = PFN_UP(to_phys(end)); + min_mem_pfn = PFN_UP(to_phys(_text) + MIN_MEM_SIZE); + + /* + * Setup the mapping for Device Tree, only map 2M(L2_SIZE) size. + * + * Note: The early_alloc_page() will increase @first_free_pfn. + */ + build_pagetable((unsigned long)dtb, virt_to_pfn((unsigned long)dtb), + PHYS_PFN(L2_SIZE), MEM_DEF_ATTR, early_alloc_page, 2); I forgot to comment on this. You can't assume the DTB will be 2MB aligned and the interface of build_pagetable is somewhat quite confusing to use. So are you going to map 2 2MB section? Or only one? Cheers, -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |