diff options
author | Richard Braun <rbraun@sceen.net> | 2012-11-09 21:35:49 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2012-11-09 21:40:52 +0100 |
commit | 79b5932c4eea229fca427bc93ba491ffecef10f5 (patch) | |
tree | bf1165e7fa7c2f6232fd8c1e8b6c148b329b42f7 /arch/x86/machine/trap_asm.S | |
parent | c8ba9280fafe518ada8a6d2a545d6afa2b2dbe23 (diff) |
Implement preliminary thread context
Three new modules are added :
- kern/task: Tasks are thread groups and resource containers for their
threads.
- kern/thread: The well known scheduling unit.
- x86/tcb: The architecture specific thread control block.
The kernel currently loads a single thread context on the main processor.
Diffstat (limited to 'arch/x86/machine/trap_asm.S')
-rw-r--r-- | arch/x86/machine/trap_asm.S | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/machine/trap_asm.S b/arch/x86/machine/trap_asm.S index 29c12f41..55ac669f 100644 --- a/arch/x86/machine/trap_asm.S +++ b/arch/x86/machine/trap_asm.S @@ -77,6 +77,13 @@ ASM_ENTRY(trap_isr_ ## name) \ iretq; \ ASM_END(trap_isr_ ## name) +ASM_ENTRY(trap_load) + movq %rdi, %rsp + TRAP_POP_REGISTERS + addq $16, %rsp + iretq +ASM_END(trap_load) + #else /* __LP64__ */ #define TRAP_PUSH_REGISTERS \ @@ -103,7 +110,7 @@ ASM_END(trap_isr_ ## name) popl %ds; \ popl %es; \ popl %fs; \ - popl %gs; \ + popl %gs #define TRAP(vector, name) \ ASM_ENTRY(trap_isr_ ## name) \ @@ -130,6 +137,13 @@ ASM_ENTRY(trap_isr_ ## name) \ iret; \ ASM_END(trap_isr_ ## name) +ASM_ENTRY(trap_load) + movl 4(%esp), %esp + TRAP_POP_REGISTERS + addl $8, %esp + iret +ASM_END(trap_load) + #endif /* __LP64__ */ .text |