Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame] | 3 | #include <amdblocks/cpu.h> |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 4 | #include <console/console.h> |
| 5 | #include <cpu/cpu.h> |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame] | 6 | #include <cpu/x86/lapic.h> |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 7 | #include <device/device.h> |
| 8 | #include <soc/cpu.h> |
| 9 | |
Felix Held | b2d8a5c | 2021-02-10 16:17:13 +0100 | [diff] [blame] | 10 | void mp_init_cpus(struct bus *cpu_bus) |
| 11 | { |
| 12 | } |
| 13 | |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 14 | static void zen_2_3_init(struct device *dev) |
| 15 | { |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame] | 16 | setup_lapic(); |
| 17 | set_cstate_io_addr(); |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | static struct device_operations cpu_dev_ops = { |
| 21 | .init = zen_2_3_init, |
| 22 | }; |
| 23 | |
| 24 | static struct cpu_device_id cpu_table[] = { |
| 25 | { X86_VENDOR_AMD, CEZANNE_A0_CPUID}, |
| 26 | { 0, 0 }, |
| 27 | }; |
| 28 | |
| 29 | static const struct cpu_driver zen_2_3 __cpu_driver = { |
| 30 | .ops = &cpu_dev_ops, |
| 31 | .id_table = cpu_table, |
| 32 | }; |