Skip to contentSkip to conversation

x86: Allow setup code to manage its own global data

PATCH New Simon Glass 2 participants 4 messages Apr 15, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 x86: Allow setup code to manage its own global data

Currently x86 has its own means of managing the global data and board data (bd_t), and this code resides in start.S. With generic board, we need to ensure that we leave this alone - i.e. don't clear it as we do on other archs.

This fixes a problem where the memory init data is cleared which causes the video driver to operate very slowly.

---
 common/board_f.c | 2 +-
 common/board_r.c | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
common/board_f.c +1 -1
index 32d5215..00ca811 100644
@@ -755,7 +755,7 @@ static int mark_bootstage(void)
 static init_fnc_t init_sequence_f[] = {
 #if !defined(CONFIG_CPM2) && !defined(CONFIG_MPC512X) && \
 		!defined(CONFIG_MPC83xx) && !defined(CONFIG_MPC85xx) && \
-		!defined(CONFIG_MPC86xx)
+		!defined(CONFIG_MPC86xx) && !defined(CONFIG_X86)
 	zero_global_data,
 #endif
 	setup_fdt,
common/board_r.c +0 -3
index 9605f80..2b17fa6 100644
@@ -722,9 +722,6 @@ init_fnc_t init_sequence_r[] = {
 #ifdef CONFIG_CLOCKS
 	set_cpu_clk_info, /* Setup clock information */
 #endif
-#ifdef CONFIG_X86
-	init_bd_struct_r,
-#endif
 	initr_reloc_global_data,
 	initr_serial,
 	initr_announce,
Signature · 1 line
1.8.1.3
#1 lore raw

PATCH 3/3 x86: config: Init PCI before SPI

Since the ICH SPI controller uses PCI, we must ensure that PCI is available before it is inited.

This fixes the current "ICH SPI: Cannot find device" message on boot.

---
 include/configs/coreboot.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/coreboot.h +1 -0
index a4aa8f7..5bacc77 100644
@@ -41,6 +41,7 @@
 #define CONFIG_INTEL_CORE_ARCH	/* Sandy bridge and ivy bridge chipsets. */
 #define CONFIG_ZBOOT_32
 #define CONFIG_PHYSMEM
+#define CONFIG_SYS_EARLY_PCI_INIT
 
 #define CONFIG_LMB
 #define CONFIG_OF_LIBFDT
Signature · 1 line
1.8.1.3
#2 lore raw

PATCH 3/3 x86: config: Init PCI before SPI

Hi Simon,

Quoted 5 lines · Simon Glass

Since the ICH SPI controller uses PCI, we must ensure that PCI is available before it is inited.

This fixes the current "ICH SPI: Cannot find device" message on boot.

Hmm, if only my new init sequence code had gained wider acceptance ;)

It would have been a simple case of specifying PCI as a pre-req and the init sequence would have been re-ordered to suit (or thrown a compile error to say the sequence was impossible to build)

Regards,

Graeme

Quoted 21 lines
---
 include/configs/coreboot.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/coreboot.h +1 -1
index a4aa8f7..5bacc77 100644
@@ -41,6 +41,7 @@
 #define CONFIG_INTEL_CORE_ARCH /* Sandy bridge and ivy bridge chipsets. */
 #define CONFIG_ZBOOT_32
 #define CONFIG_PHYSMEM
+#define CONFIG_SYS_EARLY_PCI_INIT
 
 #define CONFIG_LMB
 #define CONFIG_OF_LIBFDT
--

1.8.1.3

#3 lore raw

PATCH 3/3 x86: config: Init PCI before SPI

Hi Graeme,

Quoted 8 lines · Graeme Russ

Hi Simon,

Quoted 5 lines · Simon Glass

Since the ICH SPI controller uses PCI, we must ensure that PCI is available
before it is inited.

Quoted 8 lines
Quoted 1 line

This fixes the current "ICH SPI: Cannot find device" message on boot.

Hmm, if only my new init sequence code had gained wider acceptance ;)

It would have been a simple case of specifying PCI as a pre-req and the init sequence would have been re-ordered to suit (or thrown a compile error to say the sequence was impossible to build)

Yes indeed. Generic board is in now - are you going to have another crack at it? Personally I feel that it might be better to do it after we get driver model in.

Regards,
Simon

Quoted 28 lines

Regards,

Graeme

Quoted 22 lines
---
 include/configs/coreboot.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/coreboot.h +1 -0
index a4aa8f7..5bacc77 100644
@@ -41,6 +41,7 @@
 #define CONFIG_INTEL_CORE_ARCH /* Sandy bridge and ivy bridge chipsets.
 */
 #define CONFIG_ZBOOT_32
 #define CONFIG_PHYSMEM
+#define CONFIG_SYS_EARLY_PCI_INIT
 
 #define CONFIG_LMB

#define CONFIG_OF_LIBFDT
--
1.8.1.3