Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
cpu/x86/lapic/secondary.S: Adapt for x86_64
Adapt the old lapic init code for x86_64.
Change-Id: I5128ed574323025e927137870fb10b23d06bc01d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/lapic/secondary.S 1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/48221/1
diff --git a/src/cpu/x86/lapic/secondary.S b/src/cpu/x86/lapic/secondary.S index 8a44112..c5784cc 100644 --- a/src/cpu/x86/lapic/secondary.S +++ b/src/cpu/x86/lapic/secondary.S @@ -33,7 +33,11 @@ _secondary_gdt_addr: gdtaddr: .word 0 /* the table limit */ +#ifdef __x86_64__ + .quad 0 +#else .long 0 /* we know the offset */ +#endif
_secondary_start_end:
@@ -54,14 +58,22 @@ /* Load the Interrupt descriptor table */ lidt idtarg
+#ifdef __x86_64__ + /* entry64.inc preserves ebx. */ + #include <cpu/x86/64bit/entry64.inc> + mov secondary_stack, %rsp + mov secondary_cpu_index, %rdi +#else /* Set the stack pointer, and flag that we are done */ xorl %eax, %eax movl secondary_stack, %esp + andl $0xfffffff0, %esp sub $12, %esp /* maintain 16-byte alignment for the call below */ movl secondary_cpu_index, %edi pushl %edi movl %eax, secondary_stack +#endif
call secondary_cpu_init 1: hlt
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
Patch Set 3: Code-Review+2
(2 comments)
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... File src/cpu/x86/lapic/secondary.S:
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... PS3, Line 36: __x86_64__ ENV_X86_64
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... PS3, Line 64: secondary_stack Is the stack 16bytes aligned?
Hello build bot (Jenkins), Patrick Rudolph, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48221
to look at the new patch set (#4).
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
cpu/x86/lapic/secondary.S: Adapt for x86_64
Adapt the old lapic init code for x86_64.
Change-Id: I5128ed574323025e927137870fb10b23d06bc01d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/lapic/secondary.S 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/48221/4
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
Patch Set 4:
(2 comments)
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... File src/cpu/x86/lapic/secondary.S:
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... PS3, Line 36: __x86_64__
ENV_X86_64
Done
https://review.coreboot.org/c/coreboot/+/48221/3/src/cpu/x86/lapic/secondary... PS3, Line 64: secondary_stack
Is the stack 16bytes aligned?
Done
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48221/5/src/cpu/x86/lapic/secondary... File src/cpu/x86/lapic/secondary.S:
https://review.coreboot.org/c/coreboot/+/48221/5/src/cpu/x86/lapic/secondary... PS5, Line 61: #ifdef __x86_64__ ENV_X86_64
Hello build bot (Jenkins), Patrick Rudolph, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/48221
to look at the new patch set (#6).
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
cpu/x86/lapic/secondary.S: Adapt for x86_64
Adapt the old lapic init code for x86_64.
Change-Id: I5128ed574323025e927137870fb10b23d06bc01d Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/lapic/secondary.S 1 file changed, 13 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/48221/6
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
Patch Set 6: Code-Review+2
Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48221/5/src/cpu/x86/lapic/secondary... File src/cpu/x86/lapic/secondary.S:
https://review.coreboot.org/c/coreboot/+/48221/5/src/cpu/x86/lapic/secondary... PS5, Line 61: #ifdef __x86_64__
ENV_X86_64
Done
Arthur Heymans has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48221 )
Change subject: cpu/x86/lapic/secondary.S: Adapt for x86_64 ......................................................................
cpu/x86/lapic/secondary.S: Adapt for x86_64
Adapt the old lapic init code for x86_64.
Change-Id: I5128ed574323025e927137870fb10b23d06bc01d Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/48221 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Rudolph siro@das-labor.org --- M src/cpu/x86/lapic/secondary.S 1 file changed, 13 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Rudolph: Looks good to me, approved
diff --git a/src/cpu/x86/lapic/secondary.S b/src/cpu/x86/lapic/secondary.S index 8a44112..073e6b4 100644 --- a/src/cpu/x86/lapic/secondary.S +++ b/src/cpu/x86/lapic/secondary.S @@ -33,7 +33,11 @@ _secondary_gdt_addr: gdtaddr: .word 0 /* the table limit */ +#if ENV_X86_64 + .quad 0 +#else .long 0 /* we know the offset */ +#endif
_secondary_start_end:
@@ -54,14 +58,23 @@ /* Load the Interrupt descriptor table */ lidt idtarg
+#if ENV_X86_64 + /* entry64.inc preserves ebx. */ + #include <cpu/x86/64bit/entry64.inc> + mov secondary_stack, %rsp + andl $0xfffffff0, %esp + mov secondary_cpu_index, %rdi +#else /* Set the stack pointer, and flag that we are done */ xorl %eax, %eax movl secondary_stack, %esp + andl $0xfffffff0, %esp sub $12, %esp /* maintain 16-byte alignment for the call below */ movl secondary_cpu_index, %edi pushl %edi movl %eax, secondary_stack +#endif
call secondary_cpu_init 1: hlt