x86: don't clear BSS if not in physical memory at boot
If the BSS section is not present in physical memory at boot, do not zero the section, or else page faults would occur. The zeroing of BSS will be done once the paging mechanism has been initialized. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
5c4fff3998
commit
30e5968d34
1 changed files with 7 additions and 0 deletions
|
@ -257,7 +257,14 @@ __csSet:
|
|||
#ifdef CONFIG_LINKER_USE_PINNED_SECTION
|
||||
call z_bss_zero_pinned
|
||||
#endif
|
||||
#ifdef CONFIG_LINKER_GENERIC_SECTIONS_PRESENT_AT_BOOT
|
||||
/* Don't clear BSS if the section is not present
|
||||
* in memory at boot. Or else it would cause page
|
||||
* faults. Zeroing BSS will be done later once the
|
||||
* the paging mechanism has been initialized.
|
||||
*/
|
||||
call z_bss_zero
|
||||
#endif
|
||||
|
||||
/* load 32-bit operand size IDT */
|
||||
lidt z_x86_idt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue