Eric Biederman | c84c190 | 2004-10-14 20:13:01 +0000 | [diff] [blame] | 1 | #ifndef CPU_AMD_MTRR_H |
| 2 | #define CPU_AMD_MTRR_H |
| 3 | |
| 4 | #define IORR_FIRST 0xC0010016 |
| 5 | #define IORR_LAST 0xC0010019 |
| 6 | |
| 7 | #define MTRR_READ_MEM (1 << 4) |
| 8 | #define MTRR_WRITE_MEM (1 << 3) |
| 9 | |
| 10 | #define SYSCFG_MSR 0xC0010010 |
| 11 | #define SYSCFG_MSR_TOM2En (1 << 21) |
| 12 | #define SYSCFG_MSR_MtrrVarDramEn (1 << 20) |
| 13 | #define SYSCFG_MSR_MtrrFixDramModEn (1 << 19) |
| 14 | #define SYSCFG_MSR_MtrrFixDramEn (1 << 18) |
| 15 | #define SYSCFG_MSR_UcLockEn (1 << 17) |
| 16 | #define SYSCFG_MSR_ChxToDirtyDis (1 << 16) |
| 17 | #define SYSCFG_MSR_ClVicBlkEn (1 << 11) |
| 18 | #define SYSCFG_MSR_SetDirtyEnO (1 << 10) |
| 19 | #define SYSCFG_MSR_SetDirtyEnS (1 << 9) |
| 20 | #define SYSCFG_MSR_SetDirtyEnE (1 << 8) |
| 21 | #define SYSCFG_MSR_SysVicLimitMask ((1 << 8) - (1 << 5)) |
| 22 | #define SYSCFG_MSR_SysAckLimitMask ((1 << 5) - (1 << 0)) |
| 23 | |
Warren Turkal | 4ffde94 | 2010-10-12 06:13:40 +0000 | [diff] [blame^] | 24 | #define IORRBase_MSR(reg) (0xC0010016 + 2 * (reg)) |
| 25 | #define IORRMask_MSR(reg) (0xC0010016 + 2 * (reg) + 1) |
| 26 | |
| 27 | #define TOP_MEM_MSR 0xC001001A |
| 28 | #define TOP_MEM2_MSR 0xC001001D |
| 29 | #define TOP_MEM TOP_MEM_MSR |
| 30 | #define TOP_MEM2 TOP_MEM2_MSR |
Eric Biederman | c84c190 | 2004-10-14 20:13:01 +0000 | [diff] [blame] | 31 | |
| 32 | #define TOP_MEM_MASK 0x007fffff |
| 33 | #define TOP_MEM_MASK_KB (TOP_MEM_MASK >> 10) |
| 34 | |
Stefan Reinauer | 35b6bbb | 2010-03-28 21:26:54 +0000 | [diff] [blame] | 35 | #if !defined(__PRE_RAM__) && !defined(ASSEMBLY) |
Eric Biederman | c84c190 | 2004-10-14 20:13:01 +0000 | [diff] [blame] | 36 | void amd_setup_mtrrs(void); |
Stefan Reinauer | 35b6bbb | 2010-03-28 21:26:54 +0000 | [diff] [blame] | 37 | #endif |
Eric Biederman | c84c190 | 2004-10-14 20:13:01 +0000 | [diff] [blame] | 38 | |
| 39 | #endif /* CPU_AMD_MTRR_H */ |