blob: 680ab2d42a35ee87724bec6064333a90bcc3ca56 [file] [log] [blame]
Martin Rothf6ca89c2023-08-04 12:06:21 -06001## SPDX-License-Identifier: GPL-2.0-only
2
Felix Held2439b2e2023-04-03 19:18:32 +02003all_x86-y += mode_switch.S
Patrick Rudolph3052e9e2023-12-28 07:45:19 +01004all_x86-y += mode_switch2.S
Arthur Heymans597b9e92022-04-19 20:48:42 +02005
Ashish Kumar Mishraecbc2432024-01-16 16:23:03 +05306ifeq ($(CONFIG_USE_1G_PAGETABLES),y)
7PAGETABLE_SRC := pt1G.S
8else
9PAGETABLE_SRC := pt.S
10endif
11
Arthur Heymans597b9e92022-04-19 20:48:42 +020012# Add --defsym=_start=0 to suppress a linker warning.
Ashish Kumar Mishraecbc2432024-01-16 16:23:03 +053013$(objcbfs)/pt: $(dir)/$(PAGETABLE_SRC) $(obj)/config.h
Arthur Heymans597b9e92022-04-19 20:48:42 +020014 $(CC_bootblock) $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -o $@.tmp $< -Wl,--section-start=.rodata=$(CONFIG_ARCH_X86_64_PGTBL_LOC),--defsym=_start=0
15 $(OBJCOPY_ramstage) -Obinary -j .rodata $@.tmp $@
16 rm $@.tmp
17
18cbfs-files-y += pagetables
19pagetables-file := $(objcbfs)/pt
20pagetables-type := raw
21pagetables-compression := none
22pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC)