From nobody Fri May 3 12:10:52 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+72027+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+72027+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1614056046; cv=none; d=zohomail.com; s=zohoarc; b=fHGGHYBrkwBPP3DS6+jZJUmkzZj/sF+GKme6uaomt4jkLeZbJhbgf/sWGWtwP1l0WPaPal5ZV5iQb7IuQVkrfIp+KWQPCp4CXafRW3s93uQ553Mq44FBLHhI0aF/cqSzMp4X2qyam2mtpPYKygf1wYr21l3H+f90NagFQNIsjwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614056046; 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=q9VMT6urA+avldl2G8YdQXYK68tWz8Kq/HHXklC0ruA=; b=UET2tummZOtV1OjaruXkw587KZhlWpieuFRN3a5tzZ7A6XiYUTmUHxuLwuFQLUajeL1SJzUVVxvJ2MBYhJUtmQl/YHKcxjOmcruzQwB1j8IKzliWe5DCJdlLieT5Z2kjGO5g4dqRlC1sk/xnErvLtiEOEX2t2Cbz5ZvK0NyInew= 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+72027+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1614056045602993.9512397764894; Mon, 22 Feb 2021 20:54:05 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id UYFwYY1788612xQsrVYJWu8X; Mon, 22 Feb 2021 20:54:05 -0800 X-Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) by mx.groups.io with SMTP id smtpd.web09.5900.1614056039783373481 for ; Mon, 22 Feb 2021 20:53:59 -0800 X-Received: by mail-qv1-f54.google.com with SMTP id 15so2002316qvp.13 for ; Mon, 22 Feb 2021 20:53:59 -0800 (PST) X-Gm-Message-State: Oq0m00r3E4VyTI8FF8r4GeIvx1787277AA= X-Google-Smtp-Source: ABdhPJxYnrnuzbZKFxWTXmP/XVzp01olcR77Z1EjwIjulmGN186xcmm0Edyr/u8Uq2KgJ3cITXRaNw== X-Received: by 2002:a0c:ab15:: with SMTP id h21mr16288284qvb.51.1614056038708; Mon, 22 Feb 2021 20:53:58 -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 x9sm12303258qtr.74.2021.02.22.20.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 20:53:58 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v3 1/3] ArmPkg: Fix ordering of return type and EFIAPI specifier in OemMiscLib Date: Mon, 22 Feb 2021 21:53:51 -0700 Message-Id: <20210223045353.31315-2-rebecca@nuviainc.com> In-Reply-To: <20210223045353.31315-1-rebecca@nuviainc.com> References: <20210223045353.31315-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=1614056045; bh=kTlQMRhx73rwKYW8b0CcQtN1DC3/uIkqtyZUlRrQbAw=; h=Cc:Date:From:Reply-To:Subject:To; b=KR5pylaKX2ySeK59gbABpdtg8og0nrdEu8YZhWQsZ+eSNIsuHZpwdVobuzedi4irvST QGxZTkmF6FeeWFT6M5JlbL/gGZebWUx8SQYXzmSvWzycKiABg2U0hv+z+NXUSkexN+rRq sWbnDdBJXgmNUpM6EDYauSSzt6NJQeRukJc= 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 (#72027): https://edk2.groups.io/g/devel/message/72027 Mute This Topic: https://groups.io/mt/80844867/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 Fri May 3 12:10:52 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+72028+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+72028+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1614056042; cv=none; d=zohomail.com; s=zohoarc; b=OvkS8ik7MzpkpKbwdUldV3NO2kGhw60uZe2Uvbf6BhZUpmdGeofaoegcpnegkXYgIyvnehDA+8AIK1ew/3ivgW4eO6HJRjYYnpTm3hfT/fTYM6fE8VS/VIjHPmJoW2pAIdIjbhAhznm7DDmU3TcWNd9GRVVpt+KgUw47wmxT644= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614056042; 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=w7EqMksZId+NZfAM5kMZgEuIo5XtuBK8tprL7yOnptg=; b=XmuwxhwWww29j1OWtx4Zu0uVAJsE15c4FvGzjMh6AtteYoWFpuErxSLtTCtbjmOLVds+B54YVfaiJ4wWBRFFQJbFx4F8buJVDK03D0inAsN5oyR5jeFUrazM1mjcqCumsuvL3gkJlgkULz2UiOCPqwHjvmsfJtPKCKEghFGMCUA= 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+72028+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1614056041980161.24332032272912; Mon, 22 Feb 2021 20:54:01 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id etejYY1788612xNnfkaFnTJH; Mon, 22 Feb 2021 20:54:01 -0800 X-Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173]) by mx.groups.io with SMTP id smtpd.web09.5901.1614056041001559184 for ; Mon, 22 Feb 2021 20:54:01 -0800 X-Received: by mail-qk1-f173.google.com with SMTP id 204so10147762qke.11 for ; Mon, 22 Feb 2021 20:54:00 -0800 (PST) X-Gm-Message-State: tl7SyHWTw044oHKvp6kShOzcx1787277AA= X-Google-Smtp-Source: ABdhPJwGj246y6etfdvRrknXMH4BsCzA2iI73X2PRzBqHA/+y5w9tLpnE83NhnPgQwEH94gK1j5ebA== X-Received: by 2002:a37:b6c4:: with SMTP id g187mr14685505qkf.162.1614056039825; Mon, 22 Feb 2021 20:53:59 -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 x9sm12303258qtr.74.2021.02.22.20.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 20:53:59 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v3 2/3] ArmPkg: Rename some functions and parameters in OemMiscLib Date: Mon, 22 Feb 2021 21:53:52 -0700 Message-Id: <20210223045353.31315-3-rebecca@nuviainc.com> In-Reply-To: <20210223045353.31315-1-rebecca@nuviainc.com> References: <20210223045353.31315-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=1614056041; bh=GRY/WMmGZdEA+uPGHmvUnLTcE4+BLbrBfG1rQDfHDuw=; h=Cc:Date:From:Reply-To:Subject:To; b=Y/lV+A/DquH92GnXzDaXZcD+XHMdzAsohI/M1Cttr0/kEj2VUVPsuNrIcZ6od9/aYnY Ssg1mv5sdZ/mAFGJON6Mb6y6z5EFI8a/XRWvoQxhG+RWjYqahq4XlQlpiDWV2Q7tUqbIn LepDnszGPZecyXuct1hnmXAF0a9ZvDSgmVc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" o Rename 'mHiiHandle' parameter in OemUpdateSmbiosInfo to 'HiiHandle'. 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 Reviewed-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h | 14 +++-= --- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 17 ++++= ----- ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 40 ++++= ++++++---------- 3 files changed, 35 insertions(+), 36 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index ad0e77685dbe..d1ac81f73d9f 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,22 +146,22 @@ OemGetChassisType ( **/ BOOLEAN EFIAPI -OemIsSocketPresent ( +OemIsProcessorPresent ( IN UINTN ProcessorIndex ); =20 /** Updates the HII string for the specified field. =20 - @param mHiiHandle The HII handle. + @param HiiHandle 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..5153c9d7809c 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 ) { @@ -129,16 +128,16 @@ OemIsSocketPresent ( =20 /** Updates the HII string for the specified field. =20 - @param mHiiHandle The HII handle. + @param HiiHandle 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_HII_HANDLE HiiHandle, 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; --=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 (#72028): https://edk2.groups.io/g/devel/message/72028 Mute This Topic: https://groups.io/mt/80844870/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 Fri May 3 12:10:52 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+72029+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+72029+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1614056048; cv=none; d=zohomail.com; s=zohoarc; b=XstQugHZlcXR6K/yRBO0aBQNIbp/cEmHgOEa+tgZh6+dbwaRwftfdRljh/Mbl1xWy8+B0+Kb2rxF7QxwbV81QvvkdG4sT+FVcB3YyoSgm66IAeaqjMOuQ6/Den+RAgCmiI5EGMVCdoMtWEwDN95ClM4K2NY+E9V39dZc6VnShhA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614056048; 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=IZSoeWtDm6IulGM7+BBYf99pdxRbXqbuYykIqNvwmcY=; b=bvBpnmH73qduqr3B0O43xhBD4vA08EhXh7/wYdd/k3sPNufiqxwT8EagPaqwG7VrYQjByzfOAIzINDXUtbU60ioKd4whPsU5PV1tfQrKZYdLOOfcRbH7xxhthqGXY/PT9LF05sATDIWYZuGBVwpGMXDQPvo1446Sn4RcA8gR9DU= 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+72029+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1614056047938393.3704090483152; Mon, 22 Feb 2021 20:54:07 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id Qg2IYY1788612xafQH4G1Z47; Mon, 22 Feb 2021 20:54:07 -0800 X-Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) by mx.groups.io with SMTP id smtpd.web11.5875.1614056042045899485 for ; Mon, 22 Feb 2021 20:54:02 -0800 X-Received: by mail-qk1-f170.google.com with SMTP id v206so15102312qkb.3 for ; Mon, 22 Feb 2021 20:54:01 -0800 (PST) X-Gm-Message-State: yVTYOjHPr1JWCwhCidSJDgDqx1787277AA= X-Google-Smtp-Source: ABdhPJwmnOYZ2OtLFGkV7ag0RfMaMEBRGoosBf8K77bvnzS4BGWM3qtY7KNdY8xzfKlZ3Q09ly4VWg== X-Received: by 2002:a37:a5d0:: with SMTP id o199mr24390656qke.388.1614056040967; Mon, 22 Feb 2021 20:54:00 -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 x9sm12303258qtr.74.2021.02.22.20.53.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 20:54:00 -0800 (PST) From: "Rebecca Cran" To: devel@edk2.groups.io Cc: Rebecca Cran , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [PATCH v3 3/3] ArmPkg: Update OemGetChassisType function to return MISC_CHASSIS_TYPE Date: Mon, 22 Feb 2021 21:53:53 -0700 Message-Id: <20210223045353.31315-4-rebecca@nuviainc.com> In-Reply-To: <20210223045353.31315-1-rebecca@nuviainc.com> References: <20210223045353.31315-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=1614056047; bh=/7aVEOCf7JDChgHr8fpJPSaR0LGgru+X5/XKofbUrzc=; h=Cc:Date:From:Reply-To:Subject:To; b=uxRxKbclBZ1Vd67ti0/Zo4RhOrshjh7OstHQKRjwZKHL8ivbzI5jGdHQGBGNwyTUvdf 56wvnGmqoqL4hXD2MwQOlx5dd9gLQvZNuSXFMFRkcYpmKI92sWW63FF5Kd+MzESZZgD1v zP6FLrPQR7YQ7c/0i47bODnAiYl91R3LIL0= 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 +++----- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFuncti= on.c | 28 +------------------- 3 files changed, 8 insertions(+), 39 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index d1ac81f73d9f..6dcc76a214df 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 5153c9d7809c..21f106f1e060 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. 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 (#72029): https://edk2.groups.io/g/devel/message/72029 Mute This Topic: https://groups.io/mt/80844871/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-