From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2090E7803D0 for ; Tue, 19 Mar 2024 16:54:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=v/qwOjFE/MJjOszIJL2A/UUZWQckpKVNp4LUz/VvAoE=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1710867252; v=1; b=4Xczh8wCN5QbwQgpaWl9vGyhZv1Jk6SMe6o5U2ED3NnCueQzoYDrkY0o22M5NsRf3g36VPWy j9gtWfVCYmQxwJQbxWsOlJ18t0XVIHlFL9fQdMjS3pYbSp+5s3qZfpZ/1N+MSdek0Ro0nCmwNw9 bahLUeqrHDMcw9wfhyzAn05MfX7sP8kezLLb6V+roeGqUfREW0Xdamu+bi9aeoNx6W1uOJ68VFx xyX+Q3vcR5z0yC0R4YRXxa3b+RESwatzHankpYZ56Yv0X84SwiIiNejUjR05JjA9MARctIdpFgo opD01HLWUFRAiZ2rPRo8VMIE07rlN2ZujQDjLk2Cz0pWw== X-Received: by 127.0.0.2 with SMTP id w72rYY7687511xbbvBmkxQHM; Tue, 19 Mar 2024 09:54:12 -0700 X-Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web11.21188.1710867251409386488 for ; Tue, 19 Mar 2024 09:54:11 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 37EF8CE0EC2 for ; Tue, 19 Mar 2024 16:54:08 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F96AC433B1 for ; Tue, 19 Mar 2024 16:54:07 +0000 (UTC) X-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-512f3e75391so4589576e87.2 for ; Tue, 19 Mar 2024 09:54:07 -0700 (PDT) X-Gm-Message-State: VmV9mx8IVQAfyNSgAdWHLOiox7686176AA= X-Google-Smtp-Source: AGHT+IEbWFjekaxbvLEZIHe8PmdSNcWMr/yABkFeByTejrEI0trBMU8PNFA1JyNEUwStZMMY6r1nFB/X8uSfHdYKnj8= X-Received: by 2002:a19:770a:0:b0:513:a977:933b with SMTP id s10-20020a19770a000000b00513a977933bmr2153078lfc.42.1710867245452; Tue, 19 Mar 2024 09:54:05 -0700 (PDT) MIME-Version: 1.0 References: <20240319-no-dt-for-cpu-v7-0-ac0a57a23a8f@linaro.org> <20240319-no-dt-for-cpu-v7-1-ac0a57a23a8f@linaro.org> In-Reply-To: <20240319-no-dt-for-cpu-v7-1-ac0a57a23a8f@linaro.org> From: "Ard Biesheuvel" Date: Tue, 19 Mar 2024 17:53:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH edk2-platforms v7 1/4] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib To: devel@edk2.groups.io, marcin.juszkiewicz@linaro.org Cc: Leif Lindholm , Ard Biesheuvel , Graeme Gregory , Xiong Yining , Chen Baozi Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Tue, 19 Mar 2024 09:54:11 -0700 Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=4Xczh8wC; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On Tue, 19 Mar 2024 at 14:50, Marcin Juszkiewicz wrote: > > This library provides functions to check for hardware information. > For now it covers CPU ones: > > - amount of cpu cores > - MPIDR value for cpu core > - NUMA node id for cpu core > > Values are read from TF-A using platform specific SMC calls. > > Signed-off-by: Marcin Juszkiewicz > --- > Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 +- > .../SbsaQemuHardwareInfoLib.inf | 31 +++++++ > .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h | 17 +++- > .../Include/Library/SbsaQemuHardwareInfoLib.h | 45 +++++++++ > .../SbsaQemuHardwareInfoLib.c | 96 ++++++++++++++++++++ > 5 files changed, 187 insertions(+), 5 deletions(-) > > diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > index 378600050df9..07cb3490f4cf 100644 > --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc > @@ -1,6 +1,6 @@ > # > # Copyright (c) 2021, NUVIA Inc. All rights reserved. > -# Copyright (c) 2019, Linaro Limited. All rights reserved. > +# Copyright (c) 2019-2024, Linaro Ltd. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -128,6 +128,7 @@ [LibraryClasses.common] > > FdtHelperLib|Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf > OemMiscLib|Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf > + SbsaQemuHardwareInfoLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf > > # Debug Support > PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf > diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf > new file mode 100644 > index 000000000000..e621c422bd40 > --- /dev/null > +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf > @@ -0,0 +1,31 @@ > +#/* @file > +# > +# Copyright (c) 2024, Linaro Ltd. All rights reserved. > +# > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +#*/ > + > +[Defines] > + INF_VERSION = 0x0001001c > + BASE_NAME = SbsaQemuHardwareInfoLib > + FILE_GUID = 6454006f-6502-46e2-9be4-4bba8d4b29fb > + MODULE_TYPE = BASE > + VERSION_STRING = 1.0 > + LIBRARY_CLASS = ArmPlatformLib > + Please define a suitable library class and add it to the Silicon/Qemu/SbsaQemu/SbsaQemu.dec, as I mentioned in the previous round of review. Thanks, Ard. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#116902): https://edk2.groups.io/g/devel/message/116902 Mute This Topic: https://groups.io/mt/105024010/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-