diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2021-07-05 21:18:50 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-02-08 13:11:59 +0000 |
commit | 3edf840ad15154d38769c0115811906284762b11 (patch) | |
tree | 02b55264c698b3c0fb1422f41ceecf6424a0ae20 /src/cpu/x86/64bit/entry64.inc | |
parent | cdea508a024376c79c8cf29648ba174867eb2750 (diff) |
cpu/x86/64bit: Turn jumping to long mode into a macro
This makes it easier to reuse, e.g. if you want to do it twice in one
assembly file.
Change-Id: Ida861338004187e4e714be41e17c8447fa4cf935
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79261
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/cpu/x86/64bit/entry64.inc')
-rw-r--r-- | src/cpu/x86/64bit/entry64.inc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cpu/x86/64bit/entry64.inc b/src/cpu/x86/64bit/entry64.inc index 7da68b47f9..878f310843 100644 --- a/src/cpu/x86/64bit/entry64.inc +++ b/src/cpu/x86/64bit/entry64.inc @@ -22,10 +22,9 @@ #include <arch/rom_segs.h> #endif - -setup_longmode: +.macro setup_longmode page_table /* Get page table address */ - movl $(CONFIG_ARCH_X86_64_PGTBL_LOC), %eax + movl \page_table, %eax /* load identity mapped page tables */ movl %eax, %cr3 @@ -48,12 +47,13 @@ setup_longmode: /* use long jump to switch to 64-bit code segment */ #if defined(__RAMSTAGE__) - ljmp $RAM_CODE_SEG64, $__longmode_start + ljmp $RAM_CODE_SEG64, $jmp_addr\@ #else - ljmp $ROM_CODE_SEG64, $__longmode_start + ljmp $ROM_CODE_SEG64, $jmp_addr\@ #endif .code64 -__longmode_start: +jmp_addr\@: +.endm #endif |