Fixed state save after process preemption
This commit is contained in:
@@ -34,7 +34,7 @@ isr_preempt:
|
|||||||
|
|
||||||
// Save base pointer; it points to the interrupt stack frame
|
// Save base pointer; it points to the interrupt stack frame
|
||||||
mov %esp, %ebp
|
mov %esp, %ebp
|
||||||
sub $4, %ebp
|
add $4, %ebp
|
||||||
|
|
||||||
// Save EAX on stack so it can be used as a buffer
|
// Save EAX on stack so it can be used as a buffer
|
||||||
push %eax
|
push %eax
|
||||||
@@ -44,19 +44,19 @@ isr_preempt:
|
|||||||
push %eax
|
push %eax
|
||||||
|
|
||||||
// Load EIP, then push it onto stack
|
// Load EIP, then push it onto stack
|
||||||
mov 16(%ebp), %eax
|
mov (%ebp), %eax
|
||||||
push %eax
|
push %eax
|
||||||
|
|
||||||
// Load CS, then push it onto stack
|
// Load CS, then push it onto stack
|
||||||
mov 12(%ebp), %eax
|
|
||||||
push %eax
|
|
||||||
|
|
||||||
// Load ESP, then push it onto stack
|
|
||||||
mov 4(%ebp), %eax
|
mov 4(%ebp), %eax
|
||||||
push %eax
|
push %eax
|
||||||
|
|
||||||
|
// Load ESP, then push it onto stack
|
||||||
|
mov 12(%ebp), %eax
|
||||||
|
push %eax
|
||||||
|
|
||||||
// Load SS, then push it onto stack
|
// Load SS, then push it onto stack
|
||||||
mov (%ebp), %eax
|
mov 16(%ebp), %eax
|
||||||
push %eax
|
push %eax
|
||||||
|
|
||||||
// Load EBP, then push it onto stack
|
// Load EBP, then push it onto stack
|
||||||
|
|||||||
Reference in New Issue
Block a user