From nobody Sun Nov 24 04:56:35 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+93929+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+93929+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1663554141127136.1154245447011; Sun, 18 Sep 2022 19:22:21 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fB6sYY1788612xh9mTJT3lVN; Sun, 18 Sep 2022 19:22:19 -0700 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.96.135]) by mx.groups.io with SMTP id smtpd.web08.15781.1663554139017482349 for ; Sun, 18 Sep 2022 19:22:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TvP2UBCfLK9R8uthBMofmpUK9QAcKEV36FL7zloYT33TJMcGoTiYTohHzolz+tPvGp0obA0JDFLsh3OtHgrlV0mHtUjYmFjpYBbU2hrcz/JeOsNqRkusz88qSVDPFrRmQkXN+rONt9YPW0r21dJIM6hCY7NgAz2atj85Jgeh8Q248xU1lAsQERGxeCu7pp/b542oq6LlBtn1xMuc6icCma4Gfy3vCNnXnOYaEDXpLYOzUDzYCCyxCfjoLQwpXq0pxOCgFpAOyDJTs8l1MsIvFJp9AO2p2adLD7z48FRQZFzhwgCnESBIFPp9h2BAWm8MlsnPFl0TjHjvmGWbhYyJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1LKLS8PPdyOEKkORFP1vRXbA4AzrmzxV/ZNq4ra69fE=; b=P8C/e7inlMBmTuInysJUv2cIEcoNMyJ3vwjYmEXgNjSscrQF8zdel7aRudm1mo/Fo+yvqIobuPOvUYn+qvoUHMNfo8HFtAB+jHU4dY9ahxR+wo7iHoJ0+F0NurcH3Cdb9i71PNA3M+xrIJsEJfwl5YJnajo2fWlufaQ3gh3GXXv70W/Ja2RIgr5jfjAtlgHSTQCbY0b3i9ACUD1Zb/kDZEqg3T0qz7CtXpe6x65bE/I8te1fNdfaW0Uanc7p2S/coOPAPRS9HWye5/tpq1Jw08BSwFYxxzVYDkQDFsLbpridkqLSjFDF1mkBZys2bRBMkSr5/DUqbpEKQKBNCZdAKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none X-Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by CO1PR01MB6791.prod.exchangelabs.com (2603:10b6:303:f7::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.16; Mon, 19 Sep 2022 02:22:17 +0000 X-Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::441a:930:ac15:1ce9]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::441a:930:ac15:1ce9%4]) with mapi id 15.20.5632.019; Mon, 19 Sep 2022 02:22:17 +0000 From: "Nhi Pham via groups.io" To: devel@edk2.groups.io, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, sami.mujawar@arm.com, quic_rcran@quicinc.com Cc: patches@amperecomputing.com, Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID Date: Mon, 19 Sep 2022 09:19:47 +0700 Message-Id: <20220919021950.2110333-4-nhi@os.amperecomputing.com> In-Reply-To: <20220919021950.2110333-1-nhi@os.amperecomputing.com> References: <20220919021950.2110333-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SG2PR02CA0071.apcprd02.prod.outlook.com (2603:1096:4:54::35) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|CO1PR01MB6791:EE_ X-MS-Office365-Filtering-Correlation-Id: 906fa3bb-4b70-4ca0-e1ea-08da99e5c5d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: SHoVQgkg83hMGDc8maoDi+duoAmEFyUBrShsdECxy91aLsKPcugs3ccoxWQeGWUQAvUaDrSC6V5jJKshGkqjChejJdJ6z+UCblBWq/esHV0gJWol7iGnNcuaEwQE7rnp2/vv/u3QrEgC1/wdIWf82FMe5r3Xtc1c5L1oirNjfjKh8hYu60Gt7kv9vpdZtkTCyZ34qgt8G7Y5DptLl4XD32OUkjJ6eW7QqxtnVSyAbJZDKrINYiCMg2LgPuUT3mjXj6wEjRp66k5sz1mbnH2kZt+teUCOzO7MvGFE5g6Wro6rmYv6t5y0kJII9etiDuXivnOCJDxZ6nGGOIgMgTAWApPG5Y0rD+gn7Kcgo1yQ3LqGqz1Co6iepzsJE2lV3DaaQwSpeCy6WNd93CBjglbiaCYT7Zb6i3GJW3GfkJO7QPbIUbed1aCDgqvQkVbgv2b9Rj//EhAUJ68cIBOzG2rIc1h8kjLQRcM1kSrgBtohN1lNCxNwKUCjYaWRQVQ4MzIPS5H95uw+gY8wYwpDb4N4fjne9x0FhfrI59sp2coAKWOdBE4XJLC6NlRQTJGgugzF6H8V8GrjLW4eERx9Lc/TxSfbSMobsTSCme+KkDaF2ONBShF57aJpNHVCaEgSIPYzOrkALxy/thrCfoYKX9PF3kw/zn3FTP8/KWfZfvMjfTYo7hfM1j0o+brUiAqturLGRPXKJWD24I5viu034z3mLdqC03/96LG6VvKwPemMCFzRmK0pRjci/3FxFO/YeIW1GwpFCSWsbMcn95LenxtLxg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?GAR4lJLvC05WdMHmi8orM0qmuy+niJU0JS/gTq3yFmuIu7d8/6JULRj21GCi?= =?us-ascii?Q?PAjt/cRkLWZ/+TY9wp+scCAA0tLBLx7UpZb0LQan1isfBLRN3ILV69iYiGoX?= =?us-ascii?Q?+jNh83Ae7cUdHH7tzynZvWUrSEOjvCVqk6WXvlWHa0w782UXFlLzqdhjMVQL?= =?us-ascii?Q?lC8izyd5piOJdzYD8bP2sfEZK3KAW+ivd2NdXqnPHTEm2DESUPPvPrHV/wIw?= =?us-ascii?Q?Pno5xMvdOGx0GiY/Xj3lCUhPDkO3EoQxSfNqPSVDoIIQqdNY/Csvd85Iw0DO?= =?us-ascii?Q?kFtfmmqVvUM5uSmJaHmB9IUGjJeJUv/Sr2KQoOEKwpWkp6cUAt6e/uWUmfb+?= =?us-ascii?Q?YBznXq8fA1sk2eSKSwZPVw4qAZlzUuKc0twY195AjuSyTa6FUQHrwoUNPa2/?= =?us-ascii?Q?B0hxnvvjup5RPKYWJFH0BJPcJr7kLD5krqyxN5XCkVZcMMWxcbNIRRYrM8rl?= =?us-ascii?Q?on8U8mp8oAV0dx73Icn2VyaX2JtjqmRggms1lKya3fsS1XTqMs9tPxbk08a/?= =?us-ascii?Q?vWIbL6IplVrgq2yRjHG1G4zgXQfdLLUxnK7m2SMwn4jPFJOkA/azX6H7gZZt?= =?us-ascii?Q?Njc9JLbfc1b7Si9VYxO846zdGudw4cdI/olvptED9pVXSrbdkSMlGg5rvCIp?= =?us-ascii?Q?/iC5gY7b4U17/CoyXS7+FPMoCtzFKQxG1pdKKsh0SAhCTkiusQFDHaVd1rk4?=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KsbYuAgrxyoMxpYArjZ?= =?us-ascii?Q?wrsIzDQd9ildBVit+MuTvP8=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 906fa3bb-4b70-4ca0-e1ea-08da99e5c5d3 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2022 02:22:17.4560 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6dZl9SoFVw5b7ZhhCZ8Rt8NVZVn+hR76p2Qj6m/uUEi9hdNeiXFGrpDDy6dI1CkpdgpG14mHz1R2wcWIGFITiF4xyCpZ1ic4/zV1mh8maG4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6791 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,nhi@os.amperecomputing.com X-Gm-Message-State: 0NmjsDISjllui8vqLoHbh5P0x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554139; bh=YuLuM1mnTkCdl87uFU9dhY1UNahAdst1/M7EtBCZHRw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=tG7YlpInPc79OfHYA+ocLcppeJnlkKHz+YpnXtoqj6Gt1/BekfXdbbJZQXxngketBqD 0pkn0aWTDCNSLjqDoehl0VRppNUMognJZO0uWrC06CJ0qHm6BfQkFoQXSiF1j7Af3Ll1X d9J6PULoGXWBnX6Etin7ID9pJNPKBW6HAlI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554141229100001 Content-Type: text/plain; charset="utf-8" This adds an API to OemMiscLib for fetching the system UUID according to the platform. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf = | 4 ++++ ArmPkg/Include/Library/OemMiscLib.h = | 12 ++++++++++++ ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c = | 18 ++++++++++++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunctio= n.c | 3 ++- 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf b/Ar= mPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf index 5c4268f68b4a..8653f57720d1 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf @@ -1,6 +1,7 @@ #/** @file # OemMiscLib.inf # +# Copyright (c) 2022, Ampere Computing LLC. All rights reserved. # Copyright (c) 2021, NUVIA Inc. All rights reserved. # Copyright (c) 2018, Hisilicon Limited. All rights reserved. # Copyright (c) 2018, Linaro Limited. All rights reserved. @@ -29,3 +30,6 @@ [Packages] [LibraryClasses] BaseMemoryLib DebugLib + +[Guids] + gZeroGuid diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 330bb4b014de..d87737db9c2b 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -235,4 +235,16 @@ OemGetChassisNumPowerCords ( VOID ); =20 +/** + Fetches the system UUID. + + @param[out] SystemUuid The pointer to the buffer to store the System= UUID. + +**/ +VOID +EFIAPI +OemGetSystemUuid ( + OUT GUID *SystemUuid + ); + #endif // OEM_MISC_LIB_H_ diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index 98970407a65e..32f6d55c1a9a 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -1,6 +1,7 @@ /** @file * OemMiscLib.c * +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved. * Copyright (c) 2021, NUVIA Inc. All rights reserved. * Copyright (c) 2018, Hisilicon Limited. All rights reserved. * Copyright (c) 2018, Linaro Limited. All rights reserved. @@ -10,6 +11,7 @@ **/ =20 #include +#include #include #include #include @@ -236,3 +238,19 @@ OemGetChassisNumPowerCords ( ASSERT (FALSE); return 1; } + +/** + Fetches the system UUID. + + @param[out] SystemUuid The pointer to the buffer to store the System= UUID. + +**/ +VOID +EFIAPI +OemGetSystemUuid ( + OUT GUID *SystemUuid + ) +{ + ASSERT (FALSE); + CopyGuid (SystemUuid, &gZeroGuid); +} diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufac= turerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemMa= nufacturerFunction.c index 5cf72644d0b2..22fb5eccaa63 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFu= nction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFu= nction.c @@ -4,6 +4,7 @@ =20 Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ =20 + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved.
@@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) { =20 SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE1); =20 - CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid); + OemGetSystemUuid (&SmbiosRecord->Uuid); =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1); --=20 2.25.1 -=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 (#93929): https://edk2.groups.io/g/devel/message/93929 Mute This Topic: https://groups.io/mt/93773961/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-