1 #define POST_CODE(x) outb(0x80, x)
3 static void pll_reset(void)
5 msr_t msrGlcpSysRstpll;
7 msrGlcpSysRstpll = rdmsr(GLCP_SYS_RSTPLL);
9 print_debug("_MSR GLCP_SYS_RSTPLL (");
10 print_debug_hex32(GLCP_SYS_RSTPLL);
11 print_debug(") value is: ");
12 print_debug_hex32(msrGlcpSysRstpll.hi);
14 print_debug_hex32(msrGlcpSysRstpll.lo);
17 msrGlcpSysRstpll.lo &= 0x80000000;
19 // If the "we've already been here" flag is set, don't reconfigure the pll
20 if ( !(msrGlcpSysRstpll.lo) )
21 { // we haven't configured the PLL; do it now
22 print_debug("CONFIGURING PLL");
26 // HARDCODED VALUES MOVED BACK TO auto.c AS THEY HAVE TO BE BOARD-SPECIFIC
27 // (this file is included from there)
29 /* CPU and GLIU mult/div (GLMC_CLK = GLIU_CLK / 2) */
30 msrGlcpSysRstpll.hi = PLLMSRhi;
32 /* Hold Count - how long we will sit in reset */
33 msrGlcpSysRstpll.lo = PLLMSRlo;
35 /* Use SWFLAGS to remember: "we've already been here" */
36 msrGlcpSysRstpll.lo |= 0x80000000;
38 /* "reset the chip" value */
39 msrGlcpSysRstpll.lo |= 0x00000001;
41 wrmsr(GLCP_SYS_RSTPLL, msrGlcpSysRstpll);