Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; version 2 of the License. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #ifndef __ARCH_CPU_H__ |
| 15 | #define __ARCH_CPU_H__ |
| 16 | |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 17 | #include <device/device.h> |
| 18 | |
Kyösti Mälkki | a4e8fb2 | 2019-08-17 04:33:00 +0300 | [diff] [blame] | 19 | #define asmlinkage |
| 20 | |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 21 | struct cpu_driver { |
| 22 | struct device_operations *ops; |
Jonathan Neuschäfer | 8f06ce3 | 2017-11-20 01:56:44 +0100 | [diff] [blame] | 23 | const struct cpu_device_id *id_table; |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | struct thread; |
| 27 | |
| 28 | struct cpu_info { |
Elyes HAOUAS | a92b73f | 2018-09-19 14:09:33 +0200 | [diff] [blame] | 29 | struct device *cpu; |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 30 | unsigned long index; |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 31 | #if CONFIG(COOP_MULTITASKING) |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 32 | struct thread *thread; |
| 33 | #endif |
| 34 | }; |
| 35 | |
Jonathan Neuschäfer | c22ad58 | 2018-11-30 00:06:50 +0100 | [diff] [blame] | 36 | struct cpuinfo_ppc64 { |
| 37 | uint8_t ppc64; /* CPU family */ |
| 38 | uint8_t ppc64_vendor; /* CPU vendor */ |
| 39 | uint8_t ppc64_model; |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 40 | }; |
| 41 | |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 42 | struct cpu_info *cpu_info(void); |
Kyösti Mälkki | a4e8fb2 | 2019-08-17 04:33:00 +0300 | [diff] [blame] | 43 | |
Ronald G. Minnich | 9831244 | 2016-02-12 22:37:48 +0000 | [diff] [blame] | 44 | #endif /* __ARCH_CPU_H__ */ |