Arthur Heymans | 2e2f166 | 2023-07-14 22:58:49 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <amdblocks/cpu.h> |
Arthur Heymans | 447e279 | 2023-07-14 23:05:46 +0200 | [diff] [blame^] | 4 | #include <amdblocks/mca.h> |
Arthur Heymans | 2e2f166 | 2023-07-14 22:58:49 +0200 | [diff] [blame] | 5 | #include <cpu/cpu.h> |
| 6 | #include <device/device.h> |
| 7 | #include <soc/cpu.h> |
| 8 | |
| 9 | static void model_19_init(struct device *dev) |
| 10 | { |
Arthur Heymans | 447e279 | 2023-07-14 23:05:46 +0200 | [diff] [blame^] | 11 | check_mca(); |
Arthur Heymans | 2e2f166 | 2023-07-14 22:58:49 +0200 | [diff] [blame] | 12 | set_cstate_io_addr(); |
| 13 | } |
| 14 | |
| 15 | static struct device_operations cpu_dev_ops = { |
| 16 | .init = model_19_init, |
| 17 | }; |
| 18 | |
| 19 | static struct cpu_device_id cpu_table[] = { |
| 20 | { X86_VENDOR_AMD, GENOA_A0_CPUID, CPUID_ALL_STEPPINGS_MASK }, |
| 21 | { X86_VENDOR_AMD, GENOA_B0_CPUID, CPUID_ALL_STEPPINGS_MASK }, |
| 22 | CPU_TABLE_END |
| 23 | }; |
| 24 | |
| 25 | static const struct cpu_driver model_19 __cpu_driver = { |
| 26 | .ops = &cpu_dev_ops, |
| 27 | .id_table = cpu_table, |
| 28 | }; |