From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.72]) by mx.groups.io with SMTP id smtpd.web11.55.1661272326341287063 for ; Tue, 23 Aug 2022 09:32:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=X3axyM84; spf=pass (domain: arm.com, ip: 40.107.0.72, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=XJjZMDkVVgtn05OxcrTokKUJp7ygS3CEyS/ZBg7JLgnE16W+oI50xfbS3OUBH8zTanlQ187J0umqCJmT69AkDEKFzy7DFrJKBTA8ZQElUEG5Fwfg8jyR1w+htD8p3TKmQ2Dh8pX0tqvOf1xd3BCvRJqk/4CKMGBYinFMpWR3PlXL2ybogGRthe3LIdbX13mtsGVDtORi0ex2fYQwpLgUT7V9bNhM0HPIEpejXXh9VVE+ahqDHBAFlLi/LMi32IzDR4aPslryWp6QVBEW62ZwkCUC/hsnH7fzngI3/zIGim9EC0eumi+pn2fsfv03wzcpMYfCiR4FJHBFgXY+2dMKwQ== ARC-Message-Signature: i=2; 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=L/C3She3KYUnN+DOVqCzkltYIJvfXxCBGd321YWv/S4=; b=FXtrfWhB7ROQrfDPVEolWKuBLCwkpnrGQPD5nbPeMlzCFxVkAi2SlHWpsUknEDi355V2NuNfrvpn6bvqD7h5BCjFVvXbL7OmFdVFHu6twwipqVyE1byYJwe8LW7gd3H5Gy0TJ4rCgol1c90oCFrwtBzKA2hg8mRbEI524JgeVIU70Dgv15LCC0bVHHjDSy6tNwIi7X68Swd3CwUPEpX03el1H56cu1XOjRNtpZXm5HQCqEqpfWyKe4IDzg35zIDhB3OWHvaxauooS2lKDLYeDvvkIhMpBlR/iIkWXHL9AHxtzWiQZ5cRt3G5Z0qTmlwbSShcIExj0V6MVQe2n1MUpA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L/C3She3KYUnN+DOVqCzkltYIJvfXxCBGd321YWv/S4=; b=X3axyM84afGW9cPIYHymLQQLqPOoUfU6OyFpKiFJlj/FlGXe6NWMtPpKc8SdSUGYUXpOC+1MzrYKGSkhvYEtHPh/gLk5FCD7ACfR6kNtexanm33Iinnb8XrWitE7vac7Xr2yV/2euigHlSQJtol8Ag+VdLkQQG6dPzkezL4771c= Received: from AS9PR0301CA0052.eurprd03.prod.outlook.com (2603:10a6:20b:469::7) by HE1PR0801MB1881.eurprd08.prod.outlook.com (2603:10a6:3:55::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.17; Tue, 23 Aug 2022 16:32:00 +0000 Received: from VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:469:cafe::29) by AS9PR0301CA0052.outlook.office365.com (2603:10a6:20b:469::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.24 via Frontend Transport; Tue, 23 Aug 2022 16:32:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT043.mail.protection.outlook.com (10.152.19.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.15 via Frontend Transport; Tue, 23 Aug 2022 16:32:00 +0000 Received: ("Tessian outbound 2af316122c7a:v123"); Tue, 23 Aug 2022 16:32:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d94fc3fe5bf41d06 X-CR-MTA-TID: 64aa7808 Received: from 55702d77d996.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0BD0F54A-9A21-45D5-8FED-E1D975CEB248.1; Tue, 23 Aug 2022 16:31:54 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 55702d77d996.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 Aug 2022 16:31:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ffPrvVjVHzOtK2FwJ6h2eal/1skD58+2bUr4TG6olaezvyxPQF/W+3G2gs4dArpA5rcMyjzxGViyAQgLb4hA7sdI0V5DIzt2/1HmjM100roe16gbWihmZKjcaGpwxxU8WaEMSZ4tCKIOHVM/i9L2ClOLIZ/WdldEjJSsLxjLPxcOgg7fpgp46Bu0pEMHGnq2PAW2B+BbdYXS91TcLo11EsoywQ9dssbFeztYAZWMRNzqFfhbm/NbE/q2oOgPVO30ZBLFR3Wcj1wxaBu3VLmU5d2FcnyeZJs4TFjyi2vnhgkvvxvFE27rtbVxmXGC2LwSYiq2244m71v0fd0CUXdukg== 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=L/C3She3KYUnN+DOVqCzkltYIJvfXxCBGd321YWv/S4=; b=MgMAMlSeigPafsCNUzN1DSKu7HFpCMp27grF0cbji2C3KeQVGyejtk7TgwePlImew7gPcltv4ElrvCmNi+/xAEgSb+c7vt2O4uhsPz+WMsQ2IHyhzR+M5OLuRo99C3CL8T4GmTsKCcuIp2AK4z/gPMYGuMrBOPo1MlqlJ2Ymftu7NbfQtW0n0NKa6r8Ln9HyjUggHoF1gPjY6prkNDojG9mT8uw12KypBpU2K6JQy8BNNZSO38MCbIt+wNMc4t5UgE2LwnSHpD12/mvYqDyhOXj63QMqtP1+QDPqXVmWD+b1az3n2jhF9ZW0vsoZZRK9VXy8Kf+LOV47/CzntoNaig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L/C3She3KYUnN+DOVqCzkltYIJvfXxCBGd321YWv/S4=; b=X3axyM84afGW9cPIYHymLQQLqPOoUfU6OyFpKiFJlj/FlGXe6NWMtPpKc8SdSUGYUXpOC+1MzrYKGSkhvYEtHPh/gLk5FCD7ACfR6kNtexanm33Iinnb8XrWitE7vac7Xr2yV/2euigHlSQJtol8Ag+VdLkQQG6dPzkezL4771c= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by GV2PR08MB7931.eurprd08.prod.outlook.com (2603:10a6:150:a8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5546.22; Tue, 23 Aug 2022 16:31:51 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::b480:677a:ac9b:8f24]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::b480:677a:ac9b:8f24%6]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 16:31:51 +0000 Message-ID: Date: Tue, 23 Aug 2022 17:31:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID To: Nhi Pham , devel@edk2.groups.io, quic_llindhol@quicinc.com, ardb+tianocore@kernel.org, quic_rcran@quicinc.com Cc: patches@amperecomputing.com, "nd@arm.com" References: <20220823105926.1379824-1-nhi@os.amperecomputing.com> <20220823105926.1379824-4-nhi@os.amperecomputing.com> From: "Sami Mujawar" In-Reply-To: <20220823105926.1379824-4-nhi@os.amperecomputing.com> X-ClientProxiedBy: LO2P265CA0110.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::26) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 30a160bc-2c28-4db1-7350-08da8525010b X-MS-TrafficTypeDiagnostic: GV2PR08MB7931:EE_|VE1EUR03FT043:EE_|HE1PR0801MB1881:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: IOBfUbsyO71k0LWHVBwGZAPq5k2aURrmKZ4yYi2GOzMq/IiBgIvD08FWxzRbgOdK2VLg+5r3pO8Hlt527RPlNWOl4e9N0SHq/KTR1pN5GXEULtkR0PTJSt1n57P34uvxgwbz7Oofb2CRnpTixWepplsd8mMSyUDbc5gsyPZ05u5+TWra8MDZE0A20zsISd7c3QJJ7rrioqjlxMMO1hF/LpCyia0PVYfyAeYo9d36/OLKmfo20HkoEwzqRx9OLUajuekv0mQKRyEVlGDHwG0SCfU4XVFB2Wu5qMQiY+vsyf6TNni7etMSH7Sar6LSJhn3Pwss3KcsM7CuisaS/CMCJEkGPp860xWN7yqdNftYxcJJSdm9J6lkKEqNnX7A9usLKU2tMd5i4VQ7BLv/kSYq3Km7ShpJR2CMwHcA1+NTzDF4/ZF1FONGbIROfJEGd/NPI15AUvKWTct1EetTuBsfm4BITGfFhdc3NOgdIf/eYSgTHdBNWhU1qZ4MFoQew5KjmQffVnTpq+kBv6QDziiBzh+PwL8YutU0JWiVQaDI82ZRH8t+bWarjwmvlOlK4iQbRy7JoBccOekI5ef3OltNc3ZbDlGKMWHV4ZZKBJZxeamHe5NNT4yyzcfygx4x4NHRDjSPZJtDc8WqulQzY2IC1iS5bbUM+ehnBUc88v0KmgWxzeNykgfhIIGZrVVJ2Olrp0lCVVuK3erH9cphLDIKV8oKuOWumIuZpS9w+Ertvp67kjI0lNMZf5chdMPSWZ3RqxEbyHoecN924XJ/rYRDH1Qg5lCrne9HO9qLSVNOxiY= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(346002)(39860400002)(396003)(366004)(136003)(376002)(6506007)(478600001)(41300700001)(6486002)(186003)(26005)(6512007)(2906002)(2616005)(53546011)(8936002)(83380400001)(44832011)(19627235002)(5660300002)(316002)(66556008)(4326008)(8676002)(66946007)(38100700002)(86362001)(31696002)(31686004)(36756003)(66476007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB7931 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 66bb1ef8-87a1-40c3-2379-08da8524fb57 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MIVGnj6hTMCSniAKEPVqRbVKq36budQS3r1oxsenVXyfPI4uW7SF4o6cjgv/QCJFwJEajIzQWUDT3yiBuGaEUmqQKyDbHQVbK17Y5l6RUJc2VuR+a6j6c7qbjduNg9EVDTrEsirzC3ri+4eGCoeKk/XGSWiAS1jmx/kwQiIcXw+3IljhW2syO0cDf6Ok8mia9H6IfpTScA8K6DHM5QkXH5o68KSFDQwW7LT/YCXlOpqAodbGK+5uFId/18M+xaLQXBobBhMLOKCuEjTKyXE7bR1PwL9ecW8uhCIGOASHGxOAU0ZeBLQ7CHYD3isE8TFHnin8OerN3dnTA1yft2eiUghWuFUanwNEI/wNjWM1Z1MsBtBLnQP3d4EEdFSMDCFJLCvmW6bhWH6FlG00dGY94677LLrydsCNwAOZn9kE8j7dkzGsykeg2dEJFP6ZUtftaeyPW4XE7Q6UmGdmKGVpNVPIivNSa2bngSFXSdBc1BLzkMND5u5S5VLnTFWilQUbeWCypGmZKQRTR+BxlibPFg2yZ6f7xfzsz+xkMBcUpLYt8KoZBRzhFZU73T7GeNL+1wlr7E+o5Yaf4flgALMgh7JFFsGIEb87hheUxNlUgu6jqQm9nyi7ugyddWBtTOE1suDZvQX/QE6T03fHAssXTLswkyVOG1fKiZpDqo6F+kslzZmBWx/DiNQB2Bn0nOWq3b4dVVRSyE1FaJGmtAfMieFWoEqm7DWSMY+zxLcYuhU9qZszbx3GSbCpZkgqPnFZvrb+Odcg9mQBUPvjScPXn/A6Jamg1f2xx9+9igT7QMk= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230016)(4636009)(376002)(136003)(346002)(396003)(39860400002)(46966006)(36840700001)(40470700004)(70586007)(4326008)(82740400003)(8676002)(70206006)(36756003)(81166007)(36860700001)(31696002)(31686004)(356005)(86362001)(47076005)(83380400001)(336012)(26005)(6512007)(186003)(6506007)(6486002)(41300700001)(478600001)(40480700001)(40460700003)(19627235002)(316002)(2906002)(2616005)(53546011)(8936002)(44832011)(5660300002)(82310400005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 16:32:00.3064 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30a160bc-2c28-4db1-7350-08da8525010b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1881 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Nhi, These change look good to me. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 23/08/2022 11:59 am, Nhi Pham wrote: > This adds an API to OemMiscLib for fetching the system UUID according to > the platform. > > Signed-off-by: Nhi Pham > --- > ArmPkg/Include/Library/OemMiscLib.h | 12 ++++++++++++ > ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 18 ++++++++++++++++++ > ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c | 3 ++- > 3 files changed, 32 insertions(+), 1 deletion(-) > > diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/OemMiscLib.h > index 330bb4b014de..d87737db9c2b 100644 > --- a/ArmPkg/Include/Library/OemMiscLib.h > +++ b/ArmPkg/Include/Library/OemMiscLib.h > @@ -235,4 +235,16 @@ OemGetChassisNumPowerCords ( > VOID > > ); > > > > +/** > > + 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/Universal/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 @@ > **/ > > > > #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/MiscSystemManufacturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c > index 5cf72644d0b2..22fb5eccaa63 100644 > --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c > +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunction.c > @@ -4,6 +4,7 @@ > > > Based on files under Nt32Pkg/MiscSubClassPlatformDxe/ > > > > + 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) { > > > SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE1); > > > > - CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid); > > + OemGetSystemUuid (&SmbiosRecord->Uuid); > > > > OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1); > > UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1); >