Skip to contentSkip to conversation

x86: baytrail: Fix boot hang with a debug build

PATCH New Bin Meng 3 participants 8 messages Jun 1, 2017 – Jun 2, 2017 x86

lore
Share & tools
lore

Bin Meng

author
#0 lore raw

PATCH 1/2 x86: baytrail: Fix boot hang with a debug build

It was observed that when -DDEBUG is used to generate a debug build, U-Boot does not boot on MinnowMax board. A workaround is to disable CONFIG_DEBUG_UART. The real issue is that in order to have the debug uart to work, BayTrail SoC needs to be configured so that its internal uart is available to be used as the debug uart.

---

 arch/x86/cpu/baytrail/Kconfig      | 4 ++++
 arch/x86/cpu/baytrail/early_uart.c | 5 +++++
 2 files changed, 9 insertions(+)
arch/x86/cpu/baytrail/Kconfig +4 -0
index 1c8ac37..6c85186 100644
@@ -17,4 +17,8 @@ config INTERNAL_UART
 	  reason, it is recommended that the UART port be used for
 	  debug purposes only, eg: U-Boot console.
 
+config DEBUG_UART
+	bool
+	select DEBUG_UART_BOARD_INIT
+
 endif
arch/x86/cpu/baytrail/early_uart.c +5 -0
index 471d592..afab21f 100644
@@ -80,3 +80,8 @@ int setup_internal_uart(int enable)
 
 	return 0;
 }
+
+void board_debug_uart_init(void)
+{
+	setup_internal_uart(1);
+}
Signature · 1 line
2.9.2
author
#1 lore raw

PATCH 2/2 x86: fsp: Remove the call to set up internal uart in fsp_init()

First of all, it's inappropriate to call setup_internal_uart() in a generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that is only available on BayTrail platform. Secondly even for BayTrail, there is no need to call setup_internal_uart() at all, as Intel FSP will do this for us.

---

 arch/x86/lib/fsp/fsp_support.c | 4 ----
 1 file changed, 4 deletions(-)
arch/x86/lib/fsp/fsp_support.c +0 -4
index a480361..ab8340c 100644
@@ -110,10 +110,6 @@ void fsp_init(u32 stack_top, u32 boot_mode, void *nvs_buf)
 	struct upd_region *fsp_upd;
 #endif
 
-#ifdef CONFIG_INTERNAL_UART
-	setup_internal_uart(1);
-#endif
-
 	fsp_hdr = find_fsp_header();
 	if (fsp_hdr == NULL) {
 		/* No valid FSP info header was found */
Signature · 1 line
2.9.2
#2 lore raw

PATCH 2/2 x86: fsp: Remove the call to set up internal uart in fsp_init()

Quoted 7 lines · Bin Meng

First of all, it's inappropriate to call setup_internal_uart() in a generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that is only available on BayTrail platform. Secondly even for BayTrail, there is no need to call setup_internal_uart() at all, as Intel FSP will do this for us.

Thanks,
Stefan

#3 lore raw

PATCH 2/2 x86: fsp: Remove the call to set up internal uart in fsp_init()

In reply to Bin Meng
Quoted 6 lines · Bin Meng

First of all, it's inappropriate to call setup_internal_uart() in a generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that is only available on BayTrail platform. Secondly even for BayTrail, there is no need to call setup_internal_uart() at all, as Intel FSP will do this for us.

Quoted 6 lines

---

 arch/x86/lib/fsp/fsp_support.c | 4 ----
 1 file changed, 4 deletions(-)
author
#4 lore raw

PATCH 2/2 x86: fsp: Remove the call to set up internal uart in fsp_init()

Quoted 7 lines · Simon Glass
Quoted 6 lines · Bin Meng

First of all, it's inappropriate to call setup_internal_uart() in a generic API fsp_init(), as CONFIG_INTERNAL_UART is an option that is only available on BayTrail platform. Secondly even for BayTrail, there is no need to call setup_internal_uart() at all, as Intel FSP will do this for us.

Quoted 8 lines
Quoted 6 lines

---

 arch/x86/lib/fsp/fsp_support.c | 4 ----
 1 file changed, 4 deletions(-)

applied to u-boot-x86, thanks!

#5 lore raw

PATCH 1/2 x86: baytrail: Fix boot hang with a debug build

In reply to Bin Meng
Quoted 7 lines · Bin Meng

It was observed that when -DDEBUG is used to generate a debug build, U-Boot does not boot on MinnowMax board. A workaround is to disable CONFIG_DEBUG_UART. The real issue is that in order to have the debug uart to work, BayTrail SoC needs to be configured so that its internal uart is available to be used as the debug uart.

Thanks,
Stefan

#6 lore raw

PATCH 1/2 x86: baytrail: Fix boot hang with a debug build

In reply to Bin Meng
Quoted 6 lines · Bin Meng

It was observed that when -DDEBUG is used to generate a debug build, U-Boot does not boot on MinnowMax board. A workaround is to disable CONFIG_DEBUG_UART. The real issue is that in order to have the debug uart to work, BayTrail SoC needs to be configured so that its internal uart is available to be used as the debug uart.

Quoted 6 lines

---

 arch/x86/cpu/baytrail/Kconfig      | 4 ++++
 arch/x86/cpu/baytrail/early_uart.c | 5 +++++
 2 files changed, 9 insertions(+)

Great!

author
#7 lore raw

PATCH 1/2 x86: baytrail: Fix boot hang with a debug build

Quoted 10 lines · Simon Glass
Quoted 9 lines · Bin Meng

It was observed that when -DDEBUG is used to generate a debug build, U-Boot does not boot on MinnowMax board. A workaround is to disable CONFIG_DEBUG_UART. The real issue is that in order to have the debug uart to work, BayTrail SoC needs to be configured so that its internal uart is available to be used as the debug uart.

---

Quoted 7 lines
Quoted 3 lines
 arch/x86/cpu/baytrail/Kconfig      | 4 ++++
 arch/x86/cpu/baytrail/early_uart.c | 5 +++++
 2 files changed, 9 insertions(+)

Great!

applied to u-boot-x86, thanks!