Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5093
-gerrit
commit a66a5ae1c42bbf2a406eb49e939d3bd4c3d73a03
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Feb 2 11:23:26 2014 +0100
payloads/external/SeaBIOS: Upgrade stable from 1.7.2.2 to 1.7.4
SeaBIOS 1.7.4 was released in December 2013 [1] and, besides other
things, supports writing debug messages to CBMEM console.
The new SeaBIOS Kconfig option `DEBUG_COREBOOT` has to be added to the
SeaBIOS configuration file `.config` as otherwise the SeaBIOS build
from within coreboot (`PAYLOAD_SEABIOS`) is interrupted as it is
detected as a new option.
This option was already added and enabled in commit 7c1a49bc [1]
SeaBIOS: have coreboot pass the choice to run optionroms in parallel
so SeaBIOS messages are now written to the CBMEM console.
Successfully tested on the Asus M2V-MX SE.
[1] http://seabios.org/Releases
[2] http://review.coreboot.org/5443
Change-Id: I675a50532735b4921a664e4b24d98be17b9a1002
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
payloads/external/SeaBIOS/Makefile.inc | 2 +-
src/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/payloads/external/SeaBIOS/Makefile.inc b/payloads/external/SeaBIOS/Makefile.inc
index 84f1515..23b064c 100644
--- a/payloads/external/SeaBIOS/Makefile.inc
+++ b/payloads/external/SeaBIOS/Makefile.inc
@@ -1,5 +1,5 @@
TAG-$(CONFIG_SEABIOS_MASTER)=origin/master
-TAG-$(CONFIG_SEABIOS_STABLE)=88cb66ea542906ffff8a80ef397b9e3adbb33116
+TAG-$(CONFIG_SEABIOS_STABLE)=96917a8ed761f017fc8c72ba3b9181fbac03ac59
unexport KCONFIG_AUTOCONFIG
diff --git a/src/Kconfig b/src/Kconfig
index 31a41ab..291b166 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -617,7 +617,7 @@ choice
depends on PAYLOAD_SEABIOS
config SEABIOS_STABLE
- bool "1.7.2.1"
+ bool "1.7.4"
help
Stable SeaBIOS version
config SEABIOS_MASTER
Paul Menzel (paulepanter(a)users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5388
-gerrit
commit 6abc872d3cb4a9dbbdb24db9df3e598fbe8132e8
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Sun Mar 16 00:15:57 2014 +0100
util/cbfstool: Use `%zu` instead of `%ld` for size_t arguments
cbfstool fails to built under 32-bit platforms since commit
aa2f739a cbfs: fix issues with word size and endianness.
due to the use of '%ld' format specifier on size_t, which on these
platforms is only 32-bit.
No error is seen when building a coreboot image which indirectly
builds cbfstool at `build/cbfstool` too.
Use the length modifier `z` for size_t arguments, and cast to size_t where
apropriate.
[1] http://review.coreboot.org/4817
Change-Id: Id84a20fbf237376a31f7e4816bd139463800c977
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
---
util/cbfstool/cbfs-mkstage.c | 4 ++--
util/cbfstool/elfheaders.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/util/cbfstool/cbfs-mkstage.c b/util/cbfstool/cbfs-mkstage.c
index 6aa3746..2a92c9f 100644
--- a/util/cbfstool/cbfs-mkstage.c
+++ b/util/cbfstool/cbfs-mkstage.c
@@ -132,8 +132,8 @@ int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
continue;
if (input->size < (phdr[i].p_offset + phdr[i].p_filesz)){
ERROR("Underflow copying out the segment."
- "File has %ld bytes left, segment end is %ld\n",
- input->size, phdr[i].p_offset + phdr[i].p_filesz);
+ "File has %zu bytes left, segment end is %zu\n",
+ input->size, (size_t)(phdr[i].p_offset + phdr[i].p_filesz));
return -1;
}
memcpy(buffer + (l_start - data_start),
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index d217aac..5b5cf94 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -147,7 +147,7 @@ check_size(const struct buffer *b, size_t offset, size_t size, const char *desc)
if (offset >= buffer_size(b) || (offset + size) > buffer_size(b)) {
ERROR("The file is not large enough for the '%s'. "
- "%ld bytes @ offset %zu, input %zu bytes.\n",
+ "%zu bytes @ offset %zu, input %zu bytes.\n",
desc, size, offset, buffer_size(b));
return -1;
}
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5595
-gerrit
commit a64fb6fd43beb7d7b069975a7f9b2afddebeccd4
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Dec 22 00:22:49 2013 +0200
device: Conditionally bypass oprom execution
Builds with CHROMEOS can bypass VGA oprom when boot is not in
developer or recovery modes. Have the same functionality available
without CHROMEOS but with BOOTMODE_STRAPS.
Change-Id: I97644364305dc05aad78a744599476ccc58db163
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/device/pci_device.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index d5f150c..0641ab8 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -33,6 +33,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <delay.h>
+#include <bootmode.h>
#if CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT
#include <device/hypertransport.h>
#endif
@@ -668,20 +669,18 @@ static int should_run_oprom(struct device *dev)
if (should_run >= 0)
return should_run;
-#if CONFIG_CHROMEOS
- /* In ChromeOS we want to boot blazingly fast. Therefore
- * we don't run (VGA) option ROMs, unless we have to print
+ /* Don't run VGA option ROMs, unless we have to print
* something on the screen before the kernel is loaded.
*/
- if (!developer_mode_enabled() && !recovery_mode_enabled() &&
- !vboot_wants_oprom()) {
- printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
- should_run = 0;
- return should_run;
- }
-#endif
- should_run = 1;
+ should_run = !IS_ENABLED(CONFIG_BOOTMODE_STRAPS) ||
+ developer_mode_enabled() || recovery_mode_enabled();
+#if CONFIG_CHROMEOS
+ if (!should_run)
+ should_run = vboot_wants_oprom();
+#endif
+ if (!should_run)
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
return should_run;
}
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5595
-gerrit
commit b1c7440942838a7625c8a9a72a0a7aed2f1f5982
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Sun Dec 22 00:22:49 2013 +0200
device: Conditionally bypass oprom execution
Builds with CHROMEOS can bypass VGA oprom when boot is not in
developer or recovery modes. Have the same functionality available
without CHROMEOS but with BOOTMODE_STRAPS.
Change-Id: I97644364305dc05aad78a744599476ccc58db163
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/device/pci_device.c | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index d5f150c..3cf46b3 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -668,20 +668,18 @@ static int should_run_oprom(struct device *dev)
if (should_run >= 0)
return should_run;
-#if CONFIG_CHROMEOS
- /* In ChromeOS we want to boot blazingly fast. Therefore
- * we don't run (VGA) option ROMs, unless we have to print
+ /* Don't run VGA option ROMs, unless we have to print
* something on the screen before the kernel is loaded.
*/
- if (!developer_mode_enabled() && !recovery_mode_enabled() &&
- !vboot_wants_oprom()) {
- printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
- should_run = 0;
- return should_run;
- }
-#endif
- should_run = 1;
+ should_run = !IS_ENABLED(CONFIG_BOOTMODE_STRAPS) ||
+ developer_mode_enabled() || recovery_mode_enabled();
+#if CONFIG_CHROMEOS
+ if (!should_run)
+ should_run = vboot_wants_oprom();
+#endif
+ if (!should_run)
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
return should_run;
}
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5594
-gerrit
commit 603548f058dcc580e48e32c88d3e8af40ee4443f
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Tue Mar 4 10:21:31 2014 -0600
device: provide option to always load PCI option roms
Certain kernel drivers require the presence of option rom
contents because the board's static configuration information
is located within the blob. Therefore, allow a chipset/board to
instruct the pci device handling code to always load but not
necessarily run the option rom.
BUG=chrome-os-partner:25885
BRANCH=baytrail
TEST=Both enabling and not enabling this option shows expected behavior.
Change-Id: Ib0f65ffaf1a861b543573a062c291f4ba491ffe0
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/188720
Reviewed-by: Duncan Laurie <dlaurie(a)chromium.org>
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/device/Kconfig | 12 ++++++++++++
src/device/pci_device.c | 50 +++++++++++++++++++++++++++++++++++++++----------
2 files changed, 52 insertions(+), 10 deletions(-)
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 932b4de..ab7a577 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -70,6 +70,18 @@ config S3_VGA_ROM_RUN
If unsure, say N when using SeaBIOS as payload, Y otherwise.
+config ALWAYS_LOAD_OPROM
+ def_bool n
+ depends on VGA_ROM_RUN
+ help
+ Always load option roms if any are found. The decision to run
+ the rom is still determined at runtime, but the distinction
+ between loading and not running comes into play for CHROMEOS.
+
+ An example where this is required is that VBT (video bios tables)
+ are needed for the kernel's display driver to know how a piece of
+ hardware is configured to be used.
+
config ON_DEVICE_ROM_RUN
bool "Run Option ROMs on PCI devices"
default n if PAYLOAD_SEABIOS
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 24d0552..d5f150c 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -23,6 +23,7 @@
* Copyright 1997 -- 1999 Martin Mares <mj(a)atrey.karlin.mff.cuni.cz>
*/
+#include <kconfig.h>
#include <console/console.h>
#include <stdlib.h>
#include <stdint.h>
@@ -659,15 +660,13 @@ void pci_dev_set_subsystem(struct device *dev, unsigned vendor, unsigned device)
((device & 0xffff) << 16) | (vendor & 0xffff));
}
-/** Default handler: only runs the relevant PCI BIOS. */
-void pci_dev_init(struct device *dev)
-{
#if CONFIG_VGA_ROM_RUN
- struct rom_header *rom, *ram;
+static int should_run_oprom(struct device *dev)
+{
+ static int should_run = -1;
- /* Only execute VGA ROMs. */
- if (((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA))
- return;
+ if (should_run >= 0)
+ return should_run;
#if CONFIG_CHROMEOS
/* In ChromeOS we want to boot blazingly fast. Therefore
@@ -676,19 +675,47 @@ void pci_dev_init(struct device *dev)
*/
if (!developer_mode_enabled() && !recovery_mode_enabled() &&
!vboot_wants_oprom()) {
- printk(BIOS_DEBUG, "Not loading VGA Option ROM\n");
- return;
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
+ should_run = 0;
+ return should_run;
}
#endif
+ should_run = 1;
+
+ return should_run;
+}
+static int should_load_oprom(struct device *dev)
+{
#if CONFIG_HAVE_ACPI_RESUME && !CONFIG_S3_VGA_ROM_RUN
/* If S3_VGA_ROM_RUN is disabled, skip running VGA option
* ROMs when coming out of an S3 resume.
*/
if ((acpi_slp_type == 3) &&
((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA))
- return;
+ return 0;
#endif
+ if (IS_ENABLED(CONFIG_ALWAYS_LOAD_OPROM))
+ return 1;
+ if (should_run_oprom(dev))
+ return 1;
+
+ return 0;
+}
+#endif /* CONFIG_VGA_ROM_RUN */
+
+/** Default handler: only runs the relevant PCI BIOS. */
+void pci_dev_init(struct device *dev)
+{
+#if CONFIG_VGA_ROM_RUN
+ struct rom_header *rom, *ram;
+
+ /* Only execute VGA ROMs. */
+ if (((dev->class >> 8) != PCI_CLASS_DISPLAY_VGA))
+ return;
+
+ if (!should_load_oprom(dev))
+ return;
rom = pci_rom_probe(dev);
if (rom == NULL)
@@ -698,6 +725,9 @@ void pci_dev_init(struct device *dev)
if (ram == NULL)
return;
+ if (!should_run_oprom(dev))
+ return;
+
run_bios(dev, (unsigned long)ram);
dev->oprom_is_loaded = 1;
printk(BIOS_DEBUG, "VGA Option ROM has been loaded\n");