1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:08:12 +00:00

Kernel: Add exception_code to RegisterDump.

Added the exception_code field to RegisterDump, removing the need
for RegisterDumpWithExceptionCode. To accomplish this, I had to
push a dummy exception code during some interrupt entries to properly
pad out the RegisterDump. Note that we also needed to change some code
in sys$sigreturn to deal with the new RegisterDump layout.
This commit is contained in:
Drew Stratford 2019-10-05 03:31:34 +13:00 committed by Andreas Kling
parent 334e039294
commit 7fc903b97a
6 changed files with 23 additions and 38 deletions

View file

@ -561,8 +561,8 @@ void Scheduler::timer_tick(RegisterDump& regs)
outgoing_tss.eflags = regs.eflags;
// Compute process stack pointer.
// Add 12 for CS, EIP, EFLAGS (interrupt mechanic)
outgoing_tss.esp = regs.esp + 12;
// Add 16 for CS, EIP, EFLAGS, exception code (interrupt mechanic)
outgoing_tss.esp = regs.esp + 16;
outgoing_tss.ss = regs.ss;
if ((outgoing_tss.cs & 3) != 0) {