From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (NAM10-BN7-obe.outbound.protection.outlook.com [40.107.92.121]) by mx.groups.io with SMTP id smtpd.web11.29903.1661252524820895995 for ; Tue, 23 Aug 2022 04:02:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@os.amperecomputing.com header.s=selector2 header.b=DhBuu6AB; spf=pass (domain: os.amperecomputing.com, ip: 40.107.92.121, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lMw/eH3dyN24SdkFGTQ8Q6VJwO+qPXbbxBheGA3B6+yiM6oKMcYbOasIIp4eyATuDwBfhSxDCrkg36juQWL2IB1Y7lMSD3IgMOT6BzGnQOLArqygR7+X4CXIiMx+9auD10OXB2lrSm0hTg1nUJtCuR2rrcrPPcGcAyDQk/OpO4leybza0xptJ7z6FgyjOD1CiWqbMtlJvDNF7tng0Ziu0PVzdac65c7rceIKphS9RyF8h5NITUv08oFX/6mkYu44/4n8bjIk+wbRwD845NdKS1CPQuDOEQ0j8dyXATqg1Fjac8i6usxDv1pvSplY2iXeMSYimDQhjD7fM89LfiLdiw== 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=wDLmB2P7TVKzhxn4GnrSsDx+ULiXVOajlU640cnw7Hs=; b=ABv8eVeSw5OIbS7UqpwliyDncxlouy/aUNEiFt+xFVgkPQbg4F1PbbjAxM8SlUeexIGEzTrpkpxyL+2lP5ud4JiwFxNspIJuB68b0bnqfqrGoDH7cy5f2Ad4vxDIVs4QXSceITzC+uKMAEJpcnrvfjLUDY9xrh/m7qy9k22QAlEHtKwgnon7D4QAzKQU41rHczccaT5dxYDJfEze6P3AGi78q9oAjtG3H0KodQVhzlvaAZG6PXPDl4dlcvt2ELVFiuKIizsmsggyG/tDsFgf7cVJzun9A3XKd4wbNtaG79SZehTWYURkRe+KC9Hz+6ZlolSLgU3IqR7Dr7jB1CmmyQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wDLmB2P7TVKzhxn4GnrSsDx+ULiXVOajlU640cnw7Hs=; b=DhBuu6AB8AYCw/46Sbo+v80m9FFVT7hpHyh3bVH7jAhgTodTwRijxR1dlQiG/nko5yeZtgBhjKO19N9AWj3LJa4UbzAQQUJcMnU66JwpWxRr7cmgxOJgXQ1hz/O93KDJGP3/pG+cNcD6KxCTxtBUl+GjL3Vau0scXID9CIkPrUo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) by SJ0PR01MB6430.prod.exchangelabs.com (2603:10b6:a03:297::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5566.14; Tue, 23 Aug 2022 11:02:03 +0000 Received: from PH0PR01MB7287.prod.exchangelabs.com ([fe80::bceb:a82f:b3ef:53b9]) by PH0PR01MB7287.prod.exchangelabs.com ([fe80::bceb:a82f:b3ef:53b9%5]) with mapi id 15.20.5546.022; Tue, 23 Aug 2022 11:02:03 +0000 From: "Nhi Pham" 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 Subject: [PATCH 3/6] ArmPkg/SmbiosMiscDxe: Support fetching System UUID Date: Tue, 23 Aug 2022 17:59:23 +0700 Message-Id: <20220823105926.1379824-4-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220823105926.1379824-1-nhi@os.amperecomputing.com> References: <20220823105926.1379824-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SI2P153CA0028.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::9) To PH0PR01MB7287.prod.exchangelabs.com (2603:10b6:510:10a::21) Return-Path: nhi@os.amperecomputing.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 609b6841-63d6-4288-1fb0-08da84f6e8de X-MS-TrafficTypeDiagnostic: SJ0PR01MB6430:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: T5xqephkVBe5gNcWXa0O05VevtynCtpwrrhCrO6LZV4EWecAJ2gI+sYnlahQMXkmFnT4WPvc1wvzS9f+S8dKWqB3alsF815+30Y87H0KEwwFXRSAM9DKDzyUZSFLxGBsEpGpBFucX7JRSqWUGKu07KxnWamd2Z4ucSuPjLp9/xRx18DQ/jbsZGZiGDH1Fgjc/20daDVji2pR60HyrGApm3PS3CjUrs0oDzPDfRyeypFKlrrycgpyaKBVVBg1n8H3MZzlmKK6jKN2rPICcW+ttPjtOtzcodOwNPom6we6yeQcqNodP/1Z8LqOswOSfKR1geofdFBZPuknvQe7JgM6Xd16cd6TAWGgHBS5nMUG57Rkm7ZtboLUNuXs80GaozjtgMBc0/prPnhOEGif0o1wfnSWXp0IXQ6sUnKQH0foI4W2oq5snqw5y8XXKUjxK3l6cuNr7iqAsuJugVJqB04N6xQjuVwk9gnEMq2Myl4m2nztKi+pK8OzhOiWiXFDzpqnzczJDg5YXFIVw+0zDgeVQqOCcIAXhVa3iECF1QEOv7V2NlP6x+UOHEfOGuz8OBcMH+3Whe7G131c6Sx2kcekJzBsuLTrwtWLvbXwcMfNtsFhRp44rgHCUoKLjZmfKnUO6jUkJ5uoVRjN/DRX9uRsHaV0qKJMGLEUSSRJuS1iCbk1SqZgBg/jgO6xkH9ODl3oZ4Q2tq0/cOFGZugOBsH3aktTYtVtophPl3Z5F4x8LvL1kw1uCnJ/efQJi72lVnQcbo8C43Gr4po+el4IWnuFvQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR01MB7287.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(376002)(346002)(39850400004)(136003)(396003)(366004)(2906002)(38100700002)(83380400001)(2616005)(186003)(1076003)(38350700002)(8936002)(5660300002)(26005)(4326008)(6512007)(8676002)(66476007)(66556008)(66946007)(6506007)(52116002)(6666004)(6486002)(316002)(41300700001)(107886003)(86362001)(478600001)(19627235002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?RTCShh3hRsvDv1q6RkbdLKjmaO8r92rMOEuhJdlz+CQCJZxQkTRfGBfUnSDT?= =?us-ascii?Q?LGjBs1WRJ1DMiYEXIIBJqYLlBOIVcQYfmEb3MeB08iMtzvU7k4bXHby7b3Fw?= =?us-ascii?Q?YgXHoGyDnaGlYTs4ZdAgkfW752YKSQe2BFd1+g7KWp6InELt+Z1FY9xTwt3T?= =?us-ascii?Q?YjCPRHRnWoUMNuk6dmB4uVu9ceXAPo/gssjGV5lQnl5zizBe+bxpH6vw53rL?= =?us-ascii?Q?mF7whQPAzi45ToMASNuIuPbLzomX1xmaSd9yyQfwrSN6cwTsYLrQalZSq+kM?= =?us-ascii?Q?uu84YhISHb/AoadT8SogJP6Y2xZUlYGL4OXpJiNBqNqksRzS2/DMkhZwetdo?= =?us-ascii?Q?rmiePXeucRehj0t5L/7Xhmt3Y/r3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YKiNdkcV5j0o40sDFfKqzamLTJSJ7ZZQUbjPLVJA5spsAi?= =?us-ascii?Q?Giq1yY2mx/xi62QApcKdZShexa5f5mpXCiGmua/o1blit/VsReIYM6QurwaW?= =?us-ascii?Q?TceBkPEIewrf0WGUErm0LYXDbO75li2AGXTeDITzPp9GqmMTi+XOviWqBWMf?= =?us-ascii?Q?OzPWrAYDAdiX3X3cEN0892QSWwO2VqWXT9gryRlHUDeZ2iyZAenOBa54Dkyg?= =?us-ascii?Q?c7DTD10WWUTlqZuZdRLG6mcMC2cLJWCOtEELlgWi1DqkePtWen9UHvxyKAmS?= =?us-ascii?Q?Ai5SJte180xh6dRsujmOWm6YUDyl/K+32z1Ci1MiE0TDLxyXqcUcxaUhCIzX?= =?us-ascii?Q?X1BBUE8X//FqOpa5Lr1Re3w=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 609b6841-63d6-4288-1fb0-08da84f6e8de X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2022 11:02:03.2103 (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: fytcmHI6tlwcIYdkbMk64fXOKqNpWNo53CMHtkFnbygowcaGYOS5HebmadwZhwy9g21XQutbKwifMaeY7J8uuj1xZa+/r70Htx5lqY4Ji0A= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR01MB6430 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain 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/MiscSystemManufacturerFunctio= n.c | 3 ++- 3 files changed, 32 insertions(+), 1 deletion(-) 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=0D );=0D =0D +/**=0D + Fetches the system UUID.=0D +=0D + @param[out] SystemUuid The pointer to the buffer to store the System= UUID.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +OemGetSystemUuid (=0D + OUT GUID *SystemUuid=0D + );=0D +=0D #endif // OEM_MISC_LIB_H_=0D 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=0D * OemMiscLib.c=0D *=0D +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved.=0D * Copyright (c) 2021, NUVIA Inc. All rights reserved.=0D * Copyright (c) 2018, Hisilicon Limited. All rights reserved.=0D * Copyright (c) 2018, Linaro Limited. All rights reserved.=0D @@ -10,6 +11,7 @@ **/=0D =0D #include =0D +#include =0D #include =0D #include =0D #include =0D @@ -236,3 +238,19 @@ OemGetChassisNumPowerCords ( ASSERT (FALSE);=0D return 1;=0D }=0D +=0D +/**=0D + Fetches the system UUID.=0D +=0D + @param[out] SystemUuid The pointer to the buffer to store the System= UUID.=0D +=0D +**/=0D +VOID=0D +EFIAPI=0D +OemGetSystemUuid (=0D + OUT GUID *SystemUuid=0D + )=0D +{=0D + ASSERT (FALSE);=0D + CopyGuid (SystemUuid, &gZeroGuid);=0D +}=0D 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 @@ =0D Based on files under Nt32Pkg/MiscSubClassPlatformDxe/=0D =0D + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
=0D Copyright (c) 2021, NUVIA Inc. All rights reserved.
=0D Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
=0D Copyright (c) 2015, Hisilicon Limited. All rights reserved.
=0D @@ -160,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) { =0D SmbiosRecord->Hdr.Length =3D sizeof (SMBIOS_TABLE_TYPE1);=0D =0D - CopyGuid (&SmbiosRecord->Uuid, &InputData->Uuid);=0D + OemGetSystemUuid (&SmbiosRecord->Uuid);=0D =0D OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1);=0D UnicodeStrToAsciiStrS (Manufacturer, OptionalStrStart, ManuStrLen + 1);= =0D --=20 2.25.1