Timothy Pearson (tpearson(a)raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14263
-gerrit
commit 300ae6c76689b49f809c59cd5ff754bbc3e8a3ba
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Wed Apr 6 13:18:52 2016 -0500
sb/amd/sb700: Add sb7xx_51xx_decode_last_reset()
The SB700 family has the ability to report the last reset
reason. This is useful in the context of handling MCEs
and recovering from fatal errors / sync floods.
Add a function to retrieve the last reset flags.
Change-Id: I754cb25e47bd9c1e4a29ecb6cb18017d1b7c3dc4
Signed-off-by: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
---
src/southbridge/amd/sb700/early_setup.c | 13 ++++++++++++-
src/southbridge/amd/sb700/sb700.h | 1 +
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/southbridge/amd/sb700/early_setup.c b/src/southbridge/amd/sb700/early_setup.c
index 8042849..ffdd34b 100644
--- a/src/southbridge/amd/sb700/early_setup.c
+++ b/src/southbridge/amd/sb700/early_setup.c
@@ -2,7 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2010 Advanced Micro Devices, Inc.
- * Copyright (C) 2015 Timothy Pearson <tpearson(a)raptorengineeringinc.com>, Raptor Engineering
+ * Copyright (C) 2015 - 2016 Raptor Engineering, LLC
*
* 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
@@ -758,6 +758,17 @@ static void sb700_por_init(void)
sb700_pmio_por_init();
}
+uint16_t sb7xx_51xx_decode_last_reset(void) {
+ uint16_t reset_status = 0;
+ reset_status |= pmio_read(0x44);
+ reset_status |= (pmio_read(0x45) << 8);
+ printk(BIOS_INFO, "sb700 reset flags: %04x\n", reset_status);
+ if (reset_status & (0x1 << 10))
+ printk(BIOS_WARNING, "WARNING: Last reset was caused by fatal error / sync flood!\n");
+
+ return reset_status;
+}
+
/*
* It should be called during early POST after memory detection and BIOS shadowing but before PCI bus enumeration.
*/
diff --git a/src/southbridge/amd/sb700/sb700.h b/src/southbridge/amd/sb700/sb700.h
index f895811..f23956c 100644
--- a/src/southbridge/amd/sb700/sb700.h
+++ b/src/southbridge/amd/sb700/sb700.h
@@ -66,6 +66,7 @@ void sb7xx_51xx_enable_wideio(u8 wio_index, u16 base);
void sb7xx_51xx_disable_wideio(u8 wio_index);
void sb7xx_51xx_early_setup(void);
void sb7xx_51xx_before_pci_init(void);
+uint16_t sb7xx_51xx_decode_last_reset(void);
#else
#include <device/pci.h>
/* allow override in mainboard.c */
the following patch was just integrated into master:
commit 45f77b81a49de76cb723ca4c5af7d89a97e67016
Author: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Date: Sun Apr 3 20:52:01 2016 -0700
crossgcc: Fix compilation on Clang systems
Most cross compilers fail to compile on systems with Clang being the
default compiler (OS X and some BSDs). Clang dislikes some of GCC's
autogenerated code. We also missed switching CFLAGS to CXXFLAGS when GCC
switched to C++ compilation per default.
Change-Id: I87caa1a15982c431048aa79748ea7ef655a9a3a1
Signed-off-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-on: https://review.coreboot.org/14232
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/14232 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/14174
-gerrit
commit 7f0813a23d32dd61d9bac37d7a95381b5f41c908
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Mar 26 17:20:02 2016 +0100
nb/intel/sandybridge/raminit: support calling dram_freq multiple times
The PLL will never lock if the requested frequency is already set.
As the fallback may request the same frequency again exit early
to prevent a hang.
Test system:
* Gigabyte GA-B75M-D3H
* Intel Pentium CPU G2130
Change-Id: I625b2956346d8c50cca84def6190c076bf99dbec
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/northbridge/intel/sandybridge/raminit.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index 19ca1b0..c32c855 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -810,6 +810,17 @@ static void dram_freq(ramctr_timing * ctrl)
/* Frequency mulitplier. */
u32 FRQ = get_FRQ(ctrl->tCK);
+ /* The PLL will never lock if the required frequency is
+ * already set. Exit early to prevent a system hang.
+ */
+ reg1 = MCHBAR32(0x5e04);
+ val2 = (u8) reg1;
+ if (val2 == FRQ) {
+ printk(BIOS_DEBUG, "MCU frequency is set at : %d MHz\n",
+ (1000 << 8) / ctrl->tCK);
+ return;
+ }
+
/* Step 2 - Select frequency in the MCU */
reg1 = FRQ;
reg1 |= 0x80000000; // set running bit
Patrick Rudolph (siro(a)das-labor.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14174
-gerrit
commit e6858d07550d7d13e6829c23f0cc2377b9e24cb8
Author: Patrick Rudolph <siro(a)das-labor.org>
Date: Sat Mar 26 17:20:02 2016 +0100
nb/intel/sandybridge/raminit: support calling dram_freq multiple times
The PLL will never lock if the requested frequency is already set.
As the fallback may request the same frequency again exit early
to prevent a hang.
Test system:
* Gigabyte GA-B75M-D3H
* Intel Pentium CPU G2130
Change-Id: I625b2956346d8c50cca84def6190c076bf99dbec
Signed-off-by: Patrick Rudolph <siro(a)das-labor.org>
---
src/northbridge/intel/sandybridge/raminit.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c
index b71f2ad..c812a24 100644
--- a/src/northbridge/intel/sandybridge/raminit.c
+++ b/src/northbridge/intel/sandybridge/raminit.c
@@ -810,6 +810,17 @@ static void dram_freq(ramctr_timing * ctrl)
/* Frequency mulitplier. */
u32 FRQ = get_FRQ(ctrl->tCK);
+ /* The PLL will never lock if the required frequency is
+ * already set. Exit early to prevent a system hang.
+ */
+ reg1 = MCHBAR32(0x5e04);
+ val2 = (u8) reg1;
+ if (val2 == FRQ) {
+ printk(BIOS_DEBUG, "MCU frequency is set at : %d MHz\n",
+ (1000 << 8) / ctrl->tCK);
+ return;
+ }
+
/* Step 2 - Select frequency in the MCU */
reg1 = FRQ;
reg1 |= 0x80000000; // set running bit