blob: 241bec21fde8b26bcc0c9c2822867395abac5dcd [file] [log] [blame]
Arthur Heymans2e2f1662023-07-14 22:58:49 +02001/* SPDX-License-Identifier: GPL-2.0-only */
2
3#include <amdblocks/cpu.h>
Arthur Heymans447e2792023-07-14 23:05:46 +02004#include <amdblocks/mca.h>
Arthur Heymans5ee1d232023-07-14 23:16:22 +02005#include <cpu/amd/microcode.h>
Arthur Heymans2e2f1662023-07-14 22:58:49 +02006#include <cpu/cpu.h>
7#include <device/device.h>
8#include <soc/cpu.h>
9
10static void model_19_init(struct device *dev)
11{
Arthur Heymans447e2792023-07-14 23:05:46 +020012 check_mca();
Arthur Heymans2e2f1662023-07-14 22:58:49 +020013 set_cstate_io_addr();
Arthur Heymans5ee1d232023-07-14 23:16:22 +020014
15 amd_apply_microcode_patch();
Arthur Heymans2e2f1662023-07-14 22:58:49 +020016}
17
18static struct device_operations cpu_dev_ops = {
19 .init = model_19_init,
20};
21
22static struct cpu_device_id cpu_table[] = {
23 { X86_VENDOR_AMD, GENOA_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
24 { X86_VENDOR_AMD, GENOA_B0_CPUID, CPUID_ALL_STEPPINGS_MASK },
25 CPU_TABLE_END
26};
27
28static const struct cpu_driver model_19 __cpu_driver = {
29 .ops = &cpu_dev_ops,
30 .id_table = cpu_table,
31};