Changes in kernel/arch/ia32/include/context_offset.h [dc0b964:7397c73] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/context_offset.h
rdc0b964 r7397c73 27 27 */ 28 28 29 /** @addtogroup ia32 29 /** @addtogroup ia32 30 30 * @{ 31 31 */ … … 36 36 #define KERN_ia32_CONTEXT_OFFSET_H_ 37 37 38 #define OFFSET_SP 0x0039 #define OFFSET_PC 0x0440 #define OFFSET_EBX 0x0841 #define OFFSET_ESI 0x0C42 #define OFFSET_EDI 43 #define OFFSET_EBP 38 #define OFFSET_SP 0x0 39 #define OFFSET_PC 0x4 40 #define OFFSET_EBX 0x8 41 #define OFFSET_ESI 0xC 42 #define OFFSET_EDI 0x10 43 #define OFFSET_EBP 0x14 44 44 45 #ifdef KERNEL 46 #define OFFSET_IPL0x1845 #ifdef KERNEL 46 # define OFFSET_IPL 0x18 47 47 #else 48 #define OFFSET_TLS0x1848 # define OFFSET_TLS 0x18 49 49 #endif 50 50 51 #ifdef __ASM__52 51 53 # ctx: address of the structure with saved context 52 #ifdef __ASM__ 53 54 # ctx: address of the structure with saved context 54 55 # pc: return address 55 56 56 57 .macro CONTEXT_SAVE_ARCH_CORE ctx:req pc:req 57 movl %esp,OFFSET_SP(\ctx) # %esp -> ctx->sp 58 movl %esp,OFFSET_SP(\ctx) # %esp -> ctx->sp 58 59 movl \pc,OFFSET_PC(\ctx) # %eip -> ctx->pc 59 movl %ebx,OFFSET_EBX(\ctx) # %ebx -> ctx->ebx 60 movl %esi,OFFSET_ESI(\ctx) # %esi -> ctx->esi 61 movl %edi,OFFSET_EDI(\ctx) # %edi -> ctx->edi 62 movl %ebp,OFFSET_EBP(\ctx) # %ebp -> ctx->ebp 60 movl %ebx,OFFSET_EBX(\ctx) # %ebx -> ctx->ebx 61 movl %esi,OFFSET_ESI(\ctx) # %esi -> ctx->esi 62 movl %edi,OFFSET_EDI(\ctx) # %edi -> ctx->edi 63 movl %ebp,OFFSET_EBP(\ctx) # %ebp -> ctx->ebp 63 64 .endm 64 65 65 # ctx: address of the structure with saved context 66 # ctx: address of the structure with saved context 66 67 67 68 .macro CONTEXT_RESTORE_ARCH_CORE ctx:req pc:req … … 74 75 .endm 75 76 76 #endif /* __ASM__ */ 77 #endif /* __ASM__ */ 77 78 78 79 #endif … … 80 81 /** @} 81 82 */ 83
Note:
See TracChangeset
for help on using the changeset viewer.