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 | |
| 10 | static void zen_2_3_init(struct device *dev) |
| 11 | { |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame^] | 12 | setup_lapic(); |
| 13 | set_cstate_io_addr(); |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 14 | } |
| 15 | |
| 16 | static struct device_operations cpu_dev_ops = { |
| 17 | .init = zen_2_3_init, |
| 18 | }; |
| 19 | |
| 20 | static struct cpu_device_id cpu_table[] = { |
| 21 | { X86_VENDOR_AMD, CEZANNE_A0_CPUID}, |
| 22 | { 0, 0 }, |
| 23 | }; |
| 24 | |
| 25 | static const struct cpu_driver zen_2_3 __cpu_driver = { |
| 26 | .ops = &cpu_dev_ops, |
| 27 | .id_table = cpu_table, |
| 28 | }; |