Fix trap frame layout.

This commit is contained in:
Alexander Myltsev 2022-11-21 00:05:59 +03:00
parent e4fcd27e31
commit 250372de4b
2 changed files with 3 additions and 3 deletions

View File

@ -28,8 +28,8 @@ enum {
* - `push eax` whose lower 16-bits contain DS
*/
typedef struct {
uint32_t ds; /* Data segment selector */
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 eip, cs, eflags, useresp, ss; /* Pushed by the processor automatically */
} registers_t;

View File

@ -6,8 +6,8 @@ alltraps:
pushl %gs
pushal
mov $10, %ax
mov %ax, %ds
//mov $10, %ax
//mov %ax, %ds
# Call trap(tf), where tf=%esp
pushl %esp