2 * This file is part of the coreboot project.
4 * Copyright (C) 2011 Advanced Micro Devices, Inc.
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 #ifndef CPU_AMD_FAM12_H
21 #define CPU_AMD_FAM12_H
23 #include <cpu/x86/msr.h>
25 #define HWCR_MSR 0xC0010015
26 #define NB_CFG_MSR 0xC001001f
27 #define LS_CFG_MSR 0xC0011020
28 #define IC_CFG_MSR 0xC0011021
29 #define DC_CFG_MSR 0xC0011022
30 #define BU_CFG_MSR 0xC0011023
31 #define BU_CFG2_MSR 0xC001102A
33 #define CPU_ID_FEATURES_MSR 0xC0011004
34 #define CPU_ID_EXT_FEATURES_MSR 0xC0011005
36 msr_t rdmsr_amd(u32 index);
37 void wrmsr_amd(u32 index, msr_t msr);
39 //#if defined(__GNUC__)
40 //// it can be used to get unitid and coreid it running only
41 //struct node_core_id get_node_core_id(u32 nb_cfg_54);
42 //struct node_core_id get_node_core_id_x(void);
45 #if defined(__PRE_RAM__)
46 void wait_all_core0_started(void);
47 void wait_all_other_cores_started(u32 bsp_apicid);
48 void wait_all_aps_started(u32 bsp_apicid);
49 void allow_all_aps_stop(u32 bsp_apicid);
51 void get_bus_conf(void);
52 u32 get_initial_apicid(void);
54 #endif /* CPU_AMD_FAM12_H */