Commit 5b5ece9ef4ac1a859179b894c3067e2841d76472
Committed by
Simon Glass
1 parent
420a2ca73f
Exists in
master
and in
54 other branches
x86: Allow compiling out realmode/bios code
We don't want this for coreboot, so provide a way of compiling it out. Signed-off-by: Gabe Black <gabeblack@chromium.org> Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Showing 4 changed files with 16 additions and 5 deletions Side-by-side Diff
README
... | ... | @@ -3668,6 +3668,12 @@ |
3668 | 3668 | If defined, the x86 reset vector code is excluded. You will need |
3669 | 3669 | to do this when U-Boot is running from Coreboot. |
3670 | 3670 | |
3671 | +- CONFIG_X86_NO_REAL_MODE | |
3672 | + If defined, x86 real mode code is omitted. This assumes a | |
3673 | + 32-bit environment where such code is not needed. You will | |
3674 | + need to do this when U-Boot is running from Coreboot. | |
3675 | + | |
3676 | + | |
3671 | 3677 | Freescale QE/FMAN Firmware Support: |
3672 | 3678 | ----------------------------------- |
3673 | 3679 |
arch/x86/lib/Makefile
... | ... | @@ -25,11 +25,16 @@ |
25 | 25 | |
26 | 26 | LIB = $(obj)lib$(ARCH).o |
27 | 27 | |
28 | +ifeq ($(CONFIG_X86_NO_REAL_MODE),) | |
28 | 29 | SOBJS-$(CONFIG_SYS_PC_BIOS) += bios.o |
29 | 30 | SOBJS-$(CONFIG_SYS_PCI_BIOS) += bios_pci.o |
30 | -SOBJS-$(CONFIG_SYS_X86_REALMODE) += realmode_switch.o | |
31 | +COBJS-y += realmode.o | |
32 | +SOBJS-y += realmode_switch.o | |
31 | 33 | |
32 | 34 | COBJS-$(CONFIG_SYS_PC_BIOS) += bios_setup.o |
35 | +COBJS-$(CONFIG_VIDEO) += video_bios.o | |
36 | +endif | |
37 | + | |
33 | 38 | COBJS-y += board.o |
34 | 39 | COBJS-y += bootm.o |
35 | 40 | COBJS-y += cmd_boot.o |
36 | 41 | |
... | ... | @@ -41,11 +46,9 @@ |
41 | 46 | COBJS-$(CONFIG_SYS_GENERIC_TIMER) += pcat_timer.o |
42 | 47 | COBJS-$(CONFIG_PCI) += pci.o |
43 | 48 | COBJS-$(CONFIG_PCI) += pci_type1.o |
44 | -COBJS-$(CONFIG_SYS_X86_REALMODE) += realmode.o | |
45 | 49 | COBJS-y += relocate.o |
46 | 50 | COBJS-y += string.o |
47 | 51 | COBJS-$(CONFIG_SYS_X86_ISR_TIMER) += timer.o |
48 | -COBJS-$(CONFIG_VIDEO) += video_bios.o | |
49 | 52 | COBJS-$(CONFIG_VIDEO) += video.o |
50 | 53 | COBJS-$(CONFIG_CMD_ZBOOT) += zimage.o |
51 | 54 |
arch/x86/lib/video.c
arch/x86/lib/zimage.c
... | ... | @@ -171,7 +171,7 @@ |
171 | 171 | else |
172 | 172 | *load_address = (void *)ZIMAGE_LOAD_ADDR; |
173 | 173 | |
174 | -#if defined CONFIG_ZBOOT_32 | |
174 | +#if (defined CONFIG_ZBOOT_32 || defined CONFIG_X86_NO_REAL_MODE) | |
175 | 175 | printf("Building boot_params at 0x%8.8lx\n", (ulong)setup_base); |
176 | 176 | memset(setup_base, 0, sizeof(*setup_base)); |
177 | 177 | setup_base->hdr = params->hdr; |
... | ... | @@ -237,7 +237,7 @@ |
237 | 237 | struct setup_header *hdr = &setup_base->hdr; |
238 | 238 | int bootproto = get_boot_protocol(hdr); |
239 | 239 | |
240 | -#if defined CONFIG_ZBOOT_32 | |
240 | +#if (defined CONFIG_ZBOOT_32 || defined CONFIG_X86_NO_REAL_MODE) | |
241 | 241 | setup_base->e820_entries = install_e820_map( |
242 | 242 | ARRAY_SIZE(setup_base->e820_map), setup_base->e820_map); |
243 | 243 | #endif |