Fix trap frame layout.
This commit is contained in:
parent
e4fcd27e31
commit
250372de4b
@ -28,8 +28,8 @@ enum {
|
|||||||
* - `push eax` whose lower 16-bits contain DS
|
* - `push eax` whose lower 16-bits contain DS
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t ds; /* Data segment selector */
|
|
||||||
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; /* Pushed by pusha. */
|
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; /* Pushed by pusha. */
|
||||||
|
uint32_t gs, fs, es, ds; /* Data segment selector */
|
||||||
uint32_t int_no, err_code; /* Interrupt number and error code (if applicable) */
|
uint32_t int_no, err_code; /* Interrupt number and error code (if applicable) */
|
||||||
uint32_t eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
|
uint32_t eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
|
||||||
} registers_t;
|
} registers_t;
|
||||||
|
|||||||
@ -6,8 +6,8 @@ alltraps:
|
|||||||
pushl %gs
|
pushl %gs
|
||||||
pushal
|
pushal
|
||||||
|
|
||||||
mov $10, %ax
|
//mov $10, %ax
|
||||||
mov %ax, %ds
|
//mov %ax, %ds
|
||||||
|
|
||||||
# Call trap(tf), where tf=%esp
|
# Call trap(tf), where tf=%esp
|
||||||
pushl %esp
|
pushl %esp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user