[LinuxBIOS] Messing with CAR in a big way
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Sat Jan 12 02:32:52 CET 2008
On 12.01.2008 02:23, ron minnich wrote:
> On Jan 11, 2008 5:10 PM, Carl-Daniel Hailfinger
> <c-d.hailfinger.devel.2006 at gmx.net> wrote:
>
>
>> Do you want CAR to start at 0x80000 and end at 0x87FFF
>>
>
> Oh shoot, I just realized, on LX it goes from 88000 to 88fff. But it
> doesn't matter that much. 80000 to 87fff is fine too.
>
No problem, try this one:
Index: LinuxBIOSv2-myCAR/src/cpu/amd/car/cache_as_ram.inc
===================================================================
--- LinuxBIOSv2-myCAR/src/cpu/amd/car/cache_as_ram.inc (Revision 3044)
+++ LinuxBIOSv2-myCAR/src/cpu/amd/car/cache_as_ram.inc (Arbeitskopie)
@@ -19,7 +19,7 @@
*/
#define CacheSize DCACHE_RAM_SIZE
-#define CacheBase (0xd0000 - CacheSize)
+#define CacheBase (0x90000 - CacheSize)
/* leave some space for global variable to pass to RAM stage */
#define GlobalVarSize DCACHE_RAM_GLOBAL_VAR_SIZE
@@ -181,6 +181,7 @@
#error Invalid CAR size, is not a multiple of 4k. This is a processor limitation.
#endif
+#if 0
#if CacheSize > 0x8000
/* enable caching for 32K-64K using fixed mtrr */
movl $0x268, %ecx /* fix4k_c0000*/
@@ -191,6 +192,14 @@
/* enable caching for 0-32K using fixed mtrr */
movl $0x269, %ecx /* fix4k_c8000*/
simplemask CacheSize, 0
+#endif
+#if CacheSize != 0x8000
+#error The new code wants CacheSize to be exactly 32k for now.
+#endif
+ /* Enable caching from 0x88000-0x8FFFF */
+ movl $0x06060000, %eax
+ xorl %edx, %edx
+ movl $0x258, %ecx
wrmsr
/* enable memory access for first MBs using top_mem */
More information about the coreboot
mailing list