2 /* be warned, this file will be used other cores and core 0 / node 0 */
3 static inline __attribute__((always_inline)) void disable_cache_as_ram(void)
7 /* We don't need cache as ram for now on */
10 "orl $(0x1<<30),%eax\n\t"
14 "movl $0x269, %ecx\n\t" /* fix4k_c8000*/
18 #if DCACHE_RAM_SIZE > 0x8000
19 "movl $0x268, %ecx\n\t" /* fix4k_c0000*/
23 /* disable fixed mtrr from now on, it will be enabled by linuxbios_ram again*/
24 "movl $0xC0010010, %ecx\n\t"
25 // "movl $SYSCFG_MSR, %ecx\n\t"
27 "andl $(~(3<<18)), %eax\n\t"
28 // "andl $(~(SYSCFG_MSR_MtrrFixDramModEn | SYSCFG_MSR_MtrrFixDramEn)), %eax\n\t"
31 /* Set the default memory type and disable fixed and enable variable MTRRs */
32 "movl $0x2ff, %ecx\n\t"
33 // "movl $MTRRdefType_MSR, %ecx\n\t"
35 /* Enable Variable and Disable Fixed MTRRs */
36 "movl $0x00000800, %eax\n\t"
41 "andl $0x9fffffff,%eax\n\t"
46 /* be warned, this file will be used core 0 / node 0 and ram stack is ready*/
48 static void disable_cache_as_ram_bsp(void)
58 disable_cache_as_ram();