Patch attached, only build tested. -Corey
Use the CONFIG_COREBOOT_ROMSIZE_KB to figure out the rom cache size on core2, instead of using a hardcoded value.
Signed-off-by: Corey Osgood <[email protected]> Index: arch/x86/intel/core2/stage0.S =================================================================== --- arch/x86/intel/core2/stage0.S (revision 1101) +++ arch/x86/intel/core2/stage0.S (working copy) @@ -22,8 +22,9 @@ #define CACHE_AS_RAM_SIZE CONFIG_CARSIZE #define CACHE_AS_RAM_BASE CONFIG_CARBASE -#define XIP_ROM_BASE 0xfff00000 -#define XIP_ROM_SIZE 0x00100000 +#ifndef CACHE_CBROM +#define CACHE_CBROM +#endif #include <mtrr.h> @@ -137,18 +138,18 @@ orl $(1 << 30), %eax movl %eax, %cr0 -#if defined(XIP_ROM_SIZE) && defined(XIP_ROM_BASE) +#ifdef CACHE_CBROM /* Enable cache for our code in Flash because we do XIP here */ movl $MTRRphysBase_MSR(1), %ecx xorl %edx, %edx - movl $(XIP_ROM_BASE | MTRR_TYPE_WRBACK), %eax + movl $((0x100000000 - (CONFIG_COREBOOT_ROMSIZE_KB * 1024)) | MTRR_TYPE_WRBACK), %eax wrmsr movl $MTRRphysMask_MSR(1), %ecx movl $0x0000000f, %edx - movl $(~(XIP_ROM_SIZE - 1) | 0x800), %eax + movl $(~((CONFIG_COREBOOT_ROMSIZE_KB * 1024) - 1) | 0x800), %eax wrmsr -#endif /* XIP_ROM_SIZE && XIP_ROM_BASE */ +#endif /* CACHE_CBROM */ /* enable cache */ movl %cr0, %eax
-- coreboot mailing list: [email protected] http://www.coreboot.org/mailman/listinfo/coreboot

