Martin Roth (gaumless(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6364
-gerrit
commit 94f1f5555bbb600390084c2db92eddf3779988c7
Author: Martin Roth <martin.roth(a)se-eng.com>
Date: Fri Jul 25 14:39:05 2014 -0600
payloads/external/SeaBIOS: Allow setting buffers below 0xC0000
Add the option to coreboot to set the SeaBIOS buffers below 0xC0000.
This is an absolute requirement on the upcoming Intel Rangeley
processor because it is designed so that only the processor can write
the higher memory areas. This prevents USB from bus-mastering into
the buffers when they're set in the typical 0xE0000 area.
Change-Id: I15638605d1c66a2277d4b852796db89978551a34
Signed-off-by: Martin Roth <martin.roth(a)se-eng.com>
---
payloads/external/SeaBIOS/Makefile.inc | 3 +++
src/Kconfig | 15 +++++++++++++++
src/arch/x86/Makefile.inc | 1 +
3 files changed, 19 insertions(+)
diff --git a/payloads/external/SeaBIOS/Makefile.inc b/payloads/external/SeaBIOS/Makefile.inc
index 21f933a..03e2b08 100644
--- a/payloads/external/SeaBIOS/Makefile.inc
+++ b/payloads/external/SeaBIOS/Makefile.inc
@@ -31,6 +31,9 @@ ifeq ($(CONFIG_CONSOLE_SERIAL),y)
else
echo "# CONFIG_DEBUG_SERIAL is not set" >> $(OUT)/seabios/.config
endif
+ifneq ($(CONFIG_SEABIOS_MALLOC_UPPERMEMORY),y)
+ echo "# CONFIG_MALLOC_UPPERMEMORY is not set" >> $(OUT)/seabios/.config
+endif
ifneq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
echo "# CONFIG_THREAD_OPTIONROMS is not set" >> $(OUT)/seabios/.config
endif
diff --git a/src/Kconfig b/src/Kconfig
index af82353..98df93c 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -626,6 +626,21 @@ config SEABIOS_THREAD_OPTIONROMS
variations during option ROM code execution. It is not
known if all option ROMs will behave properly with this option.
+config SEABIOS_MALLOC_UPPERMEMORY
+ prompt "Allocate memory that needs to be in first Meg above 0xc0000" if PAYLOAD_SEABIOS
+ default y
+ bool
+ help
+ Use the "Upper Memory Block" area (0xc0000-0xf0000) for internal
+ "low memory" allocations. If this is not selected, the memory is
+ instead allocated from the "9-segment" (0x90000-0xa0000).
+ This is not typically needed, but may be required on some platforms
+ to allow USB and SATA buffers to be written correctly by the
+ hardware. In general, if this is desired, the option will be
+ set to 'N' by the chipset Kconfig.
+
+ If unsure, say Y.
+
choice
prompt "GRUB2 version"
default GRUB2_MASTER
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 2e92d89..3b2517b 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -352,6 +352,7 @@ seabios:
CONFIG_SEABIOS_THREAD_OPTIONROMS=$(CONFIG_SEABIOS_THREAD_OPTIONROMS) \
CONFIG_CONSOLE_SERIAL=$(CONFIG_CONSOLE_SERIAL) \
CONFIG_TTYS0_BASE=$(CONFIG_TTYS0_BASE) \
+ CONFIG_SEABIOS_MALLOC_UPPERMEMORY=$(CONFIG_SEABIOS_MALLOC_UPPERMEMORY) \
OUT=$(abspath $(obj)) IASL="$(IASL)"
filo:
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6404
-gerrit
commit 9be6652481253d469162c577b50df8aedce71128
Author: Gabe Black <gabeblack(a)google.com>
Date: Fri Aug 9 00:40:06 2013 -0700
cbmem: Terminate the cbmem console at the cursor position.
If the cbmem console buffer isn't zero filled before it's used, there won't be
a terminator at the end. We need to put one at the cursor position manually.
Change-Id: I69870c2b24b67ce3cbcd402b62f3574acb4c2a8f
Signed-off-by: Gabe Black <gabeblack(a)google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/65300
Reviewed-by: Hung-Te Lin <hungte(a)chromium.org>
Commit-Queue: Gabe Black <gabeblack(a)chromium.org>
Tested-by: Gabe Black <gabeblack(a)chromium.org>
(cherry picked from commit 8ec61e52a6a27ed518d0abb5a19d6261edf9dab1)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
util/cbmem/cbmem.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index fabede3..4dcfe91 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -472,8 +472,8 @@ static void dump_console(void)
* char console[size]
* Hence we have to add 8 to get to the actual console string.
*/
- size = *(uint32_t *)console_p;
- cursor = *(uint32_t *) (console_p + 4);
+ size = ((uint32_t *)console_p)[0];
+ cursor = ((uint32_t *)console_p)[1];
/* Cursor continues to go on even after no more data fits in
* the buffer but the data is dropped in this case.
*/
@@ -489,6 +489,7 @@ static void dump_console(void)
size + sizeof(size) + sizeof(cursor));
memcpy(console_c, console_p + 8, size);
console_c[size] = 0;
+ console_c[cursor] = 0;
printf("%s\n", console_c);
if (size < cursor)
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6403
-gerrit
commit ab22fad84ba955a95f7c23e51c400b4856543c7c
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Mon Aug 5 21:04:16 2013 -0700
pit: setup voltage rails before system clocks
This moves the call to setup_power() before system_clock_init().
This causes the PMIC to set up the voltage rails earlier so that
the CPU clock can be set up at a faster rate (in the follow-up
patch). After system clock init, we re-initialize the PMIC's I2C
bus since the input clock rate will have changed.
Old-Change-Id: Ieb828ac25daad7ee95bfa4823aaaf161028c9c92
Reviewed-on: https://gerrit.chromium.org/gerrit/64744
Reviewed-by: Gabe Black <gabeblack(a)chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
(cherry picked from commit 6c133a84ef4a32c35577a266905e02af8c2d9278)
pit: save setup_power() status and die later if needed
Since system clock and console initialization now happen after power
setup, we cannot print error messages in setup_power(). This patch
re-factors the code a little bit to save the status of setup_power()
so that if we get an error during setup_power() we will wait until
we can actually print something before dying.
Old-Change-Id: Id7ff477224b104b3c7e221c1d2df460ca9125f3b
Reviewed-on: https://gerrit.chromium.org/gerrit/65009
Reviewed-by: Gabe Black <gabeblack(a)chromium.org>
Commit-Queue: David Hendricks <dhendrix(a)chromium.org>
Tested-by: David Hendricks <dhendrix(a)chromium.org>
(cherry picked from commit 0c89f922b20bc1291ac7ba7b2c22bdce911be7a4)
Squashed two closely related commits.
Change-Id: I3efe29412738959e698c89d26e682536ceabdff8
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/mainboard/google/pit/romstage.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/src/mainboard/google/pit/romstage.c b/src/mainboard/google/pit/romstage.c
index c971d0c..7733eca 100644
--- a/src/mainboard/google/pit/romstage.c
+++ b/src/mainboard/google/pit/romstage.c
@@ -42,6 +42,8 @@
#define MMC0_GPIO_PIN (58)
+#define PMIC_I2C_BUS 4
+
struct pmic_write
{
int or_orig; // Whether to or in the original value.
@@ -75,7 +77,7 @@ struct pmic_write pmic_writes[] =
{ 0, MAX77802_REG_PMIC_BOOSTCTRL, MAX77802_BOOSTCTRL_OFF},
};
-static void setup_power(int is_resume)
+static int setup_power(int is_resume)
{
int error = 0;
int i;
@@ -83,14 +85,12 @@ static void setup_power(int is_resume)
power_init();
if (is_resume) {
- return;
+ return 0;
}
/* Initialize I2C bus to configure PMIC. */
exynos_pinmux_i2c4();
- i2c_init(4, 1000000, 0x00); /* 1MHz */
-
- printk(BIOS_DEBUG, "%s: Setting up PMIC...\n", __func__);
+ i2c_init(PMIC_I2C_BUS, 1000000, 0x00); /* 1MHz */
for (i = 0; i < ARRAY_SIZE(pmic_writes); i++) {
uint8_t data = 0;
@@ -106,8 +106,7 @@ static void setup_power(int is_resume)
&data, sizeof(data));
}
- if (error)
- die("Failed to intialize PMIC.\n");
+ return error;
}
static void setup_storage(void)
@@ -245,6 +244,9 @@ void main(void)
extern struct mem_timings mem_timings;
void *entry;
int is_resume = (get_wakeup_state() != IS_NOT_WAKEUP);
+ int power_init_failed;
+
+ power_init_failed = setup_power(is_resume);
/* Clock must be initialized before console_init, otherwise you may need
* to re-initialize serial console drivers again. */
@@ -253,7 +255,12 @@ void main(void)
exynos_pinmux_uart3();
console_init();
- setup_power(is_resume);
+ if (power_init_failed)
+ die("Failed to intialize power.\n");
+
+ /* re-initialize PMIC I2C channel after (re-)setting system clocks */
+ i2c_init(PMIC_I2C_BUS, 1000000, 0x00); /* 1MHz */
+
setup_memory(&mem_timings, is_resume);
primitive_mem_test();