x86: fix early boot pagefault reason code
If we get a page fault in early boot context, before main thread is started, page faults were being incorrectly reported as stack overflows. z_x86_check_stack_bounds() needs to consider the interrupt stack as the correct stack for this context. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
87dd0492db
commit
a8585ac35c
1 changed files with 3 additions and 2 deletions
|
@ -54,8 +54,9 @@ bool z_x86_check_stack_bounds(uintptr_t addr, size_t size, uint16_t cs)
|
||||||
{
|
{
|
||||||
uintptr_t start, end;
|
uintptr_t start, end;
|
||||||
|
|
||||||
if (arch_is_in_isr()) {
|
if (_current == NULL || arch_is_in_isr()) {
|
||||||
/* We were servicing an interrupt */
|
/* We were servicing an interrupt or in early boot environment
|
||||||
|
* and are supposed to be on the interrupt stack */
|
||||||
int cpu_id;
|
int cpu_id;
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue