the following patch was just integrated into master:
commit 7123e2e9b6fd5a7844cc42d5b26983db75a5c73d
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Thu Mar 31 15:25:27 2016 -0500
nb/amd/mct_ddr3: Fix revision mask for DR processors
The revision mask for all DR-* series processors was incorrectly
set to only include the DR-B revision mask. Include all DR-*
series prcessors in the DR_ALL revision mask.
Change-Id: Iceda96aa6267b24abcbf78d39f4848d2be8053b8
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Found-by: Coverity, CID 1229627 (#1 of 1): Logically dead code (DEADCODE)
Reviewed-on: https://review.coreboot.org/14216
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
Reviewed-by: Martin Roth <martinroth(a)google.com>
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Tested-by: build bot (Jenkins)
See https://review.coreboot.org/14216 for details.
-gerrit
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14223
-gerrit
commit d6fb728de25e1586f167442d177310bfd009fa6c
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Thu Mar 31 19:08:53 2016 +0200
device/pci_rom: support calling pci_rom_probe multiple times
Calling the function twice on the same device causes the rom_address
to be of by one as the PCI_ROM_ADDRESS_ENABLE bit is set and not
masked.
Mask the PCI_ROM_ADDRESS_ENABLE bit to always return the same
rom address.
Change-Id: Iafd8824f66981a3ff08defcdc7ea7e9184fa102c
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/pci_rom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 564a519..91b1202 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -66,6 +66,7 @@ struct rom_header *pci_rom_probe(struct device *dev)
uintptr_t rom_address;
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
+ rom_address &= ~PCI_ROM_ADDRESS_ENABLE;
if (rom_address == 0x00000000 || rom_address == 0xffffffff) {
#if CONFIG_BOARD_EMULATION_QEMU_X86
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14221
-gerrit
commit f9a0f8c61df7b2011e698f831a18c748d886e065
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Mar 19 13:47:39 2016 +0100
device/pci_rom: Always load primary Option Rom
The linux kernel expects the primary VGA Option Rom to be shadowed
at 0xc0000, but it is only loaded if CONFIG_VGA_ROM_RUN is set.
For users that don't want to run Option Roms always load the
Option Rom and run it if CONFIG_VGA_ROM_RUN is set.
Depends on: Iacdff8618d080d7c928d307756662fe33ee13cf0
Change-Id: I52e8e435ba7ddc37288a690ed9730633f6aff8e0
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/Kconfig | 12 ---------
src/device/pci_rom.c | 69 +++++++++++++++++++++++++++-------------------------
2 files changed, 36 insertions(+), 45 deletions(-)
diff --git a/src/device/Kconfig b/src/device/Kconfig
index d156d36..3d154e5 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -72,18 +72,6 @@ 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_LOAD
bool "Load Option ROMs on PCI devices"
default n if PAYLOAD_SEABIOS
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 9a4f6a0..851864b 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -31,6 +31,8 @@
/* Rmodules don't like weak symbols. */
u32 __attribute__((weak)) map_oprom_vendev(u32 vendev) { return vendev; }
+extern device_t vga_pri; /* Primary VGA device (device.c). */
+
struct rom_header *pci_rom_probe(struct device *dev)
{
struct rom_header *rom_header;
@@ -150,17 +152,15 @@ struct rom_header *pci_rom_load(struct device *dev,
* whether the ROM image is for a VGA device because some
* devices have a mismatch between the hardware and the ROM.
*/
- if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) {
-#if !CONFIG_MULTIPLE_VGA_ADAPTERS
- extern device_t vga_pri; /* Primary VGA device (device.c). */
- if (dev != vga_pri) return NULL; /* Only one VGA supported. */
-#endif
+ if (PCI_CLASS_DISPLAY_VGA == (dev->class >> 8)) {
+ if (!IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS) && dev != vga_pri)
+ return NULL; /* Only one VGA supported. */
if ((void *)PCI_VGA_RAM_IMAGE_START != rom_header) {
printk(BIOS_DEBUG, "Copying VGA ROM Image from %p to "
- "0x%x, 0x%x bytes\n", rom_header,
- PCI_VGA_RAM_IMAGE_START, rom_size);
+ "0x%x, 0x%x bytes\n", rom_header,
+ PCI_VGA_RAM_IMAGE_START, rom_size);
memcpy((void *)PCI_VGA_RAM_IMAGE_START, rom_header,
- rom_size);
+ rom_size);
}
return (struct rom_header *) (PCI_VGA_RAM_IMAGE_START);
}
@@ -173,19 +173,41 @@ struct rom_header *pci_rom_load(struct device *dev,
return (struct rom_header *) (pci_ram_image_start-rom_size);
}
-#if CONFIG_VGA_ROM_RUN
static int should_run_oprom(struct device *dev)
{
static int should_run = -1;
- if (should_run >= 0)
- return should_run;
+ /* If CONFIG_VGA_ROM_RUN is disabled, skip running VGA option
+ * ROMs.
+ */
+ if (!IS_ENABLED(CONFIG_VGA_ROM_RUN)) {
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
+ return 0;
+ }
+
+ /* If S3_VGA_ROM_RUN is disabled, skip running VGA option
+ * ROMs when coming out of an S3 resume.
+ */
+ if (!IS_ENABLED(CONFIG_S3_VGA_ROM_RUN) && acpi_is_wakeup_s3() &&
+ ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)) {
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
+ return 0;
+ }
+
+ /* Only run primary VGA device Option Rom.
+ */
+ if (vga_pri != dev) {
+ printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
+ return 0;
+ }
/* Don't run VGA option ROMs, unless we have to print
* something on the screen before the kernel is loaded.
+ * Only run the primary vga device's Option Rom.
*/
should_run = !IS_ENABLED(CONFIG_BOOTMODE_STRAPS) ||
- developer_mode_enabled() || recovery_mode_enabled();
+ developer_mode_enabled() ||
+ recovery_mode_enabled();
if (IS_ENABLED(CONFIG_CHROMEOS) && !should_run)
should_run = vboot_wants_oprom();
@@ -195,23 +217,6 @@ static int should_run_oprom(struct device *dev)
return should_run;
}
-static int should_load_oprom(struct device *dev)
-{
- /* If S3_VGA_ROM_RUN is disabled, skip running VGA option
- * ROMs when coming out of an S3 resume.
- */
- if (!IS_ENABLED(CONFIG_S3_VGA_ROM_RUN) && acpi_is_wakeup_s3() &&
- ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA))
- return 0;
- if (IS_ENABLED(CONFIG_ALWAYS_LOAD_OPROM))
- return 1;
- if (should_run_oprom(dev))
- return 1;
-
- return 0;
-}
-#endif /* CONFIG_VGA_ROM_RUN */
-
/**
* Load or run PCI Option Roms.
* TODO: support non VGA Option Roms.
@@ -219,15 +224,12 @@ static int should_load_oprom(struct device *dev)
*/
void pci_rom_load_and_run(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;
-
+ /* Always load VGA Option Roms. */
rom = pci_rom_probe(dev);
if (rom == NULL)
return;
@@ -239,6 +241,7 @@ void pci_rom_load_and_run(struct device *dev)
if (!should_run_oprom(dev))
return;
+#if CONFIG_VGA_ROM_RUN
run_bios(dev, (unsigned long)ram);
gfx_set_init_done(1);
printk(BIOS_DEBUG, "VGA Option ROM was run\n");