* clean up all but two warnings on artecgroup dbe61
[coreboot.git] / src / cpu / amd / model_lx / msrinit.c
1 /*
2  * This file is part of the coreboot project.
3  * 
4  * Copyright (C) 2010 coresystems GmbH
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19
20 struct msrinit {
21         u32 msrnum;
22         msr_t msr;
23 };
24
25 static const struct msrinit msr_table[] = 
26 {
27         {CPU_RCONF_DEFAULT, {.hi = 0x24fffc02,.lo = 0x1000A000}}, /* Setup access to cache under 1MB.
28                                                                    * Rom Properties: Write Serialize, WriteProtect.
29                                                                    * RomBase: 0xFFFC0
30                                                                    * SysTop to RomBase Properties: Write Serialize, Cache Disable.
31                                                                    * SysTop: 0x000A0
32                                                                    * System Memory Properties:  (Write Back) */
33         {CPU_RCONF_A0_BF,   {.hi = 0x00000000,.lo = 0x00000000}}, /* 0xA0000-0xBFFFF : (Write Back) */
34         {CPU_RCONF_C0_DF,   {.hi = 0x00000000,.lo = 0x00000000}}, /* 0xC0000-0xDFFFF : (Write Back) */
35         {CPU_RCONF_E0_FF,   {.hi = 0x00000000,.lo = 0x00000000}}, /* 0xE0000-0xFFFFF : (Write Back) */
36        
37         /* Setup access to memory under 1MB. Note: VGA hole at 0xA0000-0xBFFFF */
38         {MSR_GLIU0_BASE1,   {.hi = 0x20000000,.lo = 0x000fff80}}, // 0x00000-0x7FFFF
39         {MSR_GLIU0_BASE2,   {.hi = 0x20000000,.lo = 0x080fffe0}}, // 0x80000-0x9FFFF
40         {MSR_GLIU0_SHADOW,  {.hi = 0x2000FFFF,.lo = 0xFFFF0003}}, // 0xC0000-0xFFFFF
41         {MSR_GLIU1_BASE1,   {.hi = 0x20000000,.lo = 0x000fff80}}, // 0x00000-0x7FFFF
42         {MSR_GLIU1_BASE2,   {.hi = 0x20000000,.lo = 0x080fffe0}}, // 0x80000-0x9FFFF
43         {MSR_GLIU1_SHADOW,  {.hi = 0x2000FFFF,.lo = 0xFFFF0003}}, // 0xC0000-0xFFFFF
44 };
45
46 static void msr_init(void)
47 {
48         int i;
49         for (i = 0; i < ARRAY_SIZE(msr_table); i++)
50                 wrmsr(msr_table[i].msrnum, msr_table[i].msr);
51 }
52
53