Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the LinuxBIOS project. |
| 3 | * |
| 4 | * Copyright (C) 2007 Advanced Micro Devices, Inc. |
| 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 | #ifndef AMDFAM10_SYSCONF_H |
| 21 | #define AMDFAM10_SYSCONF_H |
| 22 | |
| 23 | #include "../../../northbridge/amd/amdfam10/amdfam10_nums.h" |
| 24 | |
| 25 | #include <cpu/x86/msr.h> |
| 26 | |
| 27 | struct p_state_t { |
| 28 | unsigned corefreq; |
| 29 | unsigned power; |
| 30 | unsigned transition_lat; |
| 31 | unsigned busmaster_lat; |
| 32 | unsigned control; |
| 33 | unsigned status; |
| 34 | }; |
| 35 | |
| 36 | struct amdfam10_sysconf_t { |
| 37 | //ht |
| 38 | unsigned hc_possible_num; |
| 39 | unsigned pci1234[HC_POSSIBLE_NUM]; |
| 40 | unsigned hcdn[HC_POSSIBLE_NUM]; |
| 41 | unsigned hcid[HC_POSSIBLE_NUM]; //record ht chain type |
| 42 | unsigned sbdn; |
| 43 | unsigned sblk; |
| 44 | |
| 45 | unsigned nodes; |
| 46 | unsigned ht_c_num; // we only can have 32 ht chain at most |
| 47 | unsigned ht_c_conf_bus[HC_NUMS]; // 4-->32: 4:segn, 8:bus_max, 8:bus_min, 4:linkn, 6: nodeid, 2: enable |
| 48 | unsigned io_addr_num; |
| 49 | unsigned conf_io_addr[HC_NUMS]; |
| 50 | unsigned conf_io_addrx[HC_NUMS]; |
| 51 | unsigned mmio_addr_num; |
| 52 | unsigned conf_mmio_addr[HC_NUMS*2]; // mem and pref mem |
| 53 | unsigned conf_mmio_addrx[HC_NUMS*2]; |
| 54 | unsigned segbit; |
| 55 | unsigned hcdn_reg[HC_NUMS]; // it will be used by get_pci1234 |
| 56 | |
| 57 | msr_t msr_pstate[NODE_NUMS * 5]; // quad cores all cores in one node should be the same, and p0,..p5 |
| 58 | unsigned needs_update_pstate_msrs; |
| 59 | struct p_state_t p_state[NODE_NUMS * 5]; |
| 60 | unsigned p_state_num; |
| 61 | |
| 62 | unsigned bsp_apicid; |
| 63 | int enabled_apic_ext_id; |
| 64 | unsigned lift_bsp_apicid; |
| 65 | int apicid_offset; |
| 66 | |
| 67 | void *mb; // pointer for mb releated struct |
| 68 | |
| 69 | }; |
| 70 | |
| 71 | extern struct amdfam10_sysconf_t sysconf; |
| 72 | |
| 73 | #endif |