|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 17/17] xen/arm64: Zero BSS after the MMU and D-cache is turned on
Hi Stefano, On 6/26/19 8:29 PM, Stefano Stabellini wrote: On Mon, 10 Jun 2019, Julien Grall wrote: Global variables are initialized to zero by default regardless the section they reside. Usually they are stored in BSS because it saves space in the binary. With the Image protocol, BSS is not initialized by the bootloader so we have to do ourself. The section .data.page_aligned is always part of the binary. So the compiler will write zero in the binary for any global variables part of that section and therefore the corresponding memory will be zeroed when loading the binary. If it makes sense, I can try to incorporate that in the commit message. A new macro DEFINE_BOOT_PAGE_TABLE is introduced to create and mark page-tables used before BSS is zeroed. This includes all boot_* but also xen_fixmap as zero_bss() will print a message when earlyprintk is enabled.On a similar note, and continuing from what I wrote above, do we need to make sure to zero the xen_fixmap before hooking it up setup_fixmap? See above. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |