1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#include <types.h>
22#include <lib.h>
23#include <console.h>
24#include <device/device.h>
25#include <device/pci.h>
26#include <string.h>
27#include <msr.h>
28#include <io.h>
29#include <amd_geodelx.h>
30#include <southbridge/amd/cs5536/cs5536.h>
31#include <northbridge/amd/geodelx/raminit.h>
32#include <arch/x86/msr.h>
33
34static const struct msrinit dbe61_msr[] = {
35 {.msrnum = 0x10000020, {.lo = 0x00fff80, .hi = 0x20000000}},
36 {.msrnum = 0x10000021, {.lo = 0x80fffe0, .hi = 0x20000000}},
37 {.msrnum = 0x40000020, {.lo = 0x00fff80, .hi = 0x20000000}},
38 {.msrnum = 0x40000021, {.lo = 0x80fffe0, .hi = 0x20000000}},
39};
40
41static void dbe61_msr_init(void)
42{
43 int i;
44 for (i = 0; i < ARRAY_SIZE(dbe61_msr); i++)
45 wrmsr(dbe61_msr[i].msrnum, dbe61_msr[i].msr);
46}
47
48void hardware_stage1(void)
49{
50 post_code(POST_START_OF_MAIN);
51
52 dbe61_msr_init();
53
54 cs5536_stage1();
55
56
57
58
59
60 cs5536_setup_onchipuart(2);
61
62
63 outb(0xf4,0x88);
64}
65
66void mainboard_pre_payload(void)
67{
68 geode_pre_payload();
69 banner(BIOS_DEBUG, "mainboard_pre_payload: done");
70}
71