speed up ecc clear by enable MTRR/Cache first.

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1483 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Li-Ta Lo
2004-03-26 18:34:48 +00:00
parent 23e2e18960
commit 8cb91dc9f8
2 changed files with 6 additions and 5 deletions

View File

@@ -134,10 +134,11 @@ static void set_init_ecc_mtrrs(void)
{
msr_t msr;
int i;
disable_cache();
/* First clear all of the msrs to be safe */
for(i = 0; i < MTRR_COUNT; i++) {
for (i = 0; i < MTRR_COUNT; i++) {
msr_t zero;
zero.lo = zero.hi = 0;
wrmsr(MTRRphysBase_MSR(i), zero);
@@ -165,7 +166,6 @@ static void set_init_ecc_mtrrs(void)
enable_cache();
}
static void init_ecc_memory(void)
{
unsigned long startk, begink, endk;