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
28 * 0000 0011 1111 1011 | 1000 0000 1101 1110 0000 0000 1000 0001
31 * 0000 0011 1001 1100 | 1000 0000 1101 1110 0000 0000 1000 0001
34 * 0000 0010 1001 1100 | 1000 0000 1101 1110 0000 0000 1000 0001
37 * 0000 0010 1100 1011 | 1000 0000 1101 1110 0000 0000 1000 0001
39 * 00101 1 00101 1 | 100000 0 0 11011110 0000 0000 1000 0001
40 * GLIUMULT GLIUDIV COREMULT COREDIV | SWFLAGS (RO) (RO) HOLD_COUNT
55 * ### 039C ### bad... why?
61 * ### 029C ### good...
71 /* CPU and GLIU mult/div (GLMC_CLK = GLIU_CLK / 2) */
72 msrGlcpSysRstpll.hi = 0x0000029C;
74 /* Hold Count - how long we will sit in reset */
75 msrGlcpSysRstpll.lo = 0x00DE0000;
77 /* Use SWFLAGS to remember: "we've already been here" */
78 msrGlcpSysRstpll.lo |= 0x80000000;
80 /* "reset the chip" value */
81 msrGlcpSysRstpll.lo |= 0x00000001;
83 wrmsr(GLCP_SYS_RSTPLL, msrGlcpSysRstpll);