[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] xen/arm: RAM address alignment
Hi, With UEFI boot and with RAM start address is from 0xc00000, the set_xenheap_mappings() fails to map because offset becomes 0xfffff400. base_mfn always assumes 1GB boundary so with base_mfn passed as 0xc00 it becomes 0x0 where as xenheap_mfn_start is 0xc00. So offset computation becomes negative. See below log with some debug prints Is my observation is correct? Question is why base_mfn should be always aligned to 1GB boundary? void __init setup_xenheap_mappings(unsigned long base_mfn, unsigned long nr_mfns) { lpae_t *first, pte; unsigned long offset, end_mfn; vaddr_t vaddr; /* First call sets the xenheap physical offset. */ if ( xenheap_mfn_start == ~0UL ) xenheap_mfn_start = base_mfn; if ( base_mfn < xenheap_mfn_start ) panic("cannot add xenheap mapping at %lx below heap start %lx", base_mfn, xenheap_mfn_start); end_mfn = base_mfn + nr_mfns; /* Align to previous 1GB boundary */ base_mfn &= ~((FIRST_SIZE>>PAGE_SHIFT)-1); offset = pfn_to_pdx(base_mfn - xenheap_mfn_start); vaddr = DIRECTMAP_VIRT_START + offset*PAGE_SIZE; } (XEN) Checking for initrd in /chosen (XEN) RAM: 0000000000c00000 - 0000000077ffffff (XEN) RAM: 0000000078000000 - 000000007801ffff (XEN) RAM: 0000000078020000 - 000000007a1c5fff (XEN) RAM: 000000007a895000 - 000000007a895fff (XEN) RAM: 000000007aa85000 - 000000007ab6ffff (XEN) RAM: 000000007ab70000 - 000000007b7e5fff (XEN) RAM: 000000007b7e6000 - 000000007b8d0fff (XEN) RAM: 000000007b8d1000 - 000000007b996fff (XEN) RAM: 000000007b997000 - 000000007f219fff (XEN) RAM: 000000007f21a000 - 000000007f24cfff (XEN) RAM: 000000007f24d000 - 000000007f26cfff (XEN) RAM: 000000007f26d000 - 000000007f26efff (XEN) RAM: 000000007f26f000 - 000000007f273fff (XEN) RAM: 000000007f274000 - 000000007f279fff (XEN) RAM: 000000007f27a000 - 000000007f282fff (XEN) RAM: 000000007f283000 - 000000007f284fff (XEN) RAM: 000000007f285000 - 000000007f9a3fff (XEN) RAM: 000000007f9a4000 - 000000007fa29fff (XEN) RAM: 000000007fa2a000 - 000000007fb33fff (XEN) RAM: 000000007fb7a000 - 000000007fffffff (XEN) (XEN) MODULE[0]: 000000007a893000 - 000000007a895000 Device Tree (XEN) MODULE[1]: 000000007a1c8000 - 000000007a8926a8 Kernel console=hvc0 earlycon=pl011,0x87e024000000 mem=512M debug=y rw root=/dev/sda xen.fifo_events=0 (XEN) (XEN) Command line: xen no-bootscrub console=dtuart conswitch=x dtuart=serial0 earlyprintk=pl011,0x87e024000000 debug=y (XEN) Placing Xen at 0x0000000079e00000-0x000000007a000000 (XEN) Update BOOTMOD_XEN from 000000007a897000-000000007a999d81 => 0000000079e00000-0000000079f02d81 (XEN) In setup_mm line 626 (XEN) bank start 0xc00000 bank size 0x77400000 bank end 0x78000000 (XEN) new ram start 0xc00000 size 0x77400000 end 0x78000000 (XEN) In setup_xenheap_mappings >>>>>> base_mfn 0xc00 nr_mfns 0x77400 xenheap_mfn_start 0xffffffffffffffff (XEN) In setup_xenheap_mappings offset 0xfffffffffffff400 vaddr 0x7fffff400000 base_mfn 0x0 end_mfn 0x78000 (XEN) (XEN) **************************************** (XEN) Panic on CPU 0: (XEN) Boot BUG at page_alloc.c:266 (XEN) **************************************** (XEN) (XEN) Reboot in five seconds... _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |