Skip to contentSkip to conversation

x86: make LOAD_FROM_32_BIT visible for platforms

PATCH Superseded Andy Shevchenko 3 participants 3 messages Jan 21, 2017 – Jan 23, 2017 x86

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: make LOAD_FROM_32_BIT visible for platforms

This option 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.

---
 arch/x86/Kconfig     | 4 ++++
 arch/x86/cpu/start.S | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/x86/Kconfig +4 -0
index 0884af22a7..d75ad61d99 100644
@@ -89,6 +89,10 @@ config X86_RESET_VECTOR
 	bool
 	default n
 
+config X86_LOAD_FROM_32_BIT
+	bool
+	default n
+
 config RESET_SEG_START
 	hex
 	depends on X86_RESET_VECTOR
arch/x86/cpu/start.S +1 -2
index a5cba1cf2a..eb4ade6f8c 100644
@@ -22,9 +22,8 @@
  * 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
+#define LOAD_FROM_32_BIT CONFIG_X86_LOAD_FROM_32_BIT
 
 .section .text
 .code32
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 x86: make LOAD_FROM_32_BIT visible for platforms

Quoted 9 lines · Andy Shevchenko

This option 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.

arch/x86/cpu/start.S line 26

Quoted 7 lines
arch/x86/cpu/start.S +1 -2
@@ -22,9 +22,8 @@
  * 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
+#define LOAD_FROM_32_BIT CONFIG_X86_LOAD_FROM_32_BIT

Oops, given one more thought, it should be a bit more verbose

I will fix this later. Any other comments I need to address?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw

PATCH 1/1 x86: make LOAD_FROM_32_BIT visible for platforms

In reply to Andy Shevchenko

Hi Andy,

Quoted 17 lines · Andy Shevchenko

This option 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.

---
 arch/x86/Kconfig     | 4 ++++
 arch/x86/cpu/start.S | 3 +--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/x86/Kconfig +0 -0
index 0884af22a7..d75ad61d99 100644

arch/x86/Kconfig config X86_RESET_VECTOR · line 93

Quoted 5 lines
arch/x86/Kconfig +2 -0
@@ -89,6 +89,10 @@ config X86_RESET_VECTOR
        bool
        default n
 
+config X86_LOAD_FROM_32_BIT
+       bool

Can we add some help text (ie: the comment block below for the LOAD_FROM_32_BIT in start.S) to this option so that it is visible in "make menuconfig"?

Quoted 10 lines
arch/x86/Kconfig +2 -0
+       default n
+
 config RESET_SEG_START
        hex
        depends on X86_RESET_VECTOR
arch/x86/cpu/start.S +0 -0
index a5cba1cf2a..eb4ade6f8c 100644

arch/x86/cpu/start.S line 26

Quoted 7 lines
arch/x86/cpu/start.S +1 -2
@@ -22,9 +22,8 @@
  * 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
+#define LOAD_FROM_32_BIT CONFIG_X86_LOAD_FROM_32_BIT

Instead of #defining LOAD_FROM_32_BIT, can we directly use CONFIG_X86_LOAD_FROM_32_BIT in this file?

Regards,
Bin