Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 1 | /* |
Stefan Reinauer | 7e61e45 | 2008-01-18 10:35:56 +0000 | [diff] [blame] | 2 | * This file is part of the coreboot project. |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 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. |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #ifndef CPU_AMD_QUADCORE_H |
| 17 | #define CPU_AMD_QUADCORE_H |
| 18 | |
Stefan Reinauer | 9a16e3e | 2010-03-29 14:45:36 +0000 | [diff] [blame] | 19 | u32 read_nb_cfg_54(void); |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 20 | |
| 21 | struct node_core_id { |
| 22 | u32 nodeid; |
| 23 | u32 coreid; |
| 24 | }; |
| 25 | |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 26 | // it can be used to get unitid and coreid it running only |
| 27 | struct node_core_id get_node_core_id(u32 nb_cfg_54); |
Stefan Reinauer | 6f57b51 | 2010-07-08 16:41:05 +0000 | [diff] [blame] | 28 | struct node_core_id get_node_core_id_x(void); |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 29 | |
Stefan Reinauer | 35b6bbb | 2010-03-28 21:26:54 +0000 | [diff] [blame] | 30 | #if !defined(__PRE_RAM__) |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 31 | struct device; |
| 32 | u32 get_apicid_base(u32 ioapic_num); |
| 33 | void amd_sibling_init(struct device *cpu); |
Stefan Reinauer | 5e33e82 | 2010-07-07 21:59:06 +0000 | [diff] [blame] | 34 | #else |
Stefan Reinauer | 6f57b51 | 2010-07-08 16:41:05 +0000 | [diff] [blame] | 35 | void wait_all_core0_started(void); |
Stefan Reinauer | 5e33e82 | 2010-07-07 21:59:06 +0000 | [diff] [blame] | 36 | void wait_all_other_cores_started(u32 bsp_apicid); |
| 37 | void wait_all_aps_started(u32 bsp_apicid); |
Stefan Reinauer | 817d754 | 2010-07-08 00:37:23 +0000 | [diff] [blame] | 38 | void allow_all_aps_stop(u32 bsp_apicid); |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 39 | #endif |
Stefan Reinauer | 817d754 | 2010-07-08 00:37:23 +0000 | [diff] [blame] | 40 | u32 get_initial_apicid(void); |
Marc Jones | 8ae8c88 | 2007-12-19 01:32:08 +0000 | [diff] [blame] | 41 | |
| 42 | #endif /* CPU_AMD_QUADCORE_H */ |