the following patch was just integrated into master:
commit 4f22267b09565055f297808adc3c260c749332fb
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Thu Feb 18 16:21:15 2016 +0100
qemu-armv7: Update running instructions.
Change-Id: I04c0cfea5d49eb70969d6ad38d5cb81d70eeaf9b
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
Reviewed-on: https://review.coreboot.org/13753
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
See https://review.coreboot.org/13753 for details.
-gerrit
Werner Zeh (werner.zeh(a)siemens.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13743
-gerrit
commit 2024e69a2a05c2c445cf316671008d89e87d756e
Author: Werner Zeh <werner.zeh(a)siemens.com>
Date: Fri Feb 19 10:50:38 2016 +0100
fsp_baytrail: Fix a possible hanging DisplayPort
On some devices it can happen that DisplayPort TX lanes
do not work properly if the power gate setup is omitted.
If that happens, DisplayPort training will fail and therefore
DisplayPort channel will not work. Both ports are affected.
It seems that not every CPU shows this effect
and those are affected tends to fail more often in cold
environment.
With this fix a board that originally shows this failure very
often was running for over 1000 power cycles without issues.
Change-Id: Ia266674490a1bee63a85b38d1dc949dcdf683cbc
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
src/soc/intel/fsp_baytrail/Makefile.inc | 2 +
src/soc/intel/fsp_baytrail/gfx.c | 118 ++++++++++++++++++++++++++++++++
2 files changed, 120 insertions(+)
diff --git a/src/soc/intel/fsp_baytrail/Makefile.inc b/src/soc/intel/fsp_baytrail/Makefile.inc
index 79fc7eb..76719e5 100644
--- a/src/soc/intel/fsp_baytrail/Makefile.inc
+++ b/src/soc/intel/fsp_baytrail/Makefile.inc
@@ -3,6 +3,7 @@
#
# Copyright (C) 2010 Google Inc.
# Copyright (C) 2013-2014 Sage Electronic Engineering, LLC.
+# Copyright (C) 2016 Siemens AG
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -54,6 +55,7 @@ ramstage-$(CONFIG_HAVE_SMI_HANDLER) += smm.c
ramstage-y += placeholders.c
ramstage-y += i2c.c
+ramstage-y += gfx.c
CPPFLAGS_common += -I$(src)/soc/intel/fsp_baytrail/include
CPPFLAGS_common += -I$(src)/soc/intel/fsp_baytrail/fsp
diff --git a/src/soc/intel/fsp_baytrail/gfx.c b/src/soc/intel/fsp_baytrail/gfx.c
new file mode 100644
index 0000000..4d3737d
--- /dev/null
+++ b/src/soc/intel/fsp_baytrail/gfx.c
@@ -0,0 +1,118 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2013 Google Inc.
+ * Copyright 2016 Siemens AG
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <arch/io.h>
+#include <console/console.h>
+#include <delay.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <device/pci_ids.h>
+#include <reg_script.h>
+#include <stdlib.h>
+
+#include <soc/gfx.h>
+#include <soc/iosf.h>
+#include <soc/pci_devs.h>
+#include <soc/ramstage.h>
+
+#define GFX_TIMEOUT 100000 /* 100ms */
+
+static const struct reg_script gpu_pre_vbios_script[] = {
+ /* Make sure GFX is bus master with MMIO access */
+ REG_PCI_OR32(PCI_COMMAND, PCI_COMMAND_MASTER|PCI_COMMAND_MEMORY),
+ /* Display */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xc0),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xc0, 0xc0,
+ GFX_TIMEOUT),
+ /* Tx/Rx Lanes */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xfff0c0),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xfff0c0, 0xfff0c0,
+ GFX_TIMEOUT),
+ /* Common Lane */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xfffcc0),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xfffcc0, 0xfffcc0,
+ GFX_TIMEOUT),
+ /* Ungating Tx only */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xf00cc0),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xfffcc0, 0xf00cc0,
+ GFX_TIMEOUT),
+ /* Ungating Common Lane only */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xf000c0),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xffffc0, 0xf000c0,
+ GFX_TIMEOUT),
+ /* Ungating Display */
+ REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PWRGT_CONTROL, 0xf00000),
+ REG_IOSF_POLL(IOSF_PORT_PMC, PUNIT_PWRGT_STATUS, 0xfffff0, 0xf00000,
+ GFX_TIMEOUT),
+ REG_SCRIPT_END
+};
+
+static const struct reg_script gfx_post_vbios_script[] = {
+ /* Deassert Render Force-Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x1300b0, 0x80000000),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x1300b4, 0x8000, 0, GFX_TIMEOUT),
+ /* Deassert Media Force-Wake */
+ REG_RES_WRITE32(PCI_BASE_ADDRESS_0, 0x1300b8, 0x80000000),
+ REG_RES_POLL32(PCI_BASE_ADDRESS_0, 0x1300bc, 0x8000, 0, GFX_TIMEOUT),
+ /* Set Lock bits */
+ REG_PCI_RMW32(GGC, 0xffffffff, 1),
+ REG_PCI_RMW32(GSM_BASE, 0xffffffff, 1),
+ REG_PCI_RMW32(GTT_BASE, 0xffffffff, 1),
+ REG_SCRIPT_END
+};
+
+static inline void gfx_run_script(device_t dev, const struct reg_script *ops)
+{
+ reg_script_run_on_dev(dev, ops);
+}
+
+static void gfx_pre_vbios_init(device_t dev)
+{
+ printk(BIOS_INFO, "GFX: Pre VBIOS Init\n");
+ gfx_run_script(dev, gpu_pre_vbios_script);
+}
+
+static void gfx_post_vbios_init(device_t dev)
+{
+ printk(BIOS_INFO, "GFX: Post VBIOS Init\n");
+ gfx_run_script(dev, gfx_post_vbios_script);
+}
+
+static void gfx_init(device_t dev)
+{
+ /* Pre VBIOS Init */
+ gfx_pre_vbios_init(dev);
+
+ /* Run VBIOS */
+ pci_dev_init(dev);
+
+ /* Post VBIOS Init */
+ gfx_post_vbios_init(dev);
+}
+
+static struct device_operations gfx_device_ops = {
+ .read_resources = pci_dev_read_resources,
+ .set_resources = pci_dev_set_resources,
+ .enable_resources = pci_dev_enable_resources,
+ .init = gfx_init,
+ .ops_pci = &soc_pci_ops,
+};
+
+static const struct pci_driver gfx_driver __pci_driver = {
+ .ops = &gfx_device_ops,
+ .vendor = PCI_VENDOR_ID_INTEL,
+ .device = GFX_DEVID,
+};
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12897
-gerrit
commit 6024742f1c9e24d817c9f4edb6831d98b4865697
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Dec 26 08:27:20 2015 +0100
device/device: handle multiple VGA devices
Add nvram options "vga_primary_is_peg" and "vga_secondary_powersave"
to switch between VGA devices.
Both options only affects systems where an onboard and a PEG device
is installed. Systems with only one VGA device will always use it as
the primary VGA device.
vga_primary_is_peg allows to choose the primary VGA device, that is where the
VGA Option ROM will be run on.
In case of a laptop the panel will be connected to the primary device.
vga_primary_is_peg=0 : Onboard is primary
vga_primary_is_peg=1 : Dedicated is primary
vga_secondary_powersave allows to disable secondary VGA devices to save power.
vga_secondary_powersave=0 : Leave secondary VGA devices enabled
vga_secondary_powersave=1 : Disable secondary VGA devices
Tested on Lenovo T530 using Nvidia NVS 5400m.
WIP: Do not commit yet !
Change-Id: Ie37ec4aeae8ab49fe8e26438c430911d1815551c
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/device/device.c | 93 +++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 72 insertions(+), 21 deletions(-)
diff --git a/src/device/device.c b/src/device/device.c
index e23c9de..765d6a2 100644
--- a/src/device/device.c
+++ b/src/device/device.c
@@ -44,6 +44,7 @@
#include <arch/ebda.h>
#endif
#include <timer.h>
+#include <option.h>
/** Linked list of ALL devices */
struct device *all_devices = &dev_root;
@@ -748,28 +749,52 @@ static void avoid_fixed_resources(struct device *dev)
}
}
+static struct device *get_next_vga_dev(struct device *dev)
+{
+ while ((dev = dev_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev))) {
+ if (!dev->enabled)
+ continue;
+
+ return dev;
+ }
+ return NULL;
+}
+
+/*
+ * Disables all PCI_CLASS_DISPLAY_VGA devices except the one
+ * given as argument.
+ * @param dev_primary The device to ignore
+ */
+static void disable_secondary_vga_devs(struct device *dev_primary)
+{
+ struct device *dev = NULL;
+
+ while ((dev = get_next_vga_dev(dev))) {
+ /* disable unused devices to save power */
+ if (dev != dev_primary) {
+ if (dev->ops && dev->ops->disable)
+ dev->ops->disable(dev);
+ else
+ dev->enabled = 0;
+ }
+ }
+}
+
device_t vga_pri = 0;
static void set_vga_bridge_bits(void)
{
- /*
- * FIXME: Modify set_vga_bridge() so it is less PCI-centric!
- * This function knows too much about PCI stuff, it should be just
- * an iterator/visitor.
- */
-
/* FIXME: Handle the VGA palette snooping. */
struct device *dev, *vga, *vga_onboard;
struct bus *bus;
+ u8 vga_primary_is_peg;
+ u8 vga_secondary_powersave;
bus = 0;
vga = 0;
vga_onboard = 0;
dev = NULL;
- while ((dev = dev_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev))) {
- if (!dev->enabled)
- continue;
-
+ while ((dev = get_next_vga_dev(dev))) {
printk(BIOS_DEBUG, "found VGA at %s\n", dev_path(dev));
if (dev->on_mainboard) {
@@ -782,23 +807,49 @@ static void set_vga_bridge_bits(void)
dev->command &= ~(PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
}
- if (!vga)
- vga = vga_onboard;
+ if ((get_option(&vga_primary_is_peg, "vga_primary_is_peg") != CB_SUCCESS) ||
+ (get_option(&vga_secondary_powersave, "vga_secondary_powersave") != CB_SUCCESS) ||
+ !vga || !vga_onboard) {
+ /* fallback */
+ if (!vga)
+ vga = vga_onboard;
+
+ if (IS_ENABLED(CONFIG_ONBOARD_VGA_IS_PRIMARY) && vga_onboard)
+ vga = vga_onboard;
+
+ /* If we prefer plugin VGA over chipset VGA, the chipset might
+ want to know. */
+ if (!IS_ENABLED(CONFIG_ONBOARD_VGA_IS_PRIMARY) &&
+ (vga != vga_onboard) &&
+ vga_onboard) {
+ printk(BIOS_DEBUG, "Use plugin graphics over integrated.\n");
+
+ if (vga_onboard->ops && vga_onboard->ops->disable)
+ vga_onboard->ops->disable(vga_onboard);
+ else
+ vga_onboard->enabled = 0;
+ }
+
+ disable_secondary_vga_devs(vga);
+ } else {
+ /* have vga and vga_onboard (two or more VGAs) */
- if (CONFIG_ONBOARD_VGA_IS_PRIMARY && vga_onboard)
- vga = vga_onboard;
+ /* make onboard primary if vga_primary_is_peg is disabled */
+ if (vga_primary_is_peg == 0) {
+ printk(BIOS_DEBUG, "Use integrated graphics over plugin.\n");
+ vga = vga_onboard;
+ }
- /* If we prefer plugin VGA over chipset VGA, the chipset might
- want to know. */
- if (!CONFIG_ONBOARD_VGA_IS_PRIMARY && (vga != vga_onboard) &&
- vga_onboard && vga_onboard->ops && vga_onboard->ops->disable) {
- printk(BIOS_DEBUG, "Use plugin graphics over integrated.\n");
- vga_onboard->ops->disable(vga_onboard);
+ /* disable secondary VGAs if vga_secondary_powersave is enabled */
+ if (vga_secondary_powersave == 1) {
+ printk(BIOS_DEBUG, "Disable secondary graphics to save power.\n");
+ disable_secondary_vga_devs(vga);
+ }
}
if (vga) {
/* VGA is first add-on card or the only onboard VGA. */
- printk(BIOS_DEBUG, "Setting up VGA for %s\n", dev_path(vga));
+ printk(BIOS_DEBUG, "Setting up %s for primary VGA.\n", dev_path(vga));
/* All legacy VGA cards have MEM & I/O space registers. */
vga->command |= (PCI_COMMAND_MEMORY | PCI_COMMAND_IO);
vga_pri = vga;
the following patch was just integrated into master:
commit c7a943397d9ab731f4245c416e6086feec08c2b9
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sat Feb 20 17:44:35 2016 -0800
Documentation/Intel: Update EDK2 CorebootPayloadPkg build instructions
Update the build instructions for CorebootPayloadPkg to target the
Galileo Gen2 platform.
TEST=Build and run on the Galileo Gen2 platform.
Change-Id: I9ca8a67811eff988f81f04d4c01c77115356c050
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
Reviewed-on: https://review.coreboot.org/13756
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/13756 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13766
-gerrit
commit 7580fddc6dd3f7b2d2752d3780e6d34a879c47a2
Author: Patrick Georgi <patrick(a)georgi-clan.de>
Date: Mon Feb 22 03:01:57 2016 +0100
board-status: deal with sanitized paths
Change I9dd8e4027be21363015cd8df9918610e206afce2 replaces
colons with underscores in paths, to improve compatibility of paths.
This breaks any attempt to interpret the timestamp part of the tree
as a timestamp, so revert the change before doing so.
Change-Id: I0e82e4045120700e9b4fcc8c6e54d761068eaea3
Signed-off-by: Patrick Georgi <patrick(a)georgi-clan.de>
---
util/board_status/to-wiki/bucketize.sh | 2 +-
util/board_status/to-wiki/towiki.sh | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/util/board_status/to-wiki/bucketize.sh b/util/board_status/to-wiki/bucketize.sh
index e85fc3e..78906fd 100755
--- a/util/board_status/to-wiki/bucketize.sh
+++ b/util/board_status/to-wiki/bucketize.sh
@@ -19,7 +19,7 @@ quarterly() {
curr=""
sort -r -k4 -t/ | while read file; do
- timestamp=`printf $file | cut -d/ -f4`
+ timestamp=`printf $file | cut -d/ -f4 | tr _ :`
new=`$1 $timestamp`
if [ "$new" != "$curr" ]; then
if [ "$curr" != "" ]; then
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 85334ef..9cf8a3c 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -17,9 +17,10 @@ while read line; do
for i in $rest; do
vendor_board=`echo $i | cut -d/ -f1-2`
commit=`echo $i | cut -d/ -f3`
- datetime=`echo $i | cut -d/ -f4`
+ datetime_path=`echo $i | cut -d/ -f4`
+ datetime=`echo $datetime_path | tr _ :`
datetime_human=`LC_ALL=C TZ=UTC date --date="$datetime"`
- upstream=`grep "^Upstream revision:" $vendor_board/$commit/$datetime/revision.txt |cut -d: -f2-`
+ upstream=`grep "^Upstream revision:" $vendor_board/$commit/$datetime_path/revision.txt |cut -d: -f2-`
upstream=`git log -1 --format=%H $upstream`
if ! echo "$have"| grep "^$vendor_board:" > /dev/null; then
detailed="$detailed<span id=\"$vendor_board\"></span>$nl"
@@ -28,8 +29,8 @@ while read line; do
detailed="$detailed[[Board:$vendor_board|$vendor_board]] at $datetime_human$nl"
detailed="$detailed[$CODE_GITWEB$upstream upstream tree] ($nl"
- for file in "$vendor_board/$commit/$datetime/"*; do
- if [ "$file" = "$vendor_board/$commit/$datetime/revision.txt" ]; then
+ for file in "$vendor_board/$commit/$datetime_path/"*; do
+ if [ "$file" = "$vendor_board/$commit/$datetime_path/revision.txt" ]; then
continue
fi
detailed="$detailed[$STATUS_GITWEB$file `basename $file`] $nl"