smp: enable smp
This is a very large patch. Don't feel like splitting it up. Deal with it, :P Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
33d6f72cfe
commit
e5b97c2576
19 changed files with 129 additions and 52 deletions
|
|
@ -5,3 +5,4 @@ obj-y += reg.o
|
|||
obj-y += stack.o
|
||||
obj-y += cache.o
|
||||
obj-y += entry.o
|
||||
obj-y += smp.o
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ exception_common:
|
|||
push_all /* pushes 15 registers */
|
||||
mov rdi, [rsp + 120] /* vector: 15 regs up = 120 */
|
||||
mov rsi, [rsp + 128] /* error code we pushed in the macro */
|
||||
mov rdx, [rsp + 136] /* RIP from interrupt frame */
|
||||
|
||||
/* we skip storing the user stack in these interrupt entries because
|
||||
* the iretq frame stores it
|
||||
|
|
|
|||
5
amd64/arch/smp.S
Normal file
5
amd64/arch/smp.S
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
.intel_syntax noprefix
|
||||
|
||||
.section .text
|
||||
.global ap_trampoline
|
||||
|
|
@ -10,3 +10,12 @@ arch_stack_init:
|
|||
mov rbp, rsp
|
||||
push rdx
|
||||
ret
|
||||
|
||||
.global ap_trampoline_2
|
||||
ap_trampoline_2:
|
||||
add rdi, rsi
|
||||
mov rsp, rdi
|
||||
mov rbp, rsp
|
||||
mov rdi, 0
|
||||
mov rsi, rdx
|
||||
jmp ap_init
|
||||
|
|
|
|||
Loading…
Reference in a new issue