[coreboot-gerrit] Change in coreboot[master]: nb/intel/i945: Correct udelay for Netburst
Elyes HAOUAS (Code Review)
gerrit at coreboot.org
Sat Jun 30 09:35:58 CEST 2018
Elyes HAOUAS has uploaded this change for review. ( https://review.coreboot.org/27296
Change subject: nb/intel/i945: Correct udelay for Netburst
......................................................................
nb/intel/i945: Correct udelay for Netburst
NetBurst have FSB information at MSR_EBC_FREQUENCY_ID.
Change-Id: I588383dbdfd3d630c605c7d4d6014a3f82354e68
Signed-off-by: Elyes HAOUAS <ehaouas at noos.fr>
---
M src/northbridge/intel/i945/udelay.c
1 file changed, 12 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/27296/1
diff --git a/src/northbridge/intel/i945/udelay.c b/src/northbridge/intel/i945/udelay.c
index 8447453..b02f13b 100644
--- a/src/northbridge/intel/i945/udelay.c
+++ b/src/northbridge/intel/i945/udelay.c
@@ -18,6 +18,7 @@
#include <cpu/x86/tsc.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/speedstep.h>
+#include <arch/cpu.h>
/**
* Intel Core(tm) CPUs always run the TSC at the maximum possible CPU clock
@@ -30,9 +31,18 @@
msr_t msr;
u32 fsb = 0, divisor;
u32 d; /* ticks per us */
+ u8 fsbcfg;
+ const u32 eax = cpuid_eax(1);
- msr = rdmsr(MSR_FSB_FREQ);
- switch (msr.lo & 0x07) {
+ if (((eax >> 8) & 0xf) == 0xf) {
+ msr = rdmsr(MSR_EBC_FREQUENCY_ID);
+ fsbcfg = (msr.lo >> 16) & 0x7;
+ } else {
+ msr = rdmsr(MSR_FSB_FREQ);
+ fsbcfg = msr.lo & 0x7;
+ }
+
+ switch (fsbcfg) {
case 5:
fsb = 400;
break;
--
To view, visit https://review.coreboot.org/27296
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I588383dbdfd3d630c605c7d4d6014a3f82354e68
Gerrit-Change-Number: 27296
Gerrit-PatchSet: 1
Gerrit-Owner: Elyes HAOUAS <ehaouas at noos.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180630/f96cc494/attachment.html>
More information about the coreboot-gerrit
mailing list