- Initial checkin of the freebios2 tree
[coreboot.git] / src / include / cpu / p6 / mtrr.h
1 #ifndef __LINUXBIOS_CPU_P6_MTRR_H
2 #define __LINUXBIOS_CPU_P6_MTRR_H
3
4 /*  These are the region types  */
5 #define MTRR_TYPE_UNCACHABLE 0
6 #define MTRR_TYPE_WRCOMB     1
7 /*#define MTRR_TYPE_         2*/
8 /*#define MTRR_TYPE_         3*/
9 #define MTRR_TYPE_WRTHROUGH  4
10 #define MTRR_TYPE_WRPROT     5
11 #define MTRR_TYPE_WRBACK     6
12 #define MTRR_NUM_TYPES       7
13
14 #define MTRRcap_MSR     0x0fe
15 #define MTRRdefType_MSR 0x2ff
16
17 #define MTRRphysBase_MSR(reg) (0x200 + 2 * (reg))
18 #define MTRRphysMask_MSR(reg) (0x200 + 2 * (reg) + 1)
19
20 #define NUM_FIXED_RANGES 88
21 #define MTRRfix64K_00000_MSR 0x250
22 #define MTRRfix16K_80000_MSR 0x258
23 #define MTRRfix16K_A0000_MSR 0x259
24 #define MTRRfix4K_C0000_MSR 0x268
25 #define MTRRfix4K_C8000_MSR 0x269
26 #define MTRRfix4K_D0000_MSR 0x26a
27 #define MTRRfix4K_D8000_MSR 0x26b
28 #define MTRRfix4K_E0000_MSR 0x26c
29 #define MTRRfix4K_E8000_MSR 0x26d
30 #define MTRRfix4K_F0000_MSR 0x26e
31 #define MTRRfix4K_F8000_MSR 0x26f
32
33
34 #if !defined(ASSEMBLY)
35
36 void set_var_mtrr(unsigned int reg, unsigned long base, unsigned long size, unsigned char type);
37 #if defined(INTEL_PPRO_MTRR) 
38 struct mem_range;
39 void setup_mtrrs(struct mem_range *mem);
40 #endif
41
42 #endif /* ASSEMBLY */
43
44 #endif /* __LINUXBIOS_CPU_P6_MTRR_H */