* [U-Boot] [PATCH v3] x86: make LOAD_FROM_32_BIT visible for platforms
@ 2017-02-05 13:52 Andy Shevchenko
2017-02-06 2:20 ` Bin Meng
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2017-02-05 13:52 UTC (permalink / raw)
To: u-boot
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>
---
- remove 'default n'
- fix spelling in commit message
arch/x86/Kconfig | 8 ++++++++
arch/x86/cpu/start.S | 12 ++----------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 0884af22a7..07d0a6876b 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -109,6 +109,14 @@ config SYS_X86_START16
depends on X86_RESET_VECTOR
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
bool
config BOARD_ROMSIZE_KB_1024
diff --git a/arch/x86/cpu/start.S b/arch/x86/cpu/start.S
index a5cba1cf2a..8de55a0af1 100644
--- a/arch/x86/cpu/start.S
+++ b/arch/x86/cpu/start.S
@@ -18,14 +18,6 @@
#include <generated/generic-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
.code32
.globl _start
@@ -76,7 +68,7 @@ _start:
/* Save table pointer */
movl %ecx, %esi
-#ifdef LOAD_FROM_32_BIT
+#ifdef CONFIG_X86_LOAD_FROM_32_BIT
lgdt gdt_ptr2
#endif
@@ -233,7 +225,7 @@ multiboot_header:
/* entry addr */
.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
* 'Flat Protected Mode' - It will be discarded as soon as the final
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v3] x86: make LOAD_FROM_32_BIT visible for platforms
2017-02-05 13:52 [U-Boot] [PATCH v3] x86: make LOAD_FROM_32_BIT visible for platforms Andy Shevchenko
@ 2017-02-06 2:20 ` Bin Meng
2017-02-07 5:45 ` Bin Meng
0 siblings, 1 reply; 3+ messages in thread
From: Bin Meng @ 2017-02-06 2:20 UTC (permalink / raw)
To: u-boot
On Sun, Feb 5, 2017 at 9:52 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> 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>
> ---
> - remove 'default n'
> - fix spelling in commit message
> arch/x86/Kconfig | 8 ++++++++
> arch/x86/cpu/start.S | 12 ++----------
> 2 files changed, 10 insertions(+), 10 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v3] x86: make LOAD_FROM_32_BIT visible for platforms
2017-02-06 2:20 ` Bin Meng
@ 2017-02-07 5:45 ` Bin Meng
0 siblings, 0 replies; 3+ messages in thread
From: Bin Meng @ 2017-02-07 5:45 UTC (permalink / raw)
To: u-boot
On Mon, Feb 6, 2017 at 10:20 AM, Bin Meng <bmeng.cn@gmail.com> wrote:
> On Sun, Feb 5, 2017 at 9:52 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>> 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>
>> ---
>> - remove 'default n'
>> - fix spelling in commit message
>> arch/x86/Kconfig | 8 ++++++++
>> arch/x86/cpu/start.S | 12 ++----------
>> 2 files changed, 10 insertions(+), 10 deletions(-)
>>
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-07 5:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-05 13:52 [U-Boot] [PATCH v3] x86: make LOAD_FROM_32_BIT visible for platforms Andy Shevchenko
2017-02-06 2:20 ` Bin Meng
2017-02-07 5:45 ` Bin Meng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox