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> |
Raul E Rangel | 35dc4b0 | 2021-02-12 16:04:27 -0700 | [diff] [blame] | 5 | #include <cpu/amd/microcode.h> |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 6 | #include <cpu/cpu.h> |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame] | 7 | #include <cpu/x86/lapic.h> |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 8 | #include <device/device.h> |
| 9 | #include <soc/cpu.h> |
| 10 | |
Felix Held | b2d8a5c | 2021-02-10 16:17:13 +0100 | [diff] [blame] | 11 | void mp_init_cpus(struct bus *cpu_bus) |
| 12 | { |
| 13 | } |
| 14 | |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 15 | static void zen_2_3_init(struct device *dev) |
| 16 | { |
Felix Held | aa77d13 | 2021-02-10 16:13:56 +0100 | [diff] [blame] | 17 | setup_lapic(); |
| 18 | set_cstate_io_addr(); |
Raul E Rangel | 35dc4b0 | 2021-02-12 16:04:27 -0700 | [diff] [blame] | 19 | |
| 20 | amd_update_microcode_from_cbfs(); |
Felix Held | 060b8ad | 2021-02-05 22:51:33 +0100 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | static struct device_operations cpu_dev_ops = { |
| 24 | .init = zen_2_3_init, |
| 25 | }; |
| 26 | |
| 27 | static struct cpu_device_id cpu_table[] = { |
| 28 | { X86_VENDOR_AMD, CEZANNE_A0_CPUID}, |
| 29 | { 0, 0 }, |
| 30 | }; |
| 31 | |
| 32 | static const struct cpu_driver zen_2_3 __cpu_driver = { |
| 33 | .ops = &cpu_dev_ops, |
| 34 | .id_table = cpu_table, |
| 35 | }; |