x86: implement improved double-fault handler

We now create a special IA hardware task for handling
double faults. This has a known good stack so that if
the kernel tries to push stack data onto an unmapped page,
we don't triple-fault and reset the system.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-07-14 16:35:17 -07:00 committed by Anas Nashif
commit bc666ae7f7
8 changed files with 124 additions and 15 deletions

View file

@ -7,12 +7,6 @@
#include<kernel.h>
#include<mmustructs.h>
/* Linker variable. It needed to access the start of the Page directory */
extern u32_t __mmu_tables_start;
#define X86_MMU_PD ((struct x86_mmu_page_directory *)\
(void *)&__mmu_tables_start)
/* Ref to _x86_mmu_buffer_validate documentation for details */
#define USER_PERM_BIT_POS ((u32_t)0x1)
#define GET_RW_PERM(flags) (flags & BUFF_WRITEABLE)