Martin Roth | f6ca89c | 2023-08-04 12:06:21 -0600 | [diff] [blame] | 1 | ## SPDX-License-Identifier: GPL-2.0-only |
| 2 | |
Felix Held | 2439b2e | 2023-04-03 19:18:32 +0200 | [diff] [blame] | 3 | all_x86-y += mode_switch.S |
Patrick Rudolph | 3052e9e | 2023-12-28 07:45:19 +0100 | [diff] [blame] | 4 | all_x86-y += mode_switch2.S |
Arthur Heymans | 597b9e9 | 2022-04-19 20:48:42 +0200 | [diff] [blame] | 5 | |
Bora Guvendik | de37be8 | 2024-03-18 13:38:28 -0700 | [diff] [blame^] | 6 | ifeq ($(CONFIG_USE_1G_PAGES_TLB),y) |
Ashish Kumar Mishra | ecbc243 | 2024-01-16 16:23:03 +0530 | [diff] [blame] | 7 | PAGETABLE_SRC := pt1G.S |
| 8 | else |
| 9 | PAGETABLE_SRC := pt.S |
| 10 | endif |
| 11 | |
Arthur Heymans | 597b9e9 | 2022-04-19 20:48:42 +0200 | [diff] [blame] | 12 | # Add --defsym=_start=0 to suppress a linker warning. |
Ashish Kumar Mishra | ecbc243 | 2024-01-16 16:23:03 +0530 | [diff] [blame] | 13 | $(objcbfs)/pt: $(dir)/$(PAGETABLE_SRC) $(obj)/config.h |
Arthur Heymans | 597b9e9 | 2022-04-19 20:48:42 +0200 | [diff] [blame] | 14 | $(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 | |
| 18 | cbfs-files-y += pagetables |
| 19 | pagetables-file := $(objcbfs)/pt |
| 20 | pagetables-type := raw |
| 21 | pagetables-compression := none |
| 22 | pagetables-COREBOOT-position := $(CONFIG_ARCH_X86_64_PGTBL_LOC) |