blob: b3a82379b4c01a4a9caaec9ce93c13f7954a5ff7 [file] [log] [blame]
Marc Jones8ae8c882007-12-19 01:32:08 +00001/*
Stefan Reinauer7e61e452008-01-18 10:35:56 +00002 * This file is part of the coreboot project.
Marc Jones8ae8c882007-12-19 01:32:08 +00003 *
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 Jones8ae8c882007-12-19 01:32:08 +000014 */
15
16#ifndef CPU_AMD_QUADCORE_H
17#define CPU_AMD_QUADCORE_H
18
Stefan Reinauer9a16e3e2010-03-29 14:45:36 +000019u32 read_nb_cfg_54(void);
Marc Jones8ae8c882007-12-19 01:32:08 +000020
21struct node_core_id {
22 u32 nodeid;
23 u32 coreid;
24};
25
Marc Jones8ae8c882007-12-19 01:32:08 +000026// it can be used to get unitid and coreid it running only
27struct node_core_id get_node_core_id(u32 nb_cfg_54);
Stefan Reinauer6f57b512010-07-08 16:41:05 +000028struct node_core_id get_node_core_id_x(void);
Marc Jones8ae8c882007-12-19 01:32:08 +000029
Stefan Reinauer35b6bbb2010-03-28 21:26:54 +000030#if !defined(__PRE_RAM__)
Marc Jones8ae8c882007-12-19 01:32:08 +000031struct device;
32u32 get_apicid_base(u32 ioapic_num);
33void amd_sibling_init(struct device *cpu);
Stefan Reinauer5e33e822010-07-07 21:59:06 +000034#else
Stefan Reinauer6f57b512010-07-08 16:41:05 +000035void wait_all_core0_started(void);
Stefan Reinauer5e33e822010-07-07 21:59:06 +000036void wait_all_other_cores_started(u32 bsp_apicid);
37void wait_all_aps_started(u32 bsp_apicid);
Stefan Reinauer817d7542010-07-08 00:37:23 +000038void allow_all_aps_stop(u32 bsp_apicid);
Marc Jones8ae8c882007-12-19 01:32:08 +000039#endif
Stefan Reinauer817d7542010-07-08 00:37:23 +000040u32 get_initial_apicid(void);
Marc Jones8ae8c882007-12-19 01:32:08 +000041
42#endif /* CPU_AMD_QUADCORE_H */