summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2015-10-21 18:05:01 +0200
committerNico Huber <nico.h@gmx.de>2016-01-14 21:20:20 +0100
commitad342a4589df6c51c96c1e9110979964b244fec3 (patch)
treef7b703fa6db342d17804299632604ec18eb956a7
parentca374d34ed9246baf4fef97214bedd4c16c105a5 (diff)
downloadcoreboot-ad342a4589df6c51c96c1e9110979964b244fec3.tar.gz
coreboot-ad342a4589df6c51c96c1e9110979964b244fec3.tar.bz2
coreboot-ad342a4589df6c51c96c1e9110979964b244fec3.zip
nb/intel/sandybridge: Fix PEG disablement4.2
Fix regression introduced by: 3660c0fc658e4e20ef079f762dfc7ad05c83544c "northbridge/intel/sandybridge: Enable PEG clock-gating on demand" Issue observed: GNU/Linux kernel crashes in earlyinit on systems without PEG devices. The crash occurs on every boot in different functions. There's no problem on systems with PEG enabled. Test system: * Lenovo T530 * Intel Core i5-3320M CPU * Fedora GNU/Linux 4.1 * PEG disabled in devicetree Problem description: Tests shows that modifing PEG chicken bit or device enable bits after setting BIOS_RESET_CPL causes random crashes in GNU/Linux. Problem solution: Disable PEG devices before setting BIOS_RESET_CPL. Final testing results: No more random kernel crashes. Change-Id: I4a967c2d00d7d1e4426cf5abdd5f616c21557da7 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: http://review.coreboot.org/12112 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de> (cherry picked from commit aad34cda4bc9c14ed10b00fe5da3f32233257913) Reviewed-on: https://review.coreboot.org/12456 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/northbridge/intel/sandybridge/northbridge.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c
index 76f03f3ba91b..ff6849e1cfa6 100644
--- a/src/northbridge/intel/sandybridge/northbridge.c
+++ b/src/northbridge/intel/sandybridge/northbridge.c
@@ -431,6 +431,11 @@ static void northbridge_init(struct device *dev)
}
MCHBAR32(0x5f10) = bridge_type;
+ /* Turn off unused devices. Has to be done before
+ * setting BIOS_RESET_CPL.
+ */
+ disable_peg();
+
/*
* Set bit 0 of BIOS_RESET_CPL to indicate to the CPU
* that BIOS has initialized memory and power management
@@ -456,9 +461,6 @@ static void northbridge_init(struct device *dev)
/* Set here before graphics PM init */
MCHBAR32(0x5500) = 0x00100001;
-
- /* Turn off unused devices */
- disable_peg();
}
static void northbridge_enable(device_t dev)