Skip to contentSkip to conversation

x86: Fix up some bootstage problems

PATCH New Simon Glass 2 participants 18 messages Sep 2, 2018 – Oct 7, 2018

lore
Share & tools
lore
#0 lore raw

cover x86: Fix up some bootstage problems

There is a subtle problem with bootstage on x86. This series aims to fix it so that it can be re-enabled on x86.

Simon Glass (4):
Enable CONFIG_TIMER_EARLY with bootstage
chromebook_samus: Increase pre-relocation memory
binman: Add support for Intel reference code Revert "x86: galileo: Fix boot failure"

 configs/chromebook_samus_defconfig  |  2 +-
 configs/galileo_defconfig           |  3 +++
 drivers/timer/Kconfig               |  3 +++
 tools/binman/etype/intel_refcode.py | 27 +++++++++++++++++++++++++++
 4 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 tools/binman/etype/intel_refcode.py
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog
#1 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f() to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +3 -0
index 5ab6749193c..ff434de6f7c 100644
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
 	bool "Allow timer to be used early in U-Boot"
 	depends on TIMER
+	# initr_bootstage() requires a timer and is called before initr_dm()
+	# so only the early timer is available
+	default y if X86 && BOOTSTAGE
 	help
 	  In some cases the timer must be accessible before driver model is
 	  active. Examples include when using CONFIG_TRACE to trace U-Boot's
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog
#2 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

config BOOTSTAGE
select TIMER_EARLY

drivers/timer/Kconfig config TPL_TIMER

Quoted 4 lines
drivers/timer/Kconfig +0 -1
        help
          In some cases the timer must be accessible before driver model is
          active. Examples include when using CONFIG_TRACE to trace U-Boot's
--

Regards,
Bin

#3 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Hi Bin,

Quoted 56 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

Quoted 2 lines

config BOOTSTAGE
select TIMER_EARLY

Well we could, but I suspect that would break things since the early timer is not supported by many boards. Also for most boards this doesn't actually work fine. x86 is really quite awful in that it has no SRAM and the CAR becomes inaccessible as soon as you turn on the cache!

Regards,
Simon

#4 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Hi Simon,

Quoted 60 lines · Simon Glass

Hi Bin,

Quoted 56 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

Quoted 8 lines
Quoted 2 lines

config BOOTSTAGE
select TIMER_EARLY

Well we could, but I suspect that would break things since the early timer is not supported by many boards. Also for most boards this doesn't actually work fine. x86 is really quite awful in that it has no SRAM and the CAR becomes inaccessible as soon as you turn on the cache!

It's true that early timer is supported by some limited boards, but that's a different issue. For now that patch does not fix anything. If we add BOOTSTAGE from either defconfig or 'menuconfig' for a board, without adding TIMER_EARLY, it will for sure break.

Regards,
Bin

#5 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Hi Bin,

Quoted 72 lines · Bin Meng

Hi Simon,

Quoted 60 lines · Simon Glass

Hi Bin,

Quoted 56 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

Quoted 8 lines
Quoted 2 lines

config BOOTSTAGE
select TIMER_EARLY

Well we could, but I suspect that would break things since the early timer is not supported by many boards. Also for most boards this doesn't actually work fine. x86 is really quite awful in that it has no SRAM and the CAR becomes inaccessible as soon as you turn on the cache!

Quoted 4 lines

It's true that early timer is supported by some limited boards, but that's a different issue. For now that patch does not fix anything. If we add BOOTSTAGE from either defconfig or 'menuconfig' for a board, without adding TIMER_EARLY, it will for sure break.

Is this because of code called in board_f.c ? I don't quite follow.

Regards,
Simon

#6 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Hi Simon,

Quoted 76 lines · Simon Glass

Hi Bin,

Quoted 72 lines · Bin Meng

Hi Simon,

Quoted 68 lines · Simon Glass

Hi Bin,

Quoted 56 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

Quoted 2 lines

config BOOTSTAGE
select TIMER_EARLY

Well we could, but I suspect that would break things since the early timer is not supported by many boards. Also for most boards this doesn't actually work fine. x86 is really quite awful in that it has no SRAM and the CAR becomes inaccessible as soon as you turn on the cache!

Quoted 6 lines
Quoted 4 lines

It's true that early timer is supported by some limited boards, but that's a different issue. For now that patch does not fix anything. If we add BOOTSTAGE from either defconfig or 'menuconfig' for a board, without adding TIMER_EARLY, it will for sure break.

Is this because of code called in board_f.c ? I don't quite follow.

I re-read the codes and your comments. I think what you said below:

"Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly."

makes sense. So adding 'select TIMER_EARLY' to BOOTSTAGE seems over-killing things. Let's use your approach.

Regards,
Bin

#7 lore raw

PATCH 1/4 Enable CONFIG_TIMER_EARLY with bootstage

Quoted 89 lines · Bin Meng

Hi Simon,

Quoted 76 lines · Simon Glass

Hi Bin,

Quoted 72 lines · Bin Meng

Hi Simon,

Quoted 68 lines · Simon Glass

Hi Bin,

Quoted 56 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

In initr_bootstage() we call bootstage_mark_name() which ends up calling timer_get_us(). This call happens before initr_dm(), which inits driver model.

On x86 we set gd->timer to NULL in the transition from board_init_f()

It's not just x86 we set gd->timer to NULL. It applied to all architectures when CONFIG_TIMER is on.

Quoted 33 lines

to board_init_r(). See board_init_f_r() for this assignment. So U-Boot knows there is no timer available in the period immediately after relocation.

On x86 the timer_get_us() call is implemented as calls to get_ticks() and get_tbclk(). Both of these call dm_timer_init() to set up the timer, if gd->timer is NULL and the early timer is not available.

However dm_timer_init() cannot succeed before initr_dm() is called.

So it seems that on x86 if we want to use CONFIG_BOOTSTAGE we must enable CONFIG_TIMER_EARLY. Update the Kconfig to handle this.

Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly. Admittedly this is not strictly correct since the timer device is set up by pre-relocation U-Boot, but normally this is fine. On x86 the 'CAR' (cache-as-RAM) memory used by pre-relocation U-Boot disappears in board_init_f_r() and any attempt to access it will hang. This is the reason why we must mark the timer as invalid when we get to board_init_f_r().

---

 drivers/timer/Kconfig | 3 +++
 1 file changed, 3 insertions(+)
drivers/timer/Kconfig +0 -0
index 5ab6749193c..ff434de6f7c 100644

drivers/timer/Kconfig config TPL_TIMER · line 35

Quoted 6 lines
drivers/timer/Kconfig +3 -0
@@ -30,6 +30,9 @@ config TPL_TIMER
 config TIMER_EARLY
        bool "Allow timer to be used early in U-Boot"
        depends on TIMER
+       # initr_bootstage() requires a timer and is called before initr_dm()
+       # so only the early timer is available
+       default y if X86 && BOOTSTAGE

Since this applies not only on x86, and given without TIMER_EARLY BOOTSTAGE is broken, shouldn't we do this in BOOTSTAGE config instead:

Quoted 2 lines

config BOOTSTAGE
select TIMER_EARLY

Well we could, but I suspect that would break things since the early timer is not supported by many boards. Also for most boards this doesn't actually work fine. x86 is really quite awful in that it has no SRAM and the CAR becomes inaccessible as soon as you turn on the cache!

Quoted 6 lines
Quoted 4 lines

It's true that early timer is supported by some limited boards, but that's a different issue. For now that patch does not fix anything. If we add BOOTSTAGE from either defconfig or 'menuconfig' for a board, without adding TIMER_EARLY, it will for sure break.

Is this because of code called in board_f.c ? I don't quite follow.

I re-read the codes and your comments. I think what you said below:

Quoted 8 lines

"Note: On most architectures we can rely on the pre-relocation memory still being available, so that gd->timer pointers to a valid timer device and everything works correctly."

