[PATCH 05/10] armv8: Add arch-specific sysinfo driver

Michal Simek michal.simek at amd.com
Mon Aug 26 17:32:39 CEST 2024



On 8/16/24 17:46, Raymond Mao wrote:
> Add common sysinfo driver for armv8 platforms containing all
> necessary SMBIOS information (Type 1 to 4).
> 
> Signed-off-by: Raymond Mao <raymond.mao at linaro.org>
> ---
>   arch/arm/cpu/armv8/Makefile  |   5 +
>   arch/arm/cpu/armv8/sysinfo.c | 203 +++++++++++++++++++++++++++++++++++
>   2 files changed, 208 insertions(+)
>   create mode 100644 arch/arm/cpu/armv8/sysinfo.c
> 
> diff --git a/arch/arm/cpu/armv8/Makefile b/arch/arm/cpu/armv8/Makefile
> index bba4f570dbb..374f20d455d 100644
> --- a/arch/arm/cpu/armv8/Makefile
> +++ b/arch/arm/cpu/armv8/Makefile
> @@ -45,3 +45,8 @@ obj-$(CONFIG_TARGET_BCMNS3) += bcmns3/
>   obj-$(CONFIG_XEN) += xen/
>   obj-$(CONFIG_ARMV8_CE_SHA1) += sha1_ce_glue.o sha1_ce_core.o
>   obj-$(CONFIG_ARMV8_CE_SHA256) += sha256_ce_glue.o sha256_ce_core.o
> +
> +ifndef CONFIG_SPL_BUILD
> +obj-$(CONFIG_SYSINFO_SMBIOS) += sysinfo.o
> +ccflags-$(CONFIG_SYSINFO_SMBIOS) += -I$(srctree)/drivers/sysinfo

I think this should be moved to generic location to avoid line above.

> +endif
> \ No newline at end of file

obviously wrong.

> diff --git a/arch/arm/cpu/armv8/sysinfo.c b/arch/arm/cpu/armv8/sysinfo.c
> new file mode 100644
> index 00000000000..a8e17d654be
> --- /dev/null
> +++ b/arch/arm/cpu/armv8/sysinfo.c
> @@ -0,0 +1,203 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copyright (c) 2024 Linaro Limited
> + * Author: Raymond Mao <raymond.mao at linaro.org>
> + */
> +#include <dm.h>
> +#if CONFIG_IS_ENABLED(SYSINFO_SMBIOS)
> +#include <smbios_plat.h>
> +#endif

This also look weird.

M


More information about the U-Boot mailing list