From d352afd079bd1b6361281b9e234cece183b38d5a Mon Sep 17 00:00:00 2001 From: josh Date: Fri, 24 Jul 2009 14:02:11 +0000 Subject: [PATCH] added int_stack_t type in hos_types.h for interrupt stack access git-svn-id: svn://anubis/hos/trunk@65 5b3e749e-e535-0410-8002-a9bb6afbdfca --- kernel/boot/isr.asm | 2 +- kernel/include/hos_types.h | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/kernel/boot/isr.asm b/kernel/boot/isr.asm index 224857d..4c3a8cc 100644 --- a/kernel/boot/isr.asm +++ b/kernel/boot/isr.asm @@ -43,7 +43,7 @@ isr_common: pop es pop ds popa ; edi, esi, ebp, , ebx, edx, ecx, eax - lea esp, [esp+4] + lea esp, [esp+4] ; bypass error code iret diff --git a/kernel/include/hos_types.h b/kernel/include/hos_types.h index 3d7a882..5921615 100644 --- a/kernel/include/hos_types.h +++ b/kernel/include/hos_types.h @@ -15,6 +15,31 @@ typedef signed int s32_t; typedef unsigned long long u64_t; typedef signed long long s64_t; +typedef struct +{ + u32_t gs; + u32_t fs; + u32_t es; + u32_t ds; + + u32_t edi; + u32_t esi; + u32_t ebp; + u32_t esp_junk; /* the esp value saved by 'pusha' */ + u32_t ebx; + u32_t edx; + u32_t ecx; + u32_t eax; + + u32_t error; /* valid on exceptions 8, 10-14 */ + + u32_t eip; + u32_t cs; + u32_t eflags; + u32_t esp; /* present if privilege transition */ + u32_t ss; +} int_stack_t; + #ifdef __cplusplus } #endif