2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 QingPei Wang <wangqingpei@gmail.com>
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.
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.
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
20 #include <console/console.h>
21 #include <device/device.h>
22 #include <device/pci.h>
24 #include <boot/tables.h>
25 #include <cpu/x86/msr.h>
26 #include <cpu/amd/mtrr.h>
27 #include <device/pci_def.h>
28 #include "SbPlatform.h"
31 u8 is_dev3_present(void);
32 void set_pcie_dereset(void);
33 void set_pcie_reset(void);
35 void set_pcie_dereset()
39 void set_pcie_reset(void)
43 u8 is_dev3_present(void)
49 /*************************************************
50 * enable the dedicated function in M5A99X-EVO board.
51 * This function called early than rs780_enable.
52 *************************************************/
53 static void m5a99x_evo_enable(device_t dev)
56 printk(BIOS_INFO, "Mainboard ASUS M5A99X-EVO Enable. dev=0x%p\n", dev);
60 /* TOP_MEM: the top of DRAM below 4G */
63 (BIOS_INFO, "%s, TOP MEM: msr.lo = 0x%08x, msr.hi = 0x%08x\n",
64 __func__, msr.lo, msr.hi);
66 /* TOP_MEM2: the top of DRAM above 4G */
67 msr2 = rdmsr(TOP_MEM2);
69 (BIOS_INFO, "%s, TOP MEM2: msr2.lo = 0x%08x, msr2.hi = 0x%08x\n",
70 __func__, msr2.lo, msr2.hi);
75 int add_mainboard_resources(struct lb_memory *mem)
77 /* UMA is removed from system memory in the northbridge code, but
78 * in some circumstances we want the memory mentioned as reserved.
83 struct chip_operations mainboard_ops = {
84 CHIP_NAME("ASUS M5A99X-EVO Mainboard")
85 .enable_dev = m5a99x_evo_enable,