From nobody Mon Apr 29 17:35:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71888+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71888+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1613878153; cv=none; d=zohomail.com; s=zohoarc; b=YjUzvVRQ/rrFUQw+ERH7yxwCuKM19GaO8OH59IpZDeRvjNFegisHul5u0/2Nwe5X/6vPNBdmPIX5Mef7o0meqRX6TQG0j+ijVRplUDbYkU5olRtXs8Zh0EodAD1hNp8qlQQNte1f6ZjyxdIEzFsAW2SPVOEscIcjLZZ2YWVeaTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613878153; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Od1uPl2BjNxIJFDcjKmkIpRrayUyBStTEgZiimQ5AB0=; b=NyeJhytsI9Py1XBqeHXC5z7KUxVqwDxNy2S2pjkfHbCatO9ZwJpRzmVkFX09ARtahQuleVUaEs1x82d+eX/NssflPvZwj2zgPGICK2mO2qakk1nfsugUTUMMDY2AbJTPAY6OJ9kP5tbU2hwW/lGj49UqT5BKPv7rkz5aMkLPBT4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71888+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613878153246464.937759118405; Sat, 20 Feb 2021 19:29:13 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id lWMnYY1788612xqwxqdb5qE3; Sat, 20 Feb 2021 19:29:12 -0800 X-Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) by mx.groups.io with SMTP id smtpd.web08.16238.1613878147384817623 for ; Sat, 20 Feb 2021 19:29:07 -0800 X-Received: by mail-io1-f44.google.com with SMTP id f20so9823916ioo.10 for ; Sat, 20 Feb 2021 19:29:07 -0800 (PST) X-Gm-Message-State: UFdNWAQ2MNh0yKvMXcM88Lecx1787277AA= X-Google-Smtp-Source: ABdhPJyK+pGcZ3a2ln+ZF4PH1y9Jfyins9QpOU2oX3NbMFwVr10UAzK2/HP56iF6DnPe/ztAe39wsg== X-Received: by 2002:a05:6602:2cd0:: with SMTP id j16mr10004004iow.96.1613878146410; Sat, 20 Feb 2021 19:29:06 -0800 (PST) X-Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x17sm1098785ilm.40.2021.02.20.19.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 19:29:06 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v2 1/3] ArmPkg: Fix ordering of return type and EFIAPI specifier in OemMiscLib Date: Sat, 20 Feb 2021 20:28:58 -0700 Message-Id: <20210221032900.6485-2-rebecca@nuviainc.com> In-Reply-To: <20210221032900.6485-1-rebecca@nuviainc.com> References: <20210221032900.6485-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613878152; bh=hl42iNbaN1ILySWVK73dCZTqKLkomxHH4hU689cCmi8=; h=Cc:Date:From:Reply-To:Subject:To; b=kVAwi7TCCMcAKHAmJyusCSb//8ZK3FVvjKvEFIQvEfl7Mb3Xq/bcxO7C6h741e1PWc9 +un1cILoxVEHQu0CVB4JaCnG5EfHqFE+O0fcIOOOQ+1+TKrNwyJQ5NNz9AONf15l6zu7T 0jTH2u739gE7YuCHRyrZmcz/e5qCSn/PaWM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The return type should be on the line before any EFIAPI specifier. Signed-off-by: Rebecca Cran Reviewed-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h | 14 +++++++------- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index e70019d05f15..ad0e77685dbe 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -71,8 +71,8 @@ typedef enum =20 @return CPU frequency in Hz **/ -EFIAPI UINTN +EFIAPI OemGetCpuFreq ( IN UINT8 ProcessorIndex ); @@ -87,8 +87,8 @@ OemGetCpuFreq ( =20 @return TRUE on success, FALSE on failure. **/ -EFIAPI BOOLEAN +EFIAPI OemGetProcessorInformation ( IN UINTN ProcessorIndex, IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus, @@ -106,8 +106,8 @@ OemGetProcessorInformation ( =20 @return TRUE on success, FALSE on failure. **/ -EFIAPI BOOLEAN +EFIAPI OemGetCacheInformation ( IN UINT8 ProcessorIndex, IN UINT8 CacheLevel, @@ -120,8 +120,8 @@ OemGetCacheInformation ( =20 @return The maximum number of sockets. **/ -EFIAPI UINT8 +EFIAPI OemGetProcessorMaxSockets ( VOID ); @@ -132,8 +132,8 @@ OemGetProcessorMaxSockets ( =20 @retval EFI_SUCCESS The chassis type was fetched successfully. **/ -EFIAPI EFI_STATUS +EFIAPI OemGetChassisType ( OUT UINT8 *ChassisType ); @@ -144,8 +144,8 @@ OemGetChassisType ( =20 @return TRUE is the processor is present, FALSE otherwise. **/ -EFIAPI BOOLEAN +EFIAPI OemIsSocketPresent ( IN UINTN ProcessorIndex ); @@ -156,8 +156,8 @@ OemIsSocketPresent ( @param TokenToUpdate The string to update. @param Offset The field to get information about. **/ -EFIAPI VOID +EFIAPI OemUpdateSmbiosInfo ( IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID TokenToUpdate, diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index 73cebef2d1b9..6b179941e414 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -23,8 +23,8 @@ =20 @return CPU frequency in Hz **/ -EFIAPI UINTN +EFIAPI OemGetCpuFreq ( IN UINT8 ProcessorIndex ) @@ -43,8 +43,8 @@ OemGetCpuFreq ( =20 @return TRUE on success, FALSE on failure. **/ -EFIAPI BOOLEAN +EFIAPI OemGetProcessorInformation ( IN UINTN ProcessorIndex, IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus, @@ -66,8 +66,8 @@ OemGetProcessorInformation ( =20 @return TRUE on success, FALSE on failure. **/ -EFIAPI BOOLEAN +EFIAPI OemGetCacheInformation ( IN UINT8 ProcessorIndex, IN UINT8 CacheLevel, @@ -84,8 +84,8 @@ OemGetCacheInformation ( =20 @return The maximum number of sockets. **/ -EFIAPI UINT8 +EFIAPI OemGetProcessorMaxSockets ( VOID ) @@ -117,8 +117,8 @@ OemGetChassisType ( =20 @return TRUE is the processor is present, FALSE otherwise. **/ -EFIAPI BOOLEAN +EFIAPI OemIsSocketPresent ( IN UINTN ProcessorIndex ) @@ -133,8 +133,8 @@ OemIsSocketPresent ( @param TokenToUpdate The string to update. @param Offset The field to get information about. **/ -EFIAPI VOID +EFIAPI OemUpdateSmbiosInfo ( IN EFI_HII_HANDLE mHiiHandle, IN EFI_STRING_ID TokenToUpdate, --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71888): https://edk2.groups.io/g/devel/message/71888 Mute This Topic: https://groups.io/mt/80794228/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 17:35:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71889+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71889+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1613878150; cv=none; d=zohomail.com; s=zohoarc; b=OplL6Rj4cI9DCCTO/xxc109en494ieZuKmhMiIIxC/Yw91fagoDfREr3TRN+jHNVES91Z+AR5xNAq96uc4mofz4MDmAj+aJhnl1Icez9pDFCGNUpzpNi+W3iQI4CtQbtwfnKI2X9OARJ74PD4LsZ7Ftd2yzjdvqHL65uMC4+biQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613878150; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=SN9IKC7U3DLVl3fvIeOpbogtRjluCQFFVDTEHFC7JDE=; b=LpVkiS06fCUD3BwFrKeV4VmUQL7lm7vPq99lxlri/uRqnSbBGCixP3dRe2gssroIExJxFRcNemKtiauaSdrAn9bWtO9oLO/ObGYEAhfHeJDUgD1l1H7iIreiILTZ86Fdm7RDJoEBTLD7uThzba17KqT1FwJuMGz/e4h2GYfgtjM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71889+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613878149784707.342329061371; Sat, 20 Feb 2021 19:29:09 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id PTF4YY1788612xwm63hDMwOL; Sat, 20 Feb 2021 19:29:09 -0800 X-Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by mx.groups.io with SMTP id smtpd.web11.16085.1613878148923531942 for ; Sat, 20 Feb 2021 19:29:09 -0800 X-Received: by mail-io1-f53.google.com with SMTP id y202so9856294iof.1 for ; Sat, 20 Feb 2021 19:29:08 -0800 (PST) X-Gm-Message-State: ZNIqmCN64rDPhjx6ykjmDkewx1787277AA= X-Google-Smtp-Source: ABdhPJyd5ZIFg01dvUM+JcCyzZjUuonE/C5yvUl05VZ4uHyyQEU7rGoPcvakK4krXjlc6PPRTeJQ2A== X-Received: by 2002:a5e:980a:: with SMTP id s10mr10443721ioj.101.1613878148008; Sat, 20 Feb 2021 19:29:08 -0800 (PST) X-Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x17sm1098785ilm.40.2021.02.20.19.29.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 19:29:07 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v2 2/3] ArmPkg: Rename some functions and parameters in OemMiscLib Date: Sat, 20 Feb 2021 20:28:59 -0700 Message-Id: <20210221032900.6485-3-rebecca@nuviainc.com> In-Reply-To: <20210221032900.6485-1-rebecca@nuviainc.com> References: <20210221032900.6485-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613878149; bh=DhtLunFpTCVauoVCD1SpGz0PE+9zgyruMEVbYzuDeic=; h=Cc:Date:From:Reply-To:Subject:To; b=Rs704VnVmZ7j1sdvmHpiGB9R429cYFZlCya/dG3csfKTPp4HYyLQYkjl7Of15+lmFrL Rf+hP3vRLf2sh/HM91l9X1dW571DTUzjpgyis0I4f5GElMWc4IYV++J2Q1mDOgPAckLaB rpipKB1fe+e5QyOsyfenthszNNZd40REqEI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" o Rename 'Offset' parameter in OemUpdateSmbiosInfo to 'Field'. o Rename OemGetProcessorMaxSockets to OemGetMaxProcessors. o Rename OemIsSocketPresent to OemIsProcessorPresent. o Update Universal/Smbios to follow the changes to OemMiscLib. Signed-off-by: Rebecca Cran --- ArmPkg/Include/Library/OemMiscLib.h = | 12 +++--- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c = | 13 +++---- ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c = | 40 ++++++++++---------- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFuncti= on.c | 28 +------------- 4 files changed, 33 insertions(+), 60 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index ad0e77685dbe..31dfe7dac2a6 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -116,13 +116,13 @@ OemGetCacheInformation ( IN OUT SMBIOS_TABLE_TYPE7 *SmbiosCacheTable ); =20 -/** Gets the maximum number of sockets supported by the platform. +/** Gets the maximum number of processors supported by the platform. =20 - @return The maximum number of sockets. + @return The maximum number of processors. **/ UINT8 EFIAPI -OemGetProcessorMaxSockets ( +OemGetMaxProcessors ( VOID ); =20 @@ -146,7 +146,7 @@ OemGetChassisType ( **/ BOOLEAN EFIAPI -OemIsSocketPresent ( +OemIsProcessorPresent ( IN UINTN ProcessorIndex ); =20 @@ -154,14 +154,14 @@ OemIsSocketPresent ( =20 @param mHiiHandle The HII handle. @param TokenToUpdate The string to update. - @param Offset The field to get information about. + @param Field The field to get information about. **/ VOID EFIAPI OemUpdateSmbiosInfo ( IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID TokenToUpdate, - IN OEM_MISC_SMBIOS_HII_STRING_FIELD Offset + IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field ); =20 #endif // OEM_MISC_LIB_H_ diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index 6b179941e414..b02a568426dd 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -13,7 +13,6 @@ #include #include #include - #include =20 =20 @@ -80,13 +79,13 @@ OemGetCacheInformation ( return TRUE; } =20 -/** Gets the maximum number of sockets supported by the platform. +/** Gets the maximum number of processors supported by the platform. =20 - @return The maximum number of sockets. + @return The maximum number of processors. **/ UINT8 EFIAPI -OemGetProcessorMaxSockets ( +OemGetMaxProcessors ( VOID ) { @@ -119,7 +118,7 @@ OemGetChassisType ( **/ BOOLEAN EFIAPI -OemIsSocketPresent ( +OemIsProcessorPresent ( IN UINTN ProcessorIndex ) { @@ -131,14 +130,14 @@ OemIsSocketPresent ( =20 @param mHiiHandle The HII handle. @param TokenToUpdate The string to update. - @param Offset The field to get information about. + @param Field The field to get information about. **/ VOID EFIAPI OemUpdateSmbiosInfo ( IN EFI_HII_HANDLE mHiiHandle, IN EFI_STRING_ID TokenToUpdate, - IN OEM_MISC_SMBIOS_HII_STRING_FIELD Offset + IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field ) { ASSERT (FALSE); diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index d03de12a820e..0cb56c53975e 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -439,8 +439,8 @@ AddSmbiosCacheTypeTable ( strings following the data fields. =20 @param[out] Type4Record The Type 4 structure to allocate and initiali= ze - @param[in] ProcessorIndex The index of the processor socket - @param[in] Populated Whether the specified processor socket is + @param[in] ProcessorIndex The index of the processor + @param[in] Populated Whether the specified processor is populated. =20 @retval EFI_SUCCESS The Type 4 structure was successfully @@ -460,7 +460,7 @@ AllocateType4AndSetProcessorInformationStrings ( EFI_STRING_ID SerialNumber; EFI_STRING_ID AssetTag; EFI_STRING_ID PartNumber; - EFI_STRING ProcessorSocketStr; + EFI_STRING ProcessorStr; EFI_STRING ProcessorManuStr; EFI_STRING ProcessorVersionStr; EFI_STRING SerialNumberStr; @@ -468,7 +468,7 @@ AllocateType4AndSetProcessorInformationStrings ( EFI_STRING PartNumberStr; CHAR8 *OptionalStrStart; CHAR8 *StrStart; - UINTN ProcessorSocketStrLen; + UINTN ProcessorStrLen; UINTN ProcessorManuStrLen; UINTN ProcessorVersionStrLen; UINTN SerialNumberStrLen; @@ -497,14 +497,14 @@ AllocateType4AndSetProcessorInformationStrings ( SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag); SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorPartNumber, PartNumber); =20 - // Processor Socket Designation + // Processor Designation StringBufferSize =3D sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH; - ProcessorSocketStr =3D AllocateZeroPool (StringBufferSize); - if (ProcessorSocketStr =3D=3D NULL) { + ProcessorStr =3D AllocateZeroPool (StringBufferSize); + if (ProcessorStr =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } =20 - ProcessorSocketStrLen =3D UnicodeSPrint (ProcessorSocketStr, StringBuffe= rSize, + ProcessorStrLen =3D UnicodeSPrint (ProcessorStr, StringBufferSize, L"CPU%02d", ProcessorIndex + 1); =20 // Processor Manufacture @@ -528,7 +528,7 @@ AllocateType4AndSetProcessorInformationStrings ( PartNumberStrLen =3D StrLen (PartNumberStr); =20 TotalSize =3D sizeof (SMBIOS_TABLE_TYPE4) + - ProcessorSocketStrLen + 1 + + ProcessorStrLen + 1 + ProcessorManuStrLen + 1 + ProcessorVersionStrLen + 1 + SerialNumberStrLen + 1 + @@ -545,12 +545,12 @@ AllocateType4AndSetProcessorInformationStrings ( =20 OptionalStrStart =3D (CHAR8 *)(*Type4Record + 1); UnicodeStrToAsciiStrS ( - ProcessorSocketStr, + ProcessorStr, OptionalStrStart, - ProcessorSocketStrLen + 1 + ProcessorStrLen + 1 ); =20 - StrStart =3D OptionalStrStart + ProcessorSocketStrLen + 1; + StrStart =3D OptionalStrStart + ProcessorStrLen + 1; UnicodeStrToAsciiStrS ( ProcessorManuStr, StrStart, @@ -586,7 +586,7 @@ AllocateType4AndSetProcessorInformationStrings ( ); =20 Exit: - FreePool (ProcessorSocketStr); + FreePool (ProcessorStr); FreePool (ProcessorManuStr); FreePool (ProcessorVersionStr); FreePool (SerialNumberStr); @@ -618,7 +618,7 @@ AddSmbiosProcessorTypeTable ( UINT64 *ProcessorId; PROCESSOR_CHARACTERISTIC_FLAGS ProcessorCharacteristics; OEM_MISC_PROCESSOR_DATA MiscProcessorData; - BOOLEAN SocketPopulated; + BOOLEAN ProcessorPopulated; =20 Type4Record =3D NULL; =20 @@ -632,12 +632,12 @@ AddSmbiosProcessorTypeTable ( L2CacheHandle =3D 0xFFFF; L3CacheHandle =3D 0xFFFF; =20 - SocketPopulated =3D OemIsSocketPresent(ProcessorIndex); + ProcessorPopulated =3D OemIsProcessorPresent (ProcessorIndex); =20 Status =3D AllocateType4AndSetProcessorInformationStrings ( &Type4Record, ProcessorIndex, - SocketPopulated + ProcessorPopulated ); if (EFI_ERROR (Status)) { return Status; @@ -649,7 +649,7 @@ AddSmbiosProcessorTypeTable ( &Type4Record->ProcessorCharacteristics, &MiscProcessorData); =20 - if (SocketPopulated) { + if (ProcessorPopulated) { AddSmbiosCacheTypeTable (ProcessorIndex, &L1CacheHandle, &L2CacheHandle, &L3CacheHandle); } @@ -713,7 +713,7 @@ ProcessorSubClassEntryPoint( ) { EFI_STATUS Status; - UINT32 SocketIndex; + UINT32 ProcessorIndex; =20 // // Locate dependent protocols @@ -740,8 +740,8 @@ ProcessorSubClassEntryPoint( // // Add SMBIOS tables for populated sockets. // - for (SocketIndex =3D 0; SocketIndex < OemGetProcessorMaxSockets(); Socke= tIndex++) { - Status =3D AddSmbiosProcessorTypeTable (SocketIndex); + for (ProcessorIndex =3D 0; ProcessorIndex < OemGetMaxProcessors (); Proc= essorIndex++) { + Status =3D AddSmbiosProcessorTypeTable (ProcessorIndex); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "Add Processor Type Table Failed! %r.\n", Stat= us)); return Status; diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufa= cturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassis= ManufacturerFunction.c index e6adbceba2d5..fc4dba319aad 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c @@ -23,27 +23,6 @@ =20 #include "SmbiosMisc.h" =20 -/** - * Returns the chassis type in SMBIOS format. - * - * @return Chassis type -**/ -UINT8 -GetChassisType ( - VOID - ) -{ - EFI_STATUS Status; - UINT8 ChassisType; - - Status =3D OemGetChassisType (&ChassisType); - if (EFI_ERROR (Status)) { - return 0; - } - - return ChassisType; -} - /** This function makes boot time changes to the contents of the MiscChassisManufacturer (Type 3) record. @@ -80,8 +59,6 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer) CONTAINED_ELEMENT ContainedElements; UINT8 ExtendLength; =20 - UINT8 ChassisType; - ExtendLength =3D 0; =20 // @@ -165,10 +142,7 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscChassisManufacturer) =20 SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE3) + ExtendLength = + 1; =20 - ChassisType =3D GetChassisType (); - if (ChassisType !=3D 0) { - SmbiosRecord->Type =3D ChassisType; - } + SmbiosRecord->Type =3D OemGetChassisType (); =20 //ContainedElements ASSERT (ContainedElementCount < 2); --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71889): https://edk2.groups.io/g/devel/message/71889 Mute This Topic: https://groups.io/mt/80794229/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon Apr 29 17:35:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+71890+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71890+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1613878157; cv=none; d=zohomail.com; s=zohoarc; b=E1qA5dOUDL6Zv1ho6BvgUnx0VqpihoF+Gs5G0HJEmmwd4bCiAioywdWReEQuNLSbFZYNLgxFLO7QIapEBAO+a8jH9m8LWRaQkLEmR3sZaoZH7wCsd9B5QNZcNSlveUbvubrFq5gtgiRtkpJBAHLWA2qeiVPnQ6JluqGfbKtIPmA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613878157; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=jyGzfjUWlRh9qZYz4eTEHgluMwEC/Xdout5FiIskyqE=; b=VyAoQ4Ysg0nSBHW1EwpwexkvuWY95jS7VvvcT8Pau9nzPObOR81IuhjHQvA1ZlpjW/YoH7CS8CJU8amONENYZEB11jSwmN3dplFe15fh9P3iztusZlCbkb8ehDsSplKJW+5RG5QUh7xKtvTTRysqS2KAqQJQ9G1769KJ3lslFCc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+71890+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1613878157218139.2848333885446; Sat, 20 Feb 2021 19:29:17 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7UO4YY1788612xtc8LV3estL; Sat, 20 Feb 2021 19:29:16 -0800 X-Received: from mail-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) by mx.groups.io with SMTP id smtpd.web09.16455.1613878151473257398 for ; Sat, 20 Feb 2021 19:29:11 -0800 X-Received: by mail-il1-f179.google.com with SMTP id e2so7989431ilu.0 for ; Sat, 20 Feb 2021 19:29:11 -0800 (PST) X-Gm-Message-State: Sk0QKYCHfJJZBuUwxsD6rceMx1787277AA= X-Google-Smtp-Source: ABdhPJyhQ7fb3YNOf3dpamrnr3lPhHi2HxMRP1iYapcdhDgL1YHwPBH9nU2J+b78d16nCdEGeppfyw== X-Received: by 2002:a92:4151:: with SMTP id o78mr10068756ila.117.1613878150638; Sat, 20 Feb 2021 19:29:10 -0800 (PST) X-Received: from cube.int.bluestop.org (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id x17sm1098785ilm.40.2021.02.20.19.29.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Feb 2021 19:29:10 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v2 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE Date: Sat, 20 Feb 2021 20:29:00 -0700 Message-Id: <20210221032900.6485-4-rebecca@nuviainc.com> In-Reply-To: <20210221032900.6485-1-rebecca@nuviainc.com> References: <20210221032900.6485-1-rebecca@nuviainc.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@nuviainc.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1613878156; bh=JEtm84AtQnM5EOw9p0Swgykg3+22O5gT/F53tBj9eGo=; h=Cc:Date:From:Reply-To:Subject:To; b=ZCeWM+dfW85IbLh/ThkE1ksVKm/wH5iYK3OYt3mWwnILkoZNS7Ni48Ldzg6eyh9beI7 qxm/UGGGRuutJRoHxGvAiwNETJliZJUxzlROup5B7FTVjVEqxKwbJDUV7r4dCbzcgtX2i GxcX/L9RcTmyNx3ma9cPUdjKEig3LohlY5A= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Update OemGetChassisType in OemMiscLib to return MISC_CHASSIS_TYPE instead of EFI_STATUS, which matches other OemMiscLib functions. Signed-off-by: Rebecca Cran Reviewed-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h | 8 +++----- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 11 ++++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 31dfe7dac2a6..5f71b2ad48c7 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -128,14 +128,12 @@ OemGetMaxProcessors ( =20 /** Gets the type of chassis for the system. =20 - @param ChassisType The type of the chassis. - - @retval EFI_SUCCESS The chassis type was fetched successfully. + @retval The type of the chassis. **/ -EFI_STATUS +MISC_CHASSIS_TYPE EFIAPI OemGetChassisType ( - OUT UINT8 *ChassisType + VOID ); =20 /** Returns whether the specified processor is present or not. diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index b02a568426dd..6b233742feb0 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -95,19 +95,16 @@ OemGetMaxProcessors ( =20 /** Gets the type of chassis for the system. =20 - @param ChassisType The type of the chassis. - - @retval EFI_SUCCESS The chassis type was fetched successfully. + @retval The type of the chassis. **/ -EFI_STATUS +MISC_CHASSIS_TYPE EFIAPI OemGetChassisType ( - UINT8 *ChassisType + VOID ) { ASSERT (FALSE); - *ChassisType =3D MiscChassisTypeUnknown; - return EFI_SUCCESS; + return MiscChassisTypeUnknown; } =20 /** Returns whether the specified processor is present or not. --=20 2.26.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71890): https://edk2.groups.io/g/devel/message/71890 Mute This Topic: https://groups.io/mt/80794230/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-