x86: make LOAD_FROM_32_BIT visible for platforms
This option is useful not only for development, but for the platforms where U-Boot is run from custom ROM bootloader. For example, Intel Edison is that board. Make this option visible that platforms can select it if needed. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
bda40d5634
commit
446d4e048e
|
@ -195,6 +195,14 @@ config SYS_X86_START16
|
||||||
depends on X86_RESET_VECTOR
|
depends on X86_RESET_VECTOR
|
||||||
default 0xfffff800
|
default 0xfffff800
|
||||||
|
|
||||||
|
config X86_LOAD_FROM_32_BIT
|
||||||
|
bool "Boot from a 32-bit program"
|
||||||
|
help
|
||||||
|
Define this to boot U-Boot from a 32-bit program which sets
|
||||||
|
the GDT differently. This can be used to boot directly from
|
||||||
|
any stage of coreboot, for example, bypassing the normal
|
||||||
|
payload-loading feature.
|
||||||
|
|
||||||
config BOARD_ROMSIZE_KB_512
|
config BOARD_ROMSIZE_KB_512
|
||||||
bool
|
bool
|
||||||
config BOARD_ROMSIZE_KB_1024
|
config BOARD_ROMSIZE_KB_1024
|
||||||
|
|
|
@ -18,14 +18,6 @@
|
||||||
#include <generated/generic-asm-offsets.h>
|
#include <generated/generic-asm-offsets.h>
|
||||||
#include <generated/asm-offsets.h>
|
#include <generated/asm-offsets.h>
|
||||||
|
|
||||||
/*
|
|
||||||
* Define this to boot U-Boot from a 32-bit program which sets the GDT
|
|
||||||
* differently. This can be used to boot directly from any stage of coreboot,
|
|
||||||
* for example, bypassing the normal payload-loading feature.
|
|
||||||
* This is only useful for development.
|
|
||||||
*/
|
|
||||||
#undef LOAD_FROM_32_BIT
|
|
||||||
|
|
||||||
.section .text
|
.section .text
|
||||||
.code32
|
.code32
|
||||||
.globl _start
|
.globl _start
|
||||||
|
@ -76,7 +68,7 @@ _start:
|
||||||
/* Save table pointer */
|
/* Save table pointer */
|
||||||
movl %ecx, %esi
|
movl %ecx, %esi
|
||||||
|
|
||||||
#ifdef LOAD_FROM_32_BIT
|
#ifdef CONFIG_X86_LOAD_FROM_32_BIT
|
||||||
lgdt gdt_ptr2
|
lgdt gdt_ptr2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -233,7 +225,7 @@ multiboot_header:
|
||||||
/* entry addr */
|
/* entry addr */
|
||||||
.long CONFIG_SYS_TEXT_BASE
|
.long CONFIG_SYS_TEXT_BASE
|
||||||
|
|
||||||
#ifdef LOAD_FROM_32_BIT
|
#ifdef CONFIG_X86_LOAD_FROM_32_BIT
|
||||||
/*
|
/*
|
||||||
* The following Global Descriptor Table is just enough to get us into
|
* The following Global Descriptor Table is just enough to get us into
|
||||||
* 'Flat Protected Mode' - It will be discarded as soon as the final
|
* 'Flat Protected Mode' - It will be discarded as soon as the final
|
||||||
|
|
Loading…
Reference in New Issue