From 250372de4b0dea25087808a23cadd0bf7c176a59 Mon Sep 17 00:00:00 2001 From: Alexander Myltsev Date: Mon, 21 Nov 2022 00:05:59 +0300 Subject: [PATCH] Fix trap frame layout. --- cpu/isr.h | 2 +- cpu/vectors.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpu/isr.h b/cpu/isr.h index 1175355..de12f30 100644 --- a/cpu/isr.h +++ b/cpu/isr.h @@ -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; diff --git a/cpu/vectors.S b/cpu/vectors.S index 5c9f42e..896264e 100644 --- a/cpu/vectors.S +++ b/cpu/vectors.S @@ -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