2021-02-05 22:51:33 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
|
|
|
2021-02-10 16:13:56 +01:00
|
|
|
#include <amdblocks/cpu.h>
|
2021-02-05 22:51:33 +01:00
|
|
|
#include <console/console.h>
|
2021-02-13 00:04:27 +01:00
|
|
|
#include <cpu/amd/microcode.h>
|
2021-02-05 22:51:33 +01:00
|
|
|
#include <cpu/cpu.h>
|
2021-02-10 16:13:56 +01:00
|
|
|
#include <cpu/x86/lapic.h>
|
2021-02-05 22:51:33 +01:00
|
|
|
#include <device/device.h>
|
|
|
|
#include <soc/cpu.h>
|
|
|
|
|
2021-02-10 16:17:13 +01:00
|
|
|
void mp_init_cpus(struct bus *cpu_bus)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-02-05 22:51:33 +01:00
|
|
|
static void zen_2_3_init(struct device *dev)
|
|
|
|
{
|
2021-02-10 16:13:56 +01:00
|
|
|
setup_lapic();
|
|
|
|
set_cstate_io_addr();
|
2021-02-13 00:04:27 +01:00
|
|
|
|
|
|
|
amd_update_microcode_from_cbfs();
|
2021-02-05 22:51:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct device_operations cpu_dev_ops = {
|
|
|
|
.init = zen_2_3_init,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct cpu_device_id cpu_table[] = {
|
|
|
|
{ X86_VENDOR_AMD, CEZANNE_A0_CPUID},
|
|
|
|
{ 0, 0 },
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct cpu_driver zen_2_3 __cpu_driver = {
|
|
|
|
.ops = &cpu_dev_ops,
|
|
|
|
.id_table = cpu_table,
|
|
|
|
};
|