blob: 89816903c816bdb56ead82a847f849874277992c [file] [log] [blame]
Ronald G. Minnich98312442016-02-12 22:37:48 +00001/*
2 * This file is part of the coreboot project.
3 *
Ronald G. Minnich98312442016-02-12 22:37:48 +00004 * 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. Minnich98312442016-02-12 22:37:48 +000017#include <device/device.h>
18
Kyösti Mälkkia4e8fb22019-08-17 04:33:00 +030019#define asmlinkage
20
Ronald G. Minnich98312442016-02-12 22:37:48 +000021struct cpu_driver {
22 struct device_operations *ops;
Jonathan Neuschäfer8f06ce32017-11-20 01:56:44 +010023 const struct cpu_device_id *id_table;
Ronald G. Minnich98312442016-02-12 22:37:48 +000024};
25
26struct thread;
27
28struct cpu_info {
Elyes HAOUASa92b73f2018-09-19 14:09:33 +020029 struct device *cpu;
Ronald G. Minnich98312442016-02-12 22:37:48 +000030 unsigned long index;
Julius Wernercd49cce2019-03-05 16:53:33 -080031#if CONFIG(COOP_MULTITASKING)
Ronald G. Minnich98312442016-02-12 22:37:48 +000032 struct thread *thread;
33#endif
34};
35
Jonathan Neuschäferc22ad582018-11-30 00:06:50 +010036struct cpuinfo_ppc64 {
37 uint8_t ppc64; /* CPU family */
38 uint8_t ppc64_vendor; /* CPU vendor */
39 uint8_t ppc64_model;
Ronald G. Minnich98312442016-02-12 22:37:48 +000040};
41
Ronald G. Minnich98312442016-02-12 22:37:48 +000042struct cpu_info *cpu_info(void);
Kyösti Mälkkia4e8fb22019-08-17 04:33:00 +030043
Ronald G. Minnich98312442016-02-12 22:37:48 +000044#endif /* __ARCH_CPU_H__ */