summaryrefslogtreecommitdiff
path: root/src/soc/amd/genoa_poc/cpu.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-12-15 10:57:30 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-12-16 20:14:34 +0000
commitd123f8d8716811149ecdf7d51661d8cee6f48577 (patch)
tree36c6ae14a65508adac7889c4d43fa098db0bafca /src/soc/amd/genoa_poc/cpu.c
parent1c295092d61c2ac7427ddac6d194d99337f86094 (diff)
soc/amd/genoa: rename to genoa_poc
Even though this SoC is called 'Genoa', the openSIL implementation and the corresponding coreboot integration is only a proof of concept that isn't fully featured, has known limitations and bugs, and is not meant for or ready to being productized. Adding the proof of concept suffix to the name should point this out clearly enough so that no potential customer could infer that this might be a fully functional and supported implementation which it is not. Change-Id: Ia459b1e007dcfd8e8710c12e252b2f9a4ae19b72 Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77894 Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/genoa_poc/cpu.c')
-rw-r--r--src/soc/amd/genoa_poc/cpu.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/soc/amd/genoa_poc/cpu.c b/src/soc/amd/genoa_poc/cpu.c
new file mode 100644
index 0000000000..241bec21fd
--- /dev/null
+++ b/src/soc/amd/genoa_poc/cpu.c
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <amdblocks/cpu.h>
+#include <amdblocks/mca.h>
+#include <cpu/amd/microcode.h>
+#include <cpu/cpu.h>
+#include <device/device.h>
+#include <soc/cpu.h>
+
+static void model_19_init(struct device *dev)
+{
+ check_mca();
+ set_cstate_io_addr();
+
+ amd_apply_microcode_patch();
+}
+
+static struct device_operations cpu_dev_ops = {
+ .init = model_19_init,
+};
+
+static struct cpu_device_id cpu_table[] = {
+ { X86_VENDOR_AMD, GENOA_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
+ { X86_VENDOR_AMD, GENOA_B0_CPUID, CPUID_ALL_STEPPINGS_MASK },
+ CPU_TABLE_END
+};
+
+static const struct cpu_driver model_19 __cpu_driver = {
+ .ops = &cpu_dev_ops,
+ .id_table = cpu_table,
+};