makes sense. So adding 'select TIMER_EARLY' to BOOTSTAGE seems over-killing things. Let's use your approach.

applied to u-boot-x86, thanks!

#8 lore raw

PATCH 2/4 chromebook_samus: Increase pre-relocation memory

In reply to Simon Glass

With bootstage now allocating pre-relocation memory the current amount available is insufficient. Increase it a little.

---

 configs/chromebook_samus_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/chromebook_samus_defconfig +1 -1
index e4c51f84d9f..cbfc6f05785 100644
@@ -1,6 +1,6 @@
 CONFIG_X86=y
 CONFIG_SYS_TEXT_BASE=0xFFE00000
-CONFIG_SYS_MALLOC_F_LEN=0x1800
+CONFIG_SYS_MALLOC_F_LEN=0x1a00
 CONFIG_DEBUG_UART_BOARD_INIT=y
 CONFIG_DEBUG_UART_BASE=0x3f8
 CONFIG_DEBUG_UART_CLOCK=1843200
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog
#9 lore raw

PATCH 2/4 chromebook_samus: Increase pre-relocation memory

Quoted 10 lines · Simon Glass

With bootstage now allocating pre-relocation memory the current amount available is insufficient. Increase it a little.

---

 configs/chromebook_samus_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#10 lore raw

PATCH 2/4 chromebook_samus: Increase pre-relocation memory

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

With bootstage now allocating pre-relocation memory the current amount available is insufficient. Increase it a little.

Quoted 8 lines
Quoted 6 lines

---

 configs/chromebook_samus_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

applied to u-boot-x86, thanks!

#11 lore raw

PATCH 3/4 binman: Add support for Intel reference code

In reply to Simon Glass

Some platforms use this instead of FSP to set up the platform, including memory. Add support for this in binman. This is needed for chromebook_samus, for example.

---

 tools/binman/etype/intel_refcode.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tools/binman/etype/intel_refcode.py
tools/binman/etype/intel_refcode.py new file +27 -0
new file mode 100644
index 00000000000..045db589d17
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Memory Reference Code binary blob
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_intel_refcode(Entry_blob):
+    """Entry containing an Intel Reference Code file
+
+    Properties / Entry arguments:
+        - filename: Filename of file to read into entry
+
+    This file contains code for setting up the platform on some Intel systems.
+    This is executed by U-Boot when needed early during startup. A typical
+    filename is 'refcode.bin'.
+
+    See README.x86 for information about x86 binary blobs.
+    """
+    def __init__(self, section, etype, node):
+        Entry_blob.__init__(self, section, etype, node)
+
+    def GetDefaultFilename(self):
+        return 'refcode.bin'
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog
#12 lore raw

PATCH 3/4 binman: Add support for Intel reference code

Quoted 5 lines · Simon Glass

Some platforms use this instead of FSP to set up the platform, including memory. Add support for this in binman. This is needed for chromebook_samus, for example.

Quoted 7 lines

---

 tools/binman/etype/intel_refcode.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tools/binman/etype/intel_refcode.py

Although I was a bit surprised that we missed this before.

#13 lore raw

PATCH 3/4 binman: Add support for Intel reference code

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

Some platforms use this instead of FSP to set up the platform, including memory. Add support for this in binman. This is needed for chromebook_samus, for example.

---

Quoted 8 lines
Quoted 4 lines
 tools/binman/etype/intel_refcode.py | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 tools/binman/etype/intel_refcode.py

Although I was a bit surprised that we missed this before.

applied to u-boot-x86, thanks!

#14 lore raw

PATCH 4/4 Revert "x86: galileo: Fix boot failure"

In reply to Simon Glass

The root cause of this problem should now be fixed. Renable bootstage.

(Note, if this does not fix it, and instead a -ENOMEM error is produced, then we probably need to increase CONFIG_SYS_MALLOC_F_LEN a bit).

This reverts commit 7995dd3782f90e1939969a4ead800a5e98e2d197.

---

 configs/galileo_defconfig | 3 +++
 1 file changed, 3 insertions(+)
configs/galileo_defconfig +3 -0
index 63973028a71..9c58fa3a1af 100644
@@ -8,6 +8,8 @@ CONFIG_GENERATE_MP_TABLE=y
 CONFIG_GENERATE_ACPI_TABLE=y
 CONFIG_NR_DRAM_BANKS=8
 CONFIG_FIT=y
+CONFIG_BOOTSTAGE=y
+CONFIG_BOOTSTAGE_REPORT=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
@@ -27,6 +29,7 @@ CONFIG_CMD_DHCP=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_PING=y
 CONFIG_CMD_TIME=y
+CONFIG_CMD_BOOTSTAGE=y
 CONFIG_CMD_EXT2=y
 CONFIG_CMD_EXT4=y
 CONFIG_CMD_EXT4_WRITE=y
Signature · 1 line
2.19.0.rc1.350.ge57e33dbd1-goog
#15 lore raw

PATCH 4/4 Revert "x86: galileo: Fix boot failure"

Hi Simon,

Quoted 6 lines · Simon Glass

The root cause of this problem should now be fixed. Renable bootstage.

(Note, if this does not fix it, and instead a -ENOMEM error is produced, then we probably need to increase CONFIG_SYS_MALLOC_F_LEN a bit).

Quoted 8 lines

This reverts commit 7995dd3782f90e1939969a4ead800a5e98e2d197.

---

 configs/galileo_defconfig | 3 +++
 1 file changed, 3 insertions(+)

I think this breaks Galileo, though I do not have a board to test right now.

If you look at galileo.dts, it explicitly describes TSC frequency in the DT, but current TSC timer early support codes does not support reading TSC frequency in the DT. Maybe we need a config option for such hardware that can't calibrate TSC frequency?

Regards,
Bin

#16 lore raw

PATCH 4/4 Revert "x86: galileo: Fix boot failure"

Hi Bin,

Quoted 18 lines · Bin Meng

Hi Simon,

Quoted 6 lines · Simon Glass

The root cause of this problem should now be fixed. Renable bootstage.

(Note, if this does not fix it, and instead a -ENOMEM error is produced, then we probably need to increase CONFIG_SYS_MALLOC_F_LEN a bit).

Quoted 8 lines

This reverts commit 7995dd3782f90e1939969a4ead800a5e98e2d197.

---

 configs/galileo_defconfig | 3 +++
 1 file changed, 3 insertions(+)
Quoted 6 lines

I think this breaks Galileo, though I do not have a board to test right now.

If you look at galileo.dts, it explicitly describes TSC frequency in the DT, but current TSC timer early support codes does not support reading TSC frequency in the DT. Maybe we need a config option for such hardware that can't calibrate TSC frequency?

Yes we could. Until then perhaps we can park this patch.

Regards,
Simon

#17 lore raw

PATCH 4/4 Revert "x86: galileo: Fix boot failure"

Hi Simon,

Quoted 22 lines · Simon Glass

Hi Bin,

Quoted 18 lines · Bin Meng

Hi Simon,

Quoted 14 lines · Simon Glass

The root cause of this problem should now be fixed. Renable bootstage.

(Note, if this does not fix it, and instead a -ENOMEM error is produced, then we probably need to increase CONFIG_SYS_MALLOC_F_LEN a bit).

This reverts commit 7995dd3782f90e1939969a4ead800a5e98e2d197.

---

 configs/galileo_defconfig | 3 +++
 1 file changed, 3 insertions(+)
Quoted 8 lines
Quoted 6 lines

I think this breaks Galileo, though I do not have a board to test right now.

If you look at galileo.dts, it explicitly describes TSC frequency in the DT, but current TSC timer early support codes does not support reading TSC frequency in the DT. Maybe we need a config option for such hardware that can't calibrate TSC frequency?

Yes we could. Until then perhaps we can park this patch.

Thanks. Then I will apply patch 2 and 3 in this series.

Regards,
Bin