Made the interrupt entry also safe the registers DS to GS.
This may be removed in the future for speed purposes.
This commit is contained in:
parent
f4950981b2
commit
49533df72e
2 changed files with 21 additions and 0 deletions
|
@ -70,6 +70,18 @@ typedef unsigned int wint_t;
|
|||
* All the interrupt handler routines use this type for their only parameter.
|
||||
*/
|
||||
struct state {
|
||||
/// GS register
|
||||
unsigned short gs;
|
||||
unsigned short __gs;
|
||||
/// FS register
|
||||
unsigned short fs;
|
||||
unsigned short __fs;
|
||||
/// ES register
|
||||
unsigned short es;
|
||||
unsigned short __es;
|
||||
/// ds register
|
||||
unsigned short ds;
|
||||
unsigned short __ds;
|
||||
/// EDI register
|
||||
unsigned int edi;
|
||||
/// ESI register
|
||||
|
|
|
@ -767,13 +767,22 @@ extern irq_handler
|
|||
|
||||
common_stub:
|
||||
pusha
|
||||
push ds
|
||||
push es
|
||||
push fs
|
||||
push gs
|
||||
|
||||
; use the same handler for interrupts and exceptions
|
||||
push esp
|
||||
call irq_handler
|
||||
add esp, 4
|
||||
|
||||
pop gs
|
||||
pop fs
|
||||
pop es
|
||||
pop gs
|
||||
popa
|
||||
|
||||
add esp, 8
|
||||
iret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue