x86: implement 64-bit exception recovery logic
The esf has a different set of members on 64-bit. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
ded0185eb8
commit
fc589d7279
1 changed files with 8 additions and 0 deletions
|
@ -378,11 +378,19 @@ void z_x86_page_fault_handler(z_arch_esf_t *esf)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(exceptions); i++) {
|
||||
#ifdef CONFIG_X86_64
|
||||
if ((void *)esf->rip >= exceptions[i].start &&
|
||||
(void *)esf->rip < exceptions[i].end) {
|
||||
esf->rip = (u64_t)(exceptions[i].fixup);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
if ((void *)esf->eip >= exceptions[i].start &&
|
||||
(void *)esf->eip < exceptions[i].end) {
|
||||
esf->eip = (unsigned int)(exceptions[i].fixup);
|
||||
return;
|
||||
}
|
||||
#endif /* CONFIG_X86_64 */
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_EXCEPTION_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue