| 1 |
|
| 2 |
|
| 3 |
#ifndef NORTHBRIDGE_INTEL_I945_H |
| 4 |
#define NORTHBRIDGE_INTEL_I945_H |
| 5 |
|
| 6 |
#include <northbridge/intel/common/fixed_bars.h> |
| 7 |
#include <southbridge/intel/i82801gx/i82801gx.h> |
| 8 |
|
| 9 |
#define DEFAULT_X60BAR 0xfed13000 |
| 10 |
|
| 11 |
|
| 12 |
#define INT15_5F35_CL_DISPLAY_DEFAULT 0 |
| 13 |
#define INT15_5F35_CL_DISPLAY_CRT (1 << 0) |
| 14 |
#define INT15_5F35_CL_DISPLAY_TV (1 << 1) |
| 15 |
#define INT15_5F35_CL_DISPLAY_EFP (1 << 2) |
| 16 |
#define INT15_5F35_CL_DISPLAY_LCD (1 << 3) |
| 17 |
#define INT15_5F35_CL_DISPLAY_CRT2 (1 << 4) |
| 18 |
#define INT15_5F35_CL_DISPLAY_TV2 (1 << 5) |
| 19 |
#define INT15_5F35_CL_DISPLAY_EFP2 (1 << 6) |
| 20 |
#define INT15_5F35_CL_DISPLAY_LCD2 (1 << 7) |
| 21 |
|
| 22 |
|
| 23 |
#define HOST_BRIDGE PCI_DEV(0, 0, 0) |
| 24 |
|
| 25 |
#define EPBAR 0x40 |
| 26 |
#define MCHBAR 0x44 |
| 27 |
#define PCIEXBAR 0x48 |
| 28 |
#define DMIBAR 0x4c |
| 29 |
#define X60BAR 0x60 |
| 30 |
|
| 31 |
#define GGC 0x52 |
| 32 |
|
| 33 |
#define DEVEN 0x54 |
| 34 |
#define DEVEN_D0F0 (1 << 0) |
| 35 |
#define DEVEN_D1F0 (1 << 1) |
| 36 |
#define DEVEN_D2F0 (1 << 3) |
| 37 |
#define DEVEN_D2F1 (1 << 4) |
| 38 |
|
| 39 |
#ifndef BOARD_DEVEN |
| 40 |
#define BOARD_DEVEN (DEVEN_D0F0 | DEVEN_D2F0 | DEVEN_D2F1) |
| 41 |
#endif |
| 42 |
|
| 43 |
#define PAM0 0x90 |
| 44 |
#define PAM1 0x91 |
| 45 |
#define PAM2 0x92 |
| 46 |
#define PAM3 0x93 |
| 47 |
#define PAM4 0x94 |
| 48 |
#define PAM5 0x95 |
| 49 |
#define PAM6 0x96 |
| 50 |
|
| 51 |
#define LAC 0x97 |
| 52 |
#define TOLUD 0x9c |
| 53 |
#define SMRAM 0x9d |
| 54 |
#define ESMRAMC 0x9e |
| 55 |
|
| 56 |
#define TOM 0xa0 |
| 57 |
|
| 58 |
#define SKPAD 0xdc |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
#define PCISTS1 0x06 |
| 63 |
#define SSTS1 0x1e |
| 64 |
#define PEG_CAP 0xa2 |
| 65 |
#define DSTS 0xaa |
| 66 |
#define SLOTCAP 0xb4 |
| 67 |
#define SLOTSTS 0xba |
| 68 |
#define PEG_LC 0xec |
| 69 |
#define PVCCAP1 0x104 |
| 70 |
#define VC0RCTL 0x114 |
| 71 |
#define LE1D 0x150 |
| 72 |
#define LE1A 0x158 |
| 73 |
#define UESTS 0x1c4 |
| 74 |
#define CESTS 0x1d0 |
| 75 |
#define PEGTC 0x204 |
| 76 |
#define PEGCC 0x208 |
| 77 |
#define PEGSTS 0x214 |
| 78 |
|
| 79 |
|
| 80 |
#define IGD_DEV PCI_DEV(0, 2, 0) |
| 81 |
|
| 82 |
#define GMADR 0x18 |
| 83 |
#define GTTADR 0x1c |
| 84 |
#define BSM 0x5c |
| 85 |
#define GCFC 0xf0 |
| 86 |
|
| 87 |
|
| 88 |
#define FSBPMC3 0x40 |
| 89 |
#define FSBPMC4 0x44 |
| 90 |
#define FSBSNPCTL 0x48 |
| 91 |
#define SLPCTL 0x90 |
| 92 |
|
| 93 |
#define C0DRB0 0x100 |
| 94 |
#define C0DRB1 0x101 |
| 95 |
#define C0DRB2 0x102 |
| 96 |
#define C0DRB3 0x103 |
| 97 |
#define C0DRA0 0x108 |
| 98 |
#define C0DRA2 0x109 |
| 99 |
#define C0DCLKDIS 0x10c |
| 100 |
#define C0BNKARC 0x10e |
| 101 |
#define C0DRT0 0x110 |
| 102 |
#define C0DRT1 0x114 |
| 103 |
#define C0DRT2 0x118 |
| 104 |
#define C0DRT3 0x11c |
| 105 |
#define C0DRC0 0x120 |
| 106 |
#define C0DRC1 0x124 |
| 107 |
#define C0DRC2 0x128 |
| 108 |
#define C0AIT 0x130 |
| 109 |
#define C0DCCFT 0x138 |
| 110 |
#define C0GTEW 0x140 |
| 111 |
#define C0GTC 0x144 |
| 112 |
#define C0DTPEW 0x148 |
| 113 |
#define C0DTAEW 0x150 |
| 114 |
#define C0DTC 0x158 |
| 115 |
#define C0DMC 0x164 |
| 116 |
#define C0ODT 0x168 |
| 117 |
|
| 118 |
#define C1DRB0 0x180 |
| 119 |
#define C1DRB1 0x181 |
| 120 |
#define C1DRB2 0x182 |
| 121 |
#define C1DRB3 0x183 |
| 122 |
#define C1DRA0 0x188 |
| 123 |
#define C1DRA2 0x189 |
| 124 |
#define C1DCLKDIS 0x18c |
| 125 |
#define C1BNKARC 0x18e |
| 126 |
#define C1DRT0 0x190 |
| 127 |
#define C1DRT1 0x194 |
| 128 |
#define C1DRT2 0x198 |
| 129 |
#define C1DRT3 0x19c |
| 130 |
#define C1DRC0 0x1a0 |
| 131 |
#define C1DRC1 0x1a4 |
| 132 |
#define C1DRC2 0x1a8 |
| 133 |
#define C1AIT 0x1b0 |
| 134 |
#define C1DCCFT 0x1b8 |
| 135 |
#define C1GTEW 0x1c0 |
| 136 |
#define C1GTC 0x1c4 |
| 137 |
#define C1DTPEW 0x1c8 |
| 138 |
#define C1DTAEW 0x1d0 |
| 139 |
#define C1DTC 0x1d8 |
| 140 |
#define C1DMC 0x1e4 |
| 141 |
#define C1ODT 0x1e8 |
| 142 |
|
| 143 |
#define DCC 0x200 |
| 144 |
#define CCCFT 0x208 |
| 145 |
#define WCC 0x218 |
| 146 |
#define MMARB0 0x220 |
| 147 |
#define MMARB1 0x224 |
| 148 |
#define SBTEST 0x230 |
| 149 |
#define SBOCC 0x238 |
| 150 |
#define ODTC 0x284 |
| 151 |
#define SMVREFC 0x2a0 |
| 152 |
#define DRTST 0x2a8 |
| 153 |
#define REPC 0x2e0 |
| 154 |
#define DQSMT 0x2f4 |
| 155 |
#define RCVENMT 0x2f8 |
| 156 |
|
| 157 |
#define C0R0B00DQST 0x300 |
| 158 |
|
| 159 |
#define C0WL0REOST 0x340 |
| 160 |
#define C0WL1REOST 0x341 |
| 161 |
#define C0WL2REOST 0x342 |
| 162 |
#define C0WL3REOST 0x343 |
| 163 |
#define WDLLBYPMODE 0x360 |
| 164 |
#define C0WDLLCMC 0x36c |
| 165 |
#define C0HCTC 0x37c |
| 166 |
|
| 167 |
#define C1R0B00DQST 0x380 |
| 168 |
|
| 169 |
#define C1WL0REOST 0x3c0 |
| 170 |
#define C1WL1REOST 0x3c1 |
| 171 |
#define C1WL2REOST 0x3c2 |
| 172 |
#define C1WL3REOST 0x3c3 |
| 173 |
#define C1WDLLCMC 0x3ec |
| 174 |
#define C1HCTC 0x3fc |
| 175 |
|
| 176 |
#define GBRCOMPCTL 0x400 |
| 177 |
|
| 178 |
#define SMSRCTL 0x408 |
| 179 |
#define C0DRAMW 0x40c |
| 180 |
#define G1SC 0x410 |
| 181 |
#define G2SC 0x418 |
| 182 |
#define G3SC 0x420 |
| 183 |
#define G4SC 0x428 |
| 184 |
#define G5SC 0x430 |
| 185 |
#define G6SC 0x438 |
| 186 |
|
| 187 |
#define C1DRAMW 0x48c |
| 188 |
#define G7SC 0x490 |
| 189 |
#define G8SC 0x498 |
| 190 |
|
| 191 |
#define G1SRPUT 0x500 |
| 192 |
#define G1SRPDT 0x520 |
| 193 |
#define G2SRPUT 0x540 |
| 194 |
#define G2SRPDT 0x560 |
| 195 |
#define G3SRPUT 0x580 |
| 196 |
#define G3SRPDT 0x5a0 |
| 197 |
#define G4SRPUT 0x5c0 |
| 198 |
#define G4SRPDT 0x5e0 |
| 199 |
#define G5SRPUT 0x600 |
| 200 |
#define G5SRPDT 0x620 |
| 201 |
#define G6SRPUT 0x640 |
| 202 |
#define G6SRPDT 0x660 |
| 203 |
#define G7SRPUT 0x680 |
| 204 |
#define G7SRPDT 0x6a0 |
| 205 |
#define G8SRPUT 0x6c0 |
| 206 |
#define G8SRPDT 0x6e0 |
| 207 |
|
| 208 |
|
| 209 |
#define CLKCFG 0xc00 |
| 210 |
#define UPMC1 0xc14 |
| 211 |
#define CPCTL 0xc16 |
| 212 |
#define SSKPD 0xc1c |
| 213 |
#define UPMC2 0xc20 |
| 214 |
#define UPMC4 0xc30 |
| 215 |
#define PLLMON 0xc34 |
| 216 |
#define HGIPMC2 0xc38 |
| 217 |
|
| 218 |
|
| 219 |
#define TSC1 0xc88 |
| 220 |
#define TSS1 0xc8a |
| 221 |
#define TR1 0xc8b |
| 222 |
#define TSTTP1 0xc8c |
| 223 |
#define TCO1 0xc92 |
| 224 |
#define THERM1_1 0xc94 |
| 225 |
#define TCOF1 0xc96 |
| 226 |
#define TIS1 0xc9a |
| 227 |
#define TSTTP1_2 0xc9c |
| 228 |
#define IUB 0xcd0 |
| 229 |
#define TSC0_1 0xcd8 |
| 230 |
#define TSS0 0xcda |
| 231 |
#define TR0 0xcdb |
| 232 |
#define TSTTP0_1 0xcdc |
| 233 |
#define TCO0 0xce2 |
| 234 |
#define THERM0_1 0xce4 |
| 235 |
#define TCOF0 0xce6 |
| 236 |
#define TIS0 0xcea |
| 237 |
#define TSTTP0_2 0xcec |
| 238 |
#define TERRCMD 0xcf0 |
| 239 |
#define TSMICMD 0xcf1 |
| 240 |
#define TSCICMD 0xcf2 |
| 241 |
#define TINTRCMD 0xcf3 |
| 242 |
#define EXTTSCS 0xcff |
| 243 |
#define DFT_STRAP1 0xe08 |
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
#define MIPMC3 0xbd8 |
| 248 |
|
| 249 |
#define C2C3TT 0xf00 |
| 250 |
#define C3C4TT 0xf04 |
| 251 |
|
| 252 |
#define MIPMC4 0xf08 |
| 253 |
#define MIPMC5 0xf0a |
| 254 |
#define MIPMC6 0xf0c |
| 255 |
#define MIPMC7 0xf0e |
| 256 |
#define PMCFG 0xf10 |
| 257 |
#define SLFRCS 0xf14 |
| 258 |
#define GIPMC1 0xfb0 |
| 259 |
#define FSBPMC1 0xfb8 |
| 260 |
#define UPMC3 0xfc0 |
| 261 |
#define ECO 0xffc |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
#define EPPVCCAP1 0x004 |
| 268 |
#define EPPVCCAP2 0x008 |
| 269 |
|
| 270 |
#define EPVC0RCAP 0x010 |
| 271 |
#define EPVC0RCTL 0x014 |
| 272 |
#define EPVC0RSTS 0x01a |
| 273 |
|
| 274 |
#define EPVC1RCAP 0x01c |
| 275 |
#define EPVC1RCTL 0x020 |
| 276 |
#define EPVC1RSTS 0x026 |
| 277 |
|
| 278 |
#define EPVC1MTS 0x028 |
| 279 |
#define EPVC1IST 0x038 |
| 280 |
|
| 281 |
#define EPESD 0x044 |
| 282 |
|
| 283 |
#define EPLE1D 0x050 |
| 284 |
#define EPLE1A 0x058 |
| 285 |
#define EPLE2D 0x060 |
| 286 |
#define EPLE2A 0x068 |
| 287 |
|
| 288 |
#define PORTARB 0x100 |
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
#define DMIVCECH 0x000 |
| 295 |
#define DMIPVCCAP1 0x004 |
| 296 |
#define DMIPVCCAP2 0x008 |
| 297 |
|
| 298 |
#define DMIPVCCCTL 0x00c |
| 299 |
|
| 300 |
#define DMIVC0RCAP 0x010 |
| 301 |
#define DMIVC0RCTL0 0x014 |
| 302 |
#define DMIVC0RSTS 0x01a |
| 303 |
|
| 304 |
#define DMIVC1RCAP 0x01c |
| 305 |
#define DMIVC1RCTL 0x020 |
| 306 |
#define DMIVC1RSTS 0x026 |
| 307 |
|
| 308 |
#define DMILE1D 0x050 |
| 309 |
#define DMILE1A 0x058 |
| 310 |
#define DMILE2D 0x060 |
| 311 |
#define DMILE2A 0x068 |
| 312 |
|
| 313 |
#define DMILCAP 0x084 |
| 314 |
#define DMILCTL 0x088 |
| 315 |
#define DMILSTS 0x08a |
| 316 |
|
| 317 |
#define DMICTL1 0x0f0 |
| 318 |
#define DMICTL2 0x0fc |
| 319 |
|
| 320 |
#define DMICC 0x208 |
| 321 |
|
| 322 |
#define DMIDRCCFG 0xeb4 |
| 323 |
|
| 324 |
int i945_silicon_revision(void); |
| 325 |
void i945_early_initialization(void); |
| 326 |
void i945_late_initialization(int s3resume); |
| 327 |
|
| 328 |
|
| 329 |
void print_pci_devices(void); |
| 330 |
void dump_pci_device(unsigned int dev); |
| 331 |
void dump_pci_devices(void); |
| 332 |
void dump_spd_registers(u8 spd_map[4]); |
| 333 |
void sdram_dump_mchbar_registers(void); |
| 334 |
|
| 335 |
u32 decode_igd_memory_size(u32 gms); |
| 336 |
u32 decode_tseg_size(const u8 esmramc); |
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
void mainboard_lpc_decode(void); |
| 341 |
|
| 342 |
void mainboard_pre_raminit_config(int s3_resume); |
| 343 |
|
| 344 |
void mainboard_late_rcba_config(void); |
| 345 |
|
| 346 |
void mainboard_get_spd_map(u8 spd_map[4]); |
| 347 |
|
| 348 |
#endif |