diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2024-10-23 15:20:01 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-10-27 17:24:13 -0600 |
commit | 83a2f4a8d2999cbf873a98b47d75436172946a15 (patch) | |
tree | 231a0a7feb25ec4dc699ec17c5f6383494007265 /drivers/cpu/armv8_cpu.h | |
parent | 1289c7ccba18121536626cc567f09802bec1dad5 (diff) |
drivers/cpu: Add generic armv8 cpu driver
Add a generic driver that binds to armv8 CPU nodes. The generic driver allows
- to enumerate CPUs present in a system, even when no other driver binds it
- generates ACPI SSDT code for each CPU
- Fill the ACPI MADT table (implemented in a follow up patch)
The newly introduced code could also be reused on other CPU drivers that are
compatible with armv8.
TEST: Booted on QEMU sbsa and verify the driver binds to CPU nodes.
Confirmed with FWTS that all ACPI processor devices are present.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/cpu/armv8_cpu.h')
-rw-r--r-- | drivers/cpu/armv8_cpu.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/cpu/armv8_cpu.h b/drivers/cpu/armv8_cpu.h new file mode 100644 index 00000000000..2c4b0252cf8 --- /dev/null +++ b/drivers/cpu/armv8_cpu.h @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2024 9elements GmbH + */ +#include <dm/acpi.h> +#include <dm/device.h> + +#ifndef _ARMV8_CPU_H_ +#define _ARMV8_CPU_H_ + +/** + * armv8_cpu_fill_ssdt() - Fill the SSDT + * Parses the FDT and writes the SSDT nodes. + * + * @dev: cpu device to generate ACPI tables for + * @ctx: ACPI context pointer + * @return: 0 if OK, or a negative error code. + */ +int armv8_cpu_fill_ssdt(const struct udevice *dev, struct acpi_ctx *ctx); + +#endif
\ No newline at end of file |