x86: support very early printk() if desired
Adapted from similar code in the x86_64 port. Useful when debugging boot problems on actual x86 hardware if a JTAG isn't handy or feasible. Turn this on for qemu_x86. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
14db558939
commit
bd709c7322
5 changed files with 83 additions and 0 deletions
|
@ -23,6 +23,11 @@ extern "C" {
|
|||
|
||||
extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
|
||||
|
||||
#ifdef CONFIG_X86_VERY_EARLY_CONSOLE
|
||||
/* Setup ultra-minimal serial driver for printk() */
|
||||
void z_x86_early_serial_init(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Performs architecture-specific initialization
|
||||
|
@ -38,6 +43,10 @@ static inline void kernel_arch_init(void)
|
|||
_kernel.nested = 0;
|
||||
_kernel.irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack) +
|
||||
CONFIG_ISR_STACK_SIZE;
|
||||
|
||||
#ifdef CONFIG_X86_VERY_EARLY_CONSOLE
|
||||
z_x86_early_serial_init();
|
||||
#endif
|
||||
#if CONFIG_X86_STACK_PROTECTION
|
||||
z_x86_mmu_set_flags(&z_x86_kernel_pdpt, _interrupt_stack, MMU_PAGE_SIZE,
|
||||
MMU_ENTRY_NOT_PRESENT, MMU_PTE_P_MASK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue