summaryrefslogtreecommitdiff
path: root/src/cpu/x86/64bit/Makefile.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/x86/64bit/Makefile.mk')
-rw-r--r--src/cpu/x86/64bit/Makefile.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cpu/x86/64bit/Makefile.mk b/src/cpu/x86/64bit/Makefile.mk
new file mode 100644
index 0000000000..24a5a966fb
--- /dev/null
+++ b/src/cpu/x86/64bit/Makefile.mk
@@ -0,0 +1,16 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+all_x86-y += mode_switch.S
+all_x86-y += mode_switch2.S
+
+# Add --defsym=_start=0 to suppress a linker warning.
+$(objcbfs)/pt: $(dir)/pt.S $(obj)/config.h
+ $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0
+ $(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@
+ rm $@.tmp
+
+cbfs-files-y += pagetables
+pagetables-file := $(objcbfs)/pt
+pagetables-type := raw
+pagetables-compression := none
+pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC)