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/2706
-gerrit
commit 8de4930c8071310205e6c0f2238639499c27e321
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed Mar 13 11:12:56 2013 +0200
i82801gx bd82x6x: Enable PCI-to-PCI bridge
Once the PCI command register is written bridge forwards future IO
and memory regions, as programmed in the respective base and limit
registers, to the secondary PCI bus.
Since LPC function claims the resources for IOAPIC, ROM and
low IO (0x0-0xfff) in its read_resources() call, the PCI-to-PCI
configuration will not overlap those regions and does not hide
the resources mentioned in the original comment.
Change-Id: I75128d83a344f4a0e09a3ea623c7f92a016ebfb9
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/southbridge/intel/bd82x6x/pci.c | 9 ---------
src/southbridge/intel/i82801gx/pci.c | 9 ---------
2 files changed, 18 deletions(-)
diff --git a/src/southbridge/intel/bd82x6x/pci.c b/src/southbridge/intel/bd82x6x/pci.c
index 306e7d5..0f5f3f6 100644
--- a/src/southbridge/intel/bd82x6x/pci.c
+++ b/src/southbridge/intel/bd82x6x/pci.c
@@ -63,7 +63,6 @@ static void pci_init(struct device *dev)
pci_write_config16(dev, SECSTS, reg16);
}
-#undef PCI_BRIDGE_UPDATE_COMMAND
static void ich_pci_dev_enable_resources(struct device *dev)
{
const struct pci_operations *ops;
@@ -83,16 +82,8 @@ static void ich_pci_dev_enable_resources(struct device *dev)
command = pci_read_config16(dev, PCI_COMMAND);
command |= dev->command;
-#ifdef PCI_BRIDGE_UPDATE_COMMAND
- /* If we write to PCI_COMMAND, on some systems
- * this will cause the ROM and APICs not being visible
- * anymore.
- */
printk(BIOS_DEBUG, "%s cmd <- %02x\n", dev_path(dev), command);
pci_write_config16(dev, PCI_COMMAND, command);
-#else
- printk(BIOS_DEBUG, "%s cmd <- %02x (NOT WRITTEN!)\n", dev_path(dev), command);
-#endif
}
static void ich_pci_bus_enable_resources(struct device *dev)
diff --git a/src/southbridge/intel/i82801gx/pci.c b/src/southbridge/intel/i82801gx/pci.c
index 0f372e7..5a21b21 100644
--- a/src/southbridge/intel/i82801gx/pci.c
+++ b/src/southbridge/intel/i82801gx/pci.c
@@ -62,7 +62,6 @@ static void pci_init(struct device *dev)
pci_write_config16(dev, SECSTS, reg16);
}
-#undef PCI_BRIDGE_UPDATE_COMMAND
static void ich_pci_dev_enable_resources(struct device *dev)
{
const struct pci_operations *ops;
@@ -80,16 +79,8 @@ static void ich_pci_dev_enable_resources(struct device *dev)
command = pci_read_config16(dev, PCI_COMMAND);
command |= dev->command;
-#ifdef PCI_BRIDGE_UPDATE_COMMAND
- /* If we write to PCI_COMMAND, on some systems
- * this will cause the ROM and APICs not being visible
- * anymore.
- */
printk(BIOS_DEBUG, "%s cmd <- %02x\n", dev_path(dev), command);
pci_write_config16(dev, PCI_COMMAND, command);
-#else
- printk(BIOS_DEBUG, "%s cmd <- %02x (NOT WRITTEN!)\n", dev_path(dev), command);
-#endif
}
static void ich_pci_bus_enable_resources(struct device *dev)
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2701
-gerrit
commit cb0b051b445e1056d8d6a776c03e0a3005a9a3ee
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Mar 12 22:00:43 2013 -0700
exynos5250/snow: enable branch prediction
This enables branch prediction. We can probably find a better place
to do this, but for now we'll do it in snow's romstage main().
Change-Id: I86c7b6bc9e897a7a432c490fb96a126e81b8ce72
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5250/bootblock.c | 16 ----------------
src/mainboard/google/snow/romstage.c | 18 ++++++++++++++++++
2 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/bootblock.c b/src/cpu/samsung/exynos5250/bootblock.c
index e2f05ef..a5eac6e 100644
--- a/src/cpu/samsung/exynos5250/bootblock.c
+++ b/src/cpu/samsung/exynos5250/bootblock.c
@@ -17,22 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#if 0
-/*
- * Set/clear program flow prediction and return the previous state.
- */
-static int config_branch_prediction(int set_cr_z)
-{
- unsigned int cr;
-
- /* System Control Register: 11th bit Z Branch prediction enable */
- cr = get_cr();
- set_cr(set_cr_z ? cr | CR_Z : cr & ~CR_Z);
-
- return cr & CR_Z;
-}
-#endif
-
void bootblock_cpu_init(void);
void bootblock_cpu_init(void)
{
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index 83d5105..26247b7 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -51,6 +51,20 @@ static int board_wakeup_permitted(void)
}
#endif
+/*
+ * Set/clear program flow prediction and return the previous state.
+ */
+static int config_branch_prediction(int set_cr_z)
+{
+ unsigned int cr;
+
+ /* System Control Register: 11th bit Z Branch prediction enable */
+ cr = get_cr();
+ set_cr(set_cr_z ? cr | CR_Z : cr & ~CR_Z);
+
+ return cr & CR_Z;
+}
+
static void initialize_s5p_mshc(void)
{
/* MMC0: Fixed, 8 bit mode, connected with GPIO. */
@@ -80,6 +94,10 @@ void main(void)
int ret;
void *entry;
+ /* FIXME: if we boot from USB, we need to disable branch prediction
+ * before copying from USB into RAM */
+ config_branch_prediction(1);
+
clock_set_rate(PERIPH_ID_SPI1, 50000000); /* set spi clock to 50Mhz */
/* Clock must be initialized before console_init, otherwise you may need
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2700
-gerrit
commit 1b6eab6fd4751d0561277e3de90d89a7e08a3678
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Mar 12 21:38:19 2013 -0700
exynos5250: Don't set PS_HOLD in bootblock_cpu_init
PS_HOLD gets set in exynos' power_init().
Change-Id: Ib08e0afcad23cbd07dc7e3727fd958a1bc868b5a
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5250/bootblock.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/bootblock.c b/src/cpu/samsung/exynos5250/bootblock.c
index e2f05ef..0fbc857 100644
--- a/src/cpu/samsung/exynos5250/bootblock.c
+++ b/src/cpu/samsung/exynos5250/bootblock.c
@@ -36,6 +36,4 @@ static int config_branch_prediction(int set_cr_z)
void bootblock_cpu_init(void);
void bootblock_cpu_init(void)
{
- volatile unsigned long *pshold = (unsigned long *)0x1004330c;
- *pshold |= 0x100;
}
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2699
-gerrit
commit b4738126b180deeee0e25c5df34eb926514924ec
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Mar 12 21:28:07 2013 -0700
exynos5250/snow: call PMIC's power_init() function
Call the power_init() function. We appear to have forgotten about it
when deprecating lowlevel_init_subsystems(), but it didn't seem to
cause problems until we got to doing more interesting stuff recently.
There are some clean-ups to do from the original code, such as not
attempting to configure I2C from PMIC code, which we'll get around
to in follow-up patches.
(Credit to Gabe for spotting this)
Change-Id: I6a59379e9323277d0b61469de9abe6d651ac5bfb
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5250/Makefile.inc | 1 +
src/mainboard/google/snow/romstage.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/src/cpu/samsung/exynos5250/Makefile.inc b/src/cpu/samsung/exynos5250/Makefile.inc
index 33fcedc..2774b12 100644
--- a/src/cpu/samsung/exynos5250/Makefile.inc
+++ b/src/cpu/samsung/exynos5250/Makefile.inc
@@ -17,6 +17,7 @@ romstage-y += pinmux.c # required by s3c24x0_i2c (exynos5-common) and uart.
romstage-y += exynos_cache.c
romstage-y += dmc_common.c
romstage-y += dmc_init_ddr3.c
+romstage-y += power.c
romstage-$(CONFIG_EARLY_CONSOLE) += soc.c
romstage-$(CONFIG_EARLY_CONSOLE) += uart.c
diff --git a/src/mainboard/google/snow/romstage.c b/src/mainboard/google/snow/romstage.c
index 83d5105..c2f5fc9 100644
--- a/src/mainboard/google/snow/romstage.c
+++ b/src/mainboard/google/snow/romstage.c
@@ -30,6 +30,7 @@
#include <cpu/samsung/exynos5250/gpio.h>
#include <cpu/samsung/exynos5250/setup.h>
#include <cpu/samsung/exynos5250/periph.h>
+#include <cpu/samsung/exynos5250/power.h>
#include <cpu/samsung/exynos5250/clock_init.h>
#include <console/console.h>
#include <arch/stages.h>
@@ -90,6 +91,12 @@ void main(void)
console_init();
+ /*
+ * FIXME: Do necessary I2C init so low-level PMIC code doesn't need to.
+ * Also, we should only call power_init() on cold boot.
+ */
+ power_init();
+
if (!mem) {
printk(BIOS_CRIT, "Unable to auto-detect memory timings\n");
while(1);
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/2698
-gerrit
commit ac2b1e810247cbc3afd8891ff07d76bcdefab5cb
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Mar 12 20:16:44 2013 -0700
exynos5250: add RAM resource beginning at physical address
The original code attempted to reserve a space in RAM for coreboot to
remain resident. This turns out not to be needed, and breaks things
for the kernel since the exynos5250-smdk5250 kernel device tree starts
RAM at 0x40000000.
(This patch was originally by Gabe, I'm just uploading it)
Change-Id: I4536edaf8785d81a3ea008216a2d57549ce5edfb
Signed-off-by: Gabe Black <gabeblack(a)chromium.org>
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
src/cpu/samsung/exynos5250/cpu.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/cpu/samsung/exynos5250/cpu.c b/src/cpu/samsung/exynos5250/cpu.c
index 0a49e1e..7a565d2 100644
--- a/src/cpu/samsung/exynos5250/cpu.c
+++ b/src/cpu/samsung/exynos5250/cpu.c
@@ -1,9 +1,8 @@
#include <console/console.h>
#include <device/device.h>
-#define RAM_BASE ((CONFIG_SYS_SDRAM_BASE >> 10) + (CONFIG_COREBOOT_ROMSIZE_KB))
-#define RAM_SIZE (((CONFIG_DRAM_SIZE_MB << 10UL) * CONFIG_NR_DRAM_BANKS) \
- - CONFIG_COREBOOT_ROMSIZE_KB)
+#define RAM_BASE (CONFIG_SYS_SDRAM_BASE >> 10)
+#define RAM_SIZE ((CONFIG_DRAM_SIZE_MB << 10UL) * CONFIG_NR_DRAM_BANKS)
static void domain_read_resources(device_t dev)
{
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am 12.03.2013 22:28, schrieb yhlu:
> On Tue, Mar 12, 2013 at 7:04 AM, Patrick Georgi
> <gerrit(a)coreboot.org> wrote:
>
>> as in our case, a bug in the coreboot resource allocator that
>> leaves devices unallocated.
>
> What is the bar address?
0 - thinking about it, there's the other possibility that the (custom)
hardware in question takes longer to enable its PCIe side which didn't
matter on the PCBIOS system it was developed on since that took long
enough to boot.
> Do you have kernel boot log that complains that?
Not at hand, sorry.
Essentially, the kernel determines a 0 BAR for the device and its
bridge and starts allocating them in the region given by ACPI.
ACPI reports the extended region, but the registers we modify in this
change don't cover it completely.
Patrick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iEYEARECAAYFAlE/tzUACgkQfp0gE8eLOvQhagCgjIrm8hTMnIlA1JshAFQgD9zu
j5gAoMMBFWuVze5xA0aaHAvU4dEL1eEB
=gFbx
-----END PGP SIGNATURE-----