From nobody Sun Nov 24 01:26:09 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+93927+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+93927+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 1663554134752419.177518528106; Sun, 18 Sep 2022 19:22:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id LaU4YY1788612xRKHpqj91ST; Sun, 18 Sep 2022 19:22:14 -0700 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.96.107]) by mx.groups.io with SMTP id smtpd.web08.15779.1663554133247290766 for ; Sun, 18 Sep 2022 19:22:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gjwRjWxKsopVSyOzolOdvOryXsVIVE8c7WO02nHGCRx11oQPo9Y+WjNUfxqWOvFBxjW/33qqkkyKpgVSXJcDKOUIJTP90DwLyudlIabyl/RFgJoc+paJwQfaukr6NXWm7eXRvvpfJOHYVAiYn9i327druxQ7x3e7rHS4iJQqCdMFMIw6RIUIVRr0dPUxg+4v34BXhkcXXfFfW3mHvt8B806DzBddzBFjWeQY/6vQY+byGjry8LE04X9Ol3OFn4JXa2dFgyfVNKLsbusc5jR3NAV5fTlp0+lvG9HNRimFu8b/1DBz7500dcnxnaPrr69/LCBidVLPiLZB53z5Vl0p1A== 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=67JiAfOawA7iPm7dI40qwTP+eTdajboX8jueVFhGnNU=; b=ByB5AQcWs65Z6pLafBlLPuByosaPjQTI5qVJpv8bOP8XKzzjHgBFU1n9cu4ttuvGxlWXaWkHkHsVh7kesNr6pYTcaApbG6Y2H3dUoiYiVvtiPhaeGeKG0kL3sL9IEQ9Y7uKgzSx9Z+jMCqW5XBhv6Lx2cc7J5WwbjqQoEJDTvZOEL3r5ryXRmfMm6QRL8rzoovo6KTupjzIPgRKRoezb5eXumjkifnnNj6GAiS1FcPCeIiMzwJul2Sy5HTNMmWqjTf7inaSsGMUAntIoHRdCovSGPyQo3W2ddNRQ+VVpuHoYS2D/C1G/8iYcTEm9q/ZWIyv7+k7RxZ2QET20NSwPjw== 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:11 +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:11 +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, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 1/6] ArmPkg/ProcessorSubClassDxe: Get processor version from OemMiscLib Date: Mon, 19 Sep 2022 09:19:45 +0700 Message-Id: <20220919021950.2110333-2-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: 327e18c9-e7f7-443b-9742-08da99e5c217 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 9B0ouUJuIvTsBI2V1Wx62+SszVw9y5rqzVL2G15u6REFZ8oRxq6352PT7THiMhnVgg2LDn9oVBq66lqBzG+qKyIL4Y9MyaCSwmhClccLA7dxi7hwkPNRLgrG/QlFjje9Lc8gzbnRr3QahEj5kiKfXaNaZKwU9GHL8RI/mNgZhg9Q71FLeqeAc20ATiLPkF1Yt/SPCqUHf/DfHkdyfTfBQDt/JX5hG4KhCPXFb1EnBVyxR5Mayb7/uLNrT8aRUioEDDBITl7l4oZ1eivifWW+SWAp/UMBpxitN/WiI4ylQxp7AAunx4B6n8HJW8pdj8+bX1g4S6MmOkIPvwgatCuhRkZh6Tvnqfyse31yPUIqzPn0zPuhVXKFRISQi4zc+ZG/gx4wWu1Yf4mSd3TJ8R+dVr7O00JwnWzgRXISecbFAb9o4OUMHsP3TabhkFl+Mr/Y7t3rdokE9vrMdl4oJlwoAaTJDLAaM58I9IsD2ODEiBQ9q0bB4eZUOZk2sJsFGIpltCtFmH/C4Oj7zOaUyn5xeiDQpq1IKfZguPDzDixuDXaPGCkxJnvQGA5k2pMmDInc3VT7LWCbJGd/ZaoFknLM9KBWyFWH6XEyiwp6DTic8TO44Bs4rq3JRrbCauoxYN9a1tAChqA+dlG8if3lBWCnn8j2jAYacSx6Zxo6xUiWE/8Aqq/4cpo57QV+cT5Lf+YlIgAsluFByuorzvnbXwT+Ch+SjD4yrMQTpxKRLm3QO/CZhrrvf2JuxDSaEgL7WPtIRPJW88FtbY40s0PQ7TGPHg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PrCImn0MGLAuuyHqGciDO+pyaTVvfCyn8d1M3RmwVSQfBqlliWLZr+pYmZAz?= =?us-ascii?Q?wGFg73fv6RJY+KT6Ws+ZkBkW8Zf3sebk6oDjrYOuL+g6ISh56+xYu13kvdkV?= =?us-ascii?Q?u7FYF5xP1wehX/1JczvOP77wGP7tDjWznQ/O5IMfseDdNiUUfW8sHB3ea8RB?= =?us-ascii?Q?G3X5uIQJC6uPoYTSePEbwuKdckmautb6Pyu30PxPAOAcxp9sx7M8jTdQI71k?= =?us-ascii?Q?/6bWm+ULG7USAJi4Xwa3zmA1c2PduNYE+/2byeOcad0/WE389CvzzIhXz+Cd?= =?us-ascii?Q?tz1bY0uuy62iFIQPPNhVL5hI59o00hocT3keqoY01REY6SAgFBsDxUBHt+Qn?= =?us-ascii?Q?754qaCU25kKw982RkZ79qZ9DotN2R6B0LDqeHHJkmrOdi6TlEZ5lyT2KznBm?= =?us-ascii?Q?Ou4fhjXg0fJtjEC67NK0I+EBJX7uKsxYkqpi15B/WKIK1vofsKiTGXkRzssS?= =?us-ascii?Q?QMIo0XZWJwkjeuoa4tNw/NnXPXtstZy9+vYnZ4J8MeQel4Ri7soImWbodtWy?= =?us-ascii?Q?WUbcVL4kafixAGVw6BMGEC8aUfNYyFceafAqODwx257xWqfrjSwk4H6m7mav?= =?us-ascii?Q?bDLCkl3TPPVuToH4Qtepdgxd9bgU/MxomKgoXW+eFgAbhfI0O3TjeYXdV5as?= =?us-ascii?Q?txZleopdzHPt7NQT0fd6l6Kgn2lITJZTWp74bO3VyI28eFzmC9ilXjpOq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vFCsTATl1Jz9tIm3p3RtdoDNjNENK1FyPU0ppVF0VL?= =?us-ascii?Q?IeglZDSwfuYLKjZaYjnu6n8=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 327e18c9-e7f7-443b-9742-08da99e5c217 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:11.1732 (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: HiYTHbzXABlgsV8beqk+hCtY9tqtEKnW4cLuUlrdtSF0vPP6BTjWgz4ELtWRZiuZNHaUr7Ob9Q2oMFCZ1F3QjxkXhXnwMS69qqaC8iSlwMQ= 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: xP4E25jnH9XQpWFNtautvROpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554134; bh=ij9ejFDO1ZK1NlDj3dbFYa66kXzCNTWYgLKzi2Rih8s=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=KLg+tvbLHjtbl3APNbcQ54I75jnYPBolKBfPYGGB62yzAl0E8TnsfBPlO7douaQLhY2 VQRcb/STV+L79l9DxjtRNMByg5sCQtEEeJZ6LZqReygm/hx95Jm1jPE0/cLZQrvpLUBS5 3RTvlT2nwtxeC9nC5UezMdQvJ6KU5hpjHOs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554135195100001 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen In some scenarios, the processor version may be updated dynamically from pre-UEFI firmware during booting. But the processor version is fixed with PCD (PcdProcessorVersion), so it can not be updated it dynamically. This patch will support setting that value both statically and dynamically. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h | 2 ++ ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c | 8 +++++= ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 47cb30d84a62..330bb4b014de 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -1,5 +1,6 @@ /** @file * +* Copyright (c) 2022, Ampere Computing LLC. All rights reserved. * Copyright (c) 2021, NUVIA Inc. All rights reserved. * Copyright (c) 2015, Hisilicon Limited. All rights reserved. * Copyright (c) 2015, Linaro Limited. All rights reserved. @@ -58,6 +59,7 @@ typedef enum { SkuNumberType03, ProcessorPartNumType04, ProcessorSerialNumType04, + ProcessorVersionType04, SmbiosHiiStringFieldMax } OEM_MISC_SMBIOS_HII_STRING_FIELD; =20 diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 0b9af9bd7e1c..3b12e26abf6e 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -1,6 +1,7 @@ /** @file ProcessorSubClass.c =20 + Copyright (c) 2022, Ampere Computing LLC. All rights reserved. Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved. Copyright (c) 2015, Linaro Limited. All rights reserved. @@ -512,7 +513,6 @@ AllocateType4AndSetProcessorInformationStrings ( PartNumber =3D STRING_TOKEN (STR_PROCESSOR_PART_NUMBER); =20 SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorManufacturer, ProcessorManu= ); - SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorVersion, ProcessorVersion); SET_HII_STRING_IF_PCD_NOT_EMPTY (PcdProcessorAssetTag, AssetTag); =20 if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorSerialNumber)) > 0) { @@ -527,6 +527,12 @@ AllocateType4AndSetProcessorInformationStrings ( OemUpdateSmbiosInfo (mHiiHandle, PartNumber, ProcessorPartNumType04); } =20 + if (StrLen ((CHAR16 *)FixedPcdGetPtr (PcdProcessorVersion)) > 0) { + HiiSetString (mHiiHandle, ProcessorVersion, (CHAR16 *)FixedPcdGetPtr (= PcdProcessorVersion), NULL); + } else { + OemUpdateSmbiosInfo (mHiiHandle, ProcessorVersion, ProcessorVersionTyp= e04); + } + // Processor Designation StringBufferSize =3D sizeof (CHAR16) * SMBIOS_STRING_MAX_LENGTH; ProcessorStr =3D AllocateZeroPool (StringBufferSize); --=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 (#93927): https://edk2.groups.io/g/devel/message/93927 Mute This Topic: https://groups.io/mt/93773958/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 Sun Nov 24 01:26:09 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+93928+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+93928+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 1663554136709858.7499109336148; Sun, 18 Sep 2022 19:22:16 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id fp49YY1788612xT0CsspmixP; Sun, 18 Sep 2022 19:22:16 -0700 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.128]) by mx.groups.io with SMTP id smtpd.web10.15553.1663554135884982038 for ; Sun, 18 Sep 2022 19:22:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PmLDGYdQ/AaEY+aSySsYqDL3h+v9NmfGrfZv44DUKIUorHe6vwFm1KeciUU/OPwHlJ9wH+N+ZOxcWuZ75zVo4H/KG+UR5gx6lIsHzFOXFP464T3BI52YAq41StwwlOeSPrmQ/OTMWqZ/MUWU+zXdWXmCKpzo9QhhPosOCootQnlIURqk0a2Do/aLSf+z+XqH6/bxSwB273qv0BPcngOEnJixxXkvTSNP7J0fxKlgbQ3I06beTdHOwLKayjfPqsSzopTsgl8AN2y5yShIqP7VqTBsEUOLWj/G4MZsHY3W4RuJM6OSxh4J8mDpOuGiwJl2iirCmVOiClnmI4H1uJDlwQ== 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=hkd1Bs0swuA8e6GNYBAeO+Yq55o2z3iajwIVod/ZMKM=; b=elc6Xuc5R3hBvnwd5IQ4gQ6f5QGSbg+X5JV6/er83gvezeW1Yct3KMHBjrwe4c/GvnIKFZuPG+9nnOSKlyhUct1MnKHX0Q1RE9hiz9pa5C9axEoxZROhz7IgU8y8J+3r3oVI0QbHCetzPGf4qmO85VIwJaF43s0l77Svc2/uUxl8m49O2BqUefO0W26SHxhKAAPZOEf/SXhpHO6bvcJoWi/k2VrwMskKq5A+OK1t5q70CEDaqJxFl9B4b3UHnw3fvuU1s+HS9cqdzbjaJfLI8J4jb8O1JqO+tl4BfvZSbwuSvY1Ifckvzdnme7mqUGy4GbgYDDmhxZpzwemmzGeetQ== 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:14 +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:14 +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, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 2/6] ArmPkg: Correct return value of "SMCCC_ARCH_SOC_ID" Function ID call Date: Mon, 19 Sep 2022 09:19:46 +0700 Message-Id: <20220919021950.2110333-3-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: 181a51f5-fec6-4c53-8cd3-08da99e5c40c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 2cUYOl3NvkKk/iCWh3NURDeB7PnUvU/wsjA72iCqEKhq5FucuH5y332FM6vPqmaDIkHRvnsnpwojwswRC6eybmzTWFMlKUXZjCV1GRG/GHcY31FXZhhXZvBTDd9FNaHCu14kGf4J3PnB6cCmH3uZlGKltEKZSFlLqczIKbrxmads1onN/DMA0zQz0lEBtcqkOs/hgQhZVnRXnlCnaQu3tqghFBII2MATf4tZmkXy1w4lLnuAjFPDZJfe6Z09pX7RB33aZdnhntxvaPdTuUEm+A5J7coybPrGDLX/45+MhEo5+onCMvTPX10W0+P2AJxxWsbKmseESJtdGYH0w4hNaOYCtcl3RLwPG/T7mXpgjVqd/AG6QeBfTlbEQiNXXJWkX4HrSxTc37q5NZ8bXOTEI9PEVVul02sPGVFYWqe5o3Isyb248pYh3v2rlw1j0J9o/w0QHZE5fad274p0bPI1hM25a+4r5KhBQvqNMGV6YYmJ6ee55FgniL5Z14c1JIrHWQFbrOzkeQtS44Ezt63tdjtUZEZI7Agn9ogukaeelxRpJ2oVBzh6+JFz/PSUeU3eRe4N+ZNeiUqCP1WdAInZ/09/2RB34RQGAfgEthDod6MgKyyTUMOlnurfV8sTo6r34G37gOnyudrXHCrwqBXMnnlFcuyZtWTZX5LULS3cOlObvAXLe3tEP04SeifMVxP5XYc/rOAOr202yZp4OwaGhYLWl/0u/07aL9jhQEqwLMsuyF7/KJ0TP2IsIzzJsdlrqF38MwRQx+E4lqG0IR+tjw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8h4qfuSoSwhgppE/bHNtYf3cht/skx/SsqnseyL9VpZJtaIeqNt0OO8h2+1o?= =?us-ascii?Q?prnI9l2+0M4NVg2w+sqJu7jpK5Rn0UENZ4lnBSPjJps2jWGUQ/kRMpQ8Tqlw?= =?us-ascii?Q?bThf1UTj1WrnYI2LNd7b9gB9BO5b2Uh44eRIq85bfgHBdP92RcLaOfF5yZBL?= =?us-ascii?Q?Bf/jusBmNHO9iTxe98EvyjgqSY0O/SuigrEVMhC2yUY1h67bRvTObf81dAai?= =?us-ascii?Q?WDLlw1tuezZ/TU+FyV+hV6C2U/aKdYb6evdHji25/InJXAvjecKcmyhjKutu?= =?us-ascii?Q?HJ6wWRKQHd1a8nHkuikPR18Ek28Ifg7gDBSEhchJpkJcPVx8ssDJonD5Cht/?= =?us-ascii?Q?0LdIhkUtBoSVSwpl3Bg5ekwBT0obKWlAosgC10IF92PRrwfhjLl+6nMSKzyF?= =?us-ascii?Q?mTpBEAuXm7yX28gwIjLhnx903bEwh8+SIfe4RRT+EelpckYu7l1TMvILmkQF?= =?us-ascii?Q?01sB1VAR7O1RkTGoYOD3Nfe/iF8XD9870519W8SF2z5AhbXM6Hq+huA8H3Og?= =?us-ascii?Q?Yw00TLn8GytnXzJEtUXYBj8PlW3Q8SCyWzF2xLGpkHE6kGq1U/W+SyPzY0c/?= =?us-ascii?Q?TmlDZtcVbk410+2TXmT4/c+eLIWTbSIKZlXQI7HGWwucRF0zMkCU6xWUc7Mc?= =?us-ascii?Q?HSdslU2D/8z9XqNMgnRqjR00cTUnc1iE/eutg/n6xmjX4sCZr4hR/4mR0jO8?= =?us-ascii?Q?5SSozqHYHuHrstZ8+SvxZN52oLxfcgaUxsL3QyhRrxaxwVHHLlFpq12VDUPF?= =?us-ascii?Q?qr3V/4GO4iGYQXxZ/lofmKN5y3h3f95JINrFgyKhGIvuJsBPwTf7M4uHlW2h?= =?us-ascii?Q?xZRFqNMbUTeeLAKgQWBZgt/dBkiTmmzjBYDCIzqOxsdvG3T2tdE25pud5mMi?= =?us-ascii?Q?8dGLBpbk9reNy7Kr3jDXcIHZdk0aZXYzRUWHK1HGcCgD4IDG9uzLHpUR8geW?= =?us-ascii?Q?56pIirbIIuDuThudtn+iyjnItJuefAJnTE1U2nPlYMRUj88zNqmSfQRUnczq?= =?us-ascii?Q?ecPnqvp4Up7AjJ4kvLaP1/qyNCzoAgjj0SgwbitLIktn/U9m6YF2E6pZxfP3?= =?us-ascii?Q?XmLjIlCEAr/4rpNqsw7pK3/Zi7ROk5DxFR+rHtx+dIVfIU2PMLvy+ZKo+o1j?= =?us-ascii?Q?+V3Fsul6TELKaaA8cAwKM4v61JwkhMvx2ZIXBy+dKdQ1ut4oEIQ8HO3/7R+k?= =?us-ascii?Q?3K9bG2jox9GI4QIvy0JBbc7lO5XGjg82eYtoU4ob8W2gJXYuUGScDGne1J8x?= =?us-ascii?Q?cZuQQiDj4GF3lKDaYBGxy5eL3SBzWTGTNOhrXCi5MriUK5kkurNF8jXok+wz?= =?us-ascii?Q?6Ty44psC721nxddS+6n2+qX5zvH0Mt2VqTaXvfNPxvZqOe5ba9jZMGhVnPsg?= =?us-ascii?Q?y/WLoaTrjY875cCHFlS0pt35Us7kzpu02WF8dJA66WiuVj+v3TbBrTuz6/Ny?= =?us-ascii?Q?9jXHGXEuv7jPMBX+IoNo+HvCtk5bURWbJFxx3PXWFMxP0ox4rJTKpAMMN2aw?= =?us-ascii?Q?UrkKxLvTA62cRQUG+G66rH04GQvO0crqIL4KfhRshUNoDf5cdojhv9EFDfQA?= =?us-ascii?Q?bnO8g8rxDsiBSLs0XW5DDX9zRqLeuDkBw+8IByuZDe6jhb2VGP4uE8bu9T6c?= =?us-ascii?Q?7IGWTcMClilBTRD7oFyVC8o=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 181a51f5-fec6-4c53-8cd3-08da99e5c40c 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:14.4419 (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: rkffBrpNX6P2fy+nZuFcIJqogDKy5ONrCyaRzgE56J7YFPMI6HyIuzgFK8EHW72qzPw2gTPdbcYmrozNp5iOFymEnoo8MZ18yc+U5yysWzg= 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: n3CP04vDxlVvgaSydEAgxF9yx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554136; bh=69yIUC7Tl5IAEEf4Uv7UI8rLdWiPIpvI72A5emHiKwQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=GKSih9IzeeJ8ZRq+E1JPtglgub4kWmxpjEUd93xzPbB5P67VaqsiZdesAYK8B8O3fuw UGAfe+b2mx8h5mAFjDz3VkScIuwfwM+zVrWCWbPVEizyt30usjx8u5fT/qRRfKv2Ybh9h 7jdGK0xO6Sprst2Vmh5jyFf2p76+dM5xq5Q= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554137211100003 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen According to "SMC Calling Convention" specification, section 7.4, return value of Arm Architecture Calls is stored at first argument of SMC aguments (ARM_SMC_ARGS). This value can be negative values indicating error or positive values (including zero) indicating success. Positive value would contain information of respective Function ID (Section 7.3.4 and 7.4.4). For that reason, "SMCCC_VERSION" and "SMCCC_ARCH_FEATURES" Function ID calls read return value from "SmcCallStatus" variable (Args.Arg0 - first argument of SMC call). But "SMCCC_ARCH_SOC_ID" Function ID call is reading return value from "SmcParam" variable (Args.Arg1 - second argument of SMC call) so it leads to unexpected results of "Jep106Code" and "SocRevision". This patch is to correct it. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon.c | = 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorAr= mCommon.c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArm= Common.c index e0010a40e489..b961be213358 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon= .c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/SmbiosProcessorArmCommon= .c @@ -2,7 +2,7 @@ Functions for processor information common to ARM and AARCH64. =20 Copyright (c) 2021, NUVIA Inc. All rights reserved.
- Copyright (c) 2021, Ampere Computing LLC. All rights reserved.
+ Copyright (c) 2021 - 2022, Ampere Computing LLC. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -131,7 +131,7 @@ SmbiosGetSmcArm64SocId ( SmcCallStatus =3D ArmCallSmc1 (SMCCC_ARCH_SOC_ID, &SmcParam, NULL, NULL); =20 if (SmcCallStatus >=3D 0) { - *Jep106Code =3D (INT32)SmcParam; + *Jep106Code =3D SmcCallStatus; } else { Status =3D EFI_UNSUPPORTED; } @@ -140,7 +140,7 @@ SmbiosGetSmcArm64SocId ( SmcCallStatus =3D ArmCallSmc1 (SMCCC_ARCH_SOC_ID, &SmcParam, NULL, NULL); =20 if (SmcCallStatus >=3D 0) { - *SocRevision =3D (INT32)SmcParam; + *SocRevision =3D SmcCallStatus; } else { Status =3D EFI_UNSUPPORTED; } --=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 (#93928): https://edk2.groups.io/g/devel/message/93928 Mute This Topic: https://groups.io/mt/93773959/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 Sun Nov 24 01:26:09 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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40sbJks3Rza20Xsed32g5kKRmwXy0Xh?= =?us-ascii?Q?BJy32GRn4qZniYS4HQD6urj8EVDh3FGu9BLXezj1y7FI8fnb8zKnjBev5ngE?= =?us-ascii?Q?h2TGLPl+pd+40ak3kr1rixKlnJTaHRa3xpb4JdwXVLRezcYPvtx4l98yLypp?= =?us-ascii?Q?OViFFa8fKKWM+XMTM5Qsw1AMNyqTxwLeR3hb+VcDxXOwCyy1P9TbB8h77YU0?= =?us-ascii?Q?eNKJfJvy7bL92gibLNBTK2xpvDVw+k315i9zdhlJ7YqtVTSfLFtfSq0Gdlrr?= =?us-ascii?Q?jE3z354HlfZGKsIoDw3GlWw+Lcn6ieG7e/StP0YnzKsbYuAgrxyoMxpYArjZ?= =?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- From nobody Sun Nov 24 01:26:09 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+93930+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+93930+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 1663554144241861.1089571732066; Sun, 18 Sep 2022 19:22:24 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Th6vYY1788612xwgSAe2sNDd; Sun, 18 Sep 2022 19:22:23 -0700 X-Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.115]) by mx.groups.io with SMTP id smtpd.web08.15783.1663554142862605175 for ; Sun, 18 Sep 2022 19:22:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awgVE2jj1TKavtnd15d+BUWR0bhCkL0nN8rwoLTssnsKwhUJbz3jZOq110+2qYjNU+DfDa8BEdqwfB9yRwR8baokf5TXbJafg9aechDchyiQ6dbvrsWlb6zatH92KVRZ6q92hB5hpWg1HTesz3N2pnm5Arnz6Pad3Z8huMNASamnv9+iU3v5Tu8K2xp+zvWV0+ysn0HQWHtXWnbWZQe4o4KSqKFTBo9LOJ/OoyPLG3AcLf87go0vRJ2QuFkSNCYsFW+Y2I8aa7p9H0UoM2+uj+pCkKb1/BAefzmqZitUwNwOiuZbdeU5kG3F2lZMuTLMzdr9n9e+2bJZqBw8OrkEhQ== 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=b5p694TPCFsbLKp40DGz5z7FuXs/UIACauBLLKUYR94=; b=gcFyvrh2z0I7XQBgjbI9OGQTlmIxQmciIGsNMC4RXtu4hsqVwCkZHF5XmshfeZMXLsOFyRc5L8bUKjGU7V3H8cnCwgMWBIMvI6AmrmcrqWnrW7ngzOjiCLQhQj7dHQaBta4QG3+AF/6kMfmHOX1zg34EgYgwXybFkm2L0s5sFmVuWx2r/8Bz3V6eGyIGrNgr0HIYkWLnlr9go5/ZICvP6RGg5sNK7tMshS3lgCBWu7nZlxyWQsdVbY8plEYA2ET8VdXhxnOM0kTrtJ0OWivXHDly1U720c3xiqhgVKOZojUBvcNwzudsdGTHZJn0AledFtWyFN9sp8eYgQydH7VkJw== 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:20 +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:20 +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, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 4/6] ArmPkg/SmbiosMiscDxe: Fix typo of "AssetTagType02" Date: Mon, 19 Sep 2022 09:19:48 +0700 Message-Id: <20220919021950.2110333-5-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: 38eaf9a4-ad02-41b3-534a-08da99e5c7c4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: daeNYuLZ5YcnPrdrD47d4s2tNPlvYROyRRr/NCVG1qZ26DqGJL+KGbglDNxQxI99p15qjh6dm2E6gfYPG6H/niD/mNF3yep2SdBtUgGzIApnwEb/JlKpV43QbRp1rQ1ByO8izoi8Hiq2SffZs+UlvgknBRt63PxdZeAHwTXzLjY+Fa3a5Jx/TEAeHh5Amc4o3Vo6b0rvmMxlLXQUpnMfBcQXhf8yPE1CrgStMel4N72l4skyRjEDisikUXSzEMREfAqt4znB79pJnCOPIbJY8Lu0v7j/TZbS/ir04p8pzxUUk5E/BpQo3+jEM7UaDZe2HSsB4LHeRqoszKHTxHq31JInYXG2o9H+5pVabKB3H3RQVLk1pVac+1LyMvSUQ0hfq6ERhIzNUsyn9IeCooZIVUW8BAn9Yo0yrk+H8gy5rf5O91PGl6FjkQjYCtl2Pk+uBlKmZk2EBmDfdOuOjIFiDz2NEMxs5N55u8GSWTrXJlaVCC+rT4hH6o3pCsNi45mYVycY+jojViCpgYJ+ofTgIazP0cF0SR0F3AVZQUFRlOx3D0T4UWDVjsS0aG4wky1HW9wv1Ltpzo7k8Rmwk7eX0AdK7LYTuJCxsbK6zscDM+KW8vB/j3vvZDzsW7yDFpOS7HE841Y8hk3aF2XLU1YeFjvERqoUQTEEtWh6PRQBTdSKhe+mOH9+vksH81H0yqlCHF4H2LZuWVO6WUi/VbOyQ8njwVBTrPaHeHa8kpLhxuKtNJulTRrvMzlItLVUSgSvAthvVhmtaHXeGF5dTDa3KA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?N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nSyZvsCk?= =?us-ascii?Q?BmE1TiM0b5su0YtwerdLK+eL0VjUF/2ygGHPS6phJTYLVbEMjW/vQpZUzcJS?= =?us-ascii?Q?EykxE4V6bTte8J7F5w55UYLboLtaYpb5OxaR9JZQX8s7p24EmMG5G6MBDdyU?= =?us-ascii?Q?PHo/KjYvYrM4vX76bl+coJebv+BdULxkSwJmeVa34wG3hPRS0q0yGWwuuHOy?= =?us-ascii?Q?QRKRbGgIeFTMaT2NCk9itccqhijyFd9u1DigVeUj8+MKIhzgkj2fF246RWXO?= =?us-ascii?Q?XVn0slmsKQ9Cim+d0756jSh4dyrmrDSuRTdfc0Grg16w3OBp+NNh9G/8iR9/?= =?us-ascii?Q?/fL4jHJIu3CMb2JZC2jqYrC2hE0uvR4twe8uq1/usjg8GUyUDgSmoVtrUupU?= =?us-ascii?Q?ePghDqqO+s59ymvg9eD+7HC5zBaARgQS8r/arE/oQqENFteff1PBwkSaz2WN?= =?us-ascii?Q?p0vmkkCp87yiGWzhDX31LfBZ0qyrKnGpNqOqR4gF9U4bxQpdPkRvpWpOytVk?= =?us-ascii?Q?n+h14VwyKI4dCxZc5OZLirWQ7NqJi/7FYX/2prgEnRiV3ASF+tcanbSfsPP3?= =?us-ascii?Q?y/AL3Y2X352mTHekFMQ8PyNdNwLnmEqEPYW25i96i9Dhr41eGll8dWXaTLMa?= =?us-ascii?Q?UTSgGxbfQIK1/6hVA5x7lwh4ZJ47t2jtA3wntRS3BC3yJlWV6rTl6clTq/C9?= =?us-ascii?Q?bfAmisEJGJUEg4jrXbZEJ5h7xz8AHQ5Jc5HpqhA3DSLHfpbY9P65Ff/VUqW2?= =?us-ascii?Q?yKmzAB5bNup1ViwAsLfZw6Q=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38eaf9a4-ad02-41b3-534a-08da99e5c7c4 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:20.6782 (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: RqpR2IqTtrtnsFOlwZaVeNQbYg3BZVXqMgLdOQLD2zm5U7OBQt5U3QOPF9TuhfC32+xXqD/dYKdSafeST4ZLHAJ/XG14BBjcdYazUmAunUQ= 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: Swojf5WnI0o3hgekUso4qpH1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554143; bh=GiJ1n0rmw3hw3zZ2h2Lq7+kSt3CKuJZpseMecIOtQBM=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=IXZPLX3J5pIVZBXpN6hSxr2P62rH6piy0DkoQZH6OzvTiMMVh4WhYDV6jtu5cLV5AUl 7/jmJyliKirxH5YaVxoHgI03ZaC1MUuhBVKKiB57CrcXsisi/k7WnD7jBO2cyi/7SIOeo +FKU5iSe+Ndy9Su5qUPyjwjP0L6L7KVGWbc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554145249100001 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen This patch fixes typo from "AssertTagType02" to "AssetTagType02". Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Include/Library/OemMiscLib.h = | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunc= tion.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index d87737db9c2b..1936619d9b5b 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -44,7 +44,7 @@ typedef enum { VersionType01, SkuNumberType01, FamilyType01, - AssertTagType02, + AssetTagType02, SerialNumberType02, BoardManufacturerType02, ProductNameType02, diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManu= facturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseB= oardManufacturerFunction.c index 870610b17243..f61546955f12 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.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) 2009 - 2011, Intel Corporation. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved.
@@ -112,7 +113,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) { OemUpdateSmbiosInfo ( mSmbiosMiscHiiHandle, STRING_TOKEN (STR_MISC_BASE_BOARD_ASSET_TAG), - AssertTagType02 + AssetTagType02 ); OemUpdateSmbiosInfo ( mSmbiosMiscHiiHandle, --=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 (#93930): https://edk2.groups.io/g/devel/message/93930 Mute This Topic: https://groups.io/mt/93773965/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 Sun Nov 24 01:26:09 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+93931+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+93931+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 1663554146874648.7535062025078; Sun, 18 Sep 2022 19:22:26 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nwicYY1788612xDTz5bIWO2P; Sun, 18 Sep 2022 19:22:26 -0700 X-Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.107.96.106]) by mx.groups.io with SMTP id smtpd.web12.15623.1663554145772416107 for ; Sun, 18 Sep 2022 19:22:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hp/G0N5f1eLdBc61ITkmyrVfRrI+HgiUoJwXfJjxzctFAESOktNKfBjoUT7crVx+G7q6DKnj9EZqmlFXJm/b6BSJCIjXQjNBv2Rz1PbPaXBwTgiwh+Q9bEZ3XrH97VOczaa3SbGDB0RFwkTN/Tbb1CSPRsFDLa3du0VhcBbFSAtPsF1UrMAuQlHWIw8fymZh+XqJTAuaUSSQ8lkADe1JO5TZHtik/5mczqsg8tBYVH3XnM2rGps66iQ5vcM0JnHiADiafp5ugCJbPuIW5+zRelB2xz6tz3xP5RClhieTXwey93dRFhS36Ot6r+8+uW8UcckVfa9dmX9/B18WrPELVQ== 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=yTC3rean+q3TcATb7LhRF0j98b0J8FoWUlut0N5HV6M=; b=DtsiIPDz6YqtX7qc1swECwLLUOK06DHYAHAc672QXNNobDnVcOnds4xkzSw7lClNzxCrVdGtp2jPuK2gTn4bnQF9IyYhr5ArccZjHD7j6H9WBwCEfN6d49rENCE0aK5KJpm9Bbls6PfZ4I+FtbmkbhVfW0LNEiygyqrSMwFst7Z3A0l3H+XvpDh0a/ZSwrdkMCZQHwQm6agk7Y92lv9YACnzJNYK31tE/ul85+z0Wzix5cYf7RVm9DZPBHiU5rwhGp9T9WEi+XSvbKOCJ/ipCaI+f3W6XFAxy3sH73A6GUffQUDCnwgexzhdeCp32YyI0ONFjq6DO1IFz99F8HIytw== 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:24 +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:24 +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, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 5/6] ArmPkg/SmbiosMiscDxe: Remove redundant updates in SMBIOS Type 2 Date: Mon, 19 Sep 2022 09:19:49 +0700 Message-Id: <20220919021950.2110333-6-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: 7fa1c80d-592e-4069-8fce-08da99e5c9af X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: iVqedU34K0+bJsd6DTZaGad8RECCuUnBdSyJulGmGs2Ohlf4sTHcj8C9g4uYdFujL8oPZPGgs7IB694+dV91mYkd/OqCucUxTw+MCvfypXQJtc7cLwwcLP8rONAaD7Xasoxi+IzbHSJFpn4XpPzFFCTNVNtoZHUF4GMGhYFIKrhN63PD5+gGmZ/n2lqyGwDh2t/zDAQuQD4vhfRamAWPeq7fHBSiOid87JxHua/smmB9nzO4PtFp1DK6dfzVI4W2Fl49/36UYoMpXSjI1qFJfve5fTsXdoHimL23l8dHixrRu5L9O209MDl+kvoKexlMS5lnc7gfcV3vpLmOc1aDBanO/zab0P/og6hTPBVqK5N5pIHwjvH7bAMc0/1ekaxw3tBsRH1TRIG6UShwOZJPy9qWWoqxDnUHTs8ebRqaJ4N+JbIepV6qazmDw1nLVpfaNrJxjD0q74teNSF08uT4iZ8ydkv0I/69s/jbxlsy9Kf2BB5Z8dxZHDjqSFTyugFM3WZ01ORTVp5KYV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Gbz5GgsM6Ux6OO27NE?= =?us-ascii?Q?GzO+k/1Koz966xpZuyI0lkZ8BZOu89Dyiz94s5Y2GfnQA2XG+2Vulz1swcUx?= =?us-ascii?Q?NmYjTxdYXDKdZ4S14VzWua8rpZzYxL1BnIXkr5OO+/dWC7AEbnC5KCwPmap4?= =?us-ascii?Q?Na0ccDpZ2mqYue5lSnW3EGA=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7fa1c80d-592e-4069-8fce-08da99e5c9af 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:23.9301 (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: 6e6r5FWfbcEw10GYly5f75OD53MnzWKgBBqt8fIQ/2AW8nl8IoHWb8KNyYnluzeOiTxvQgqWCMHIsjo5LOay6NYtvqmI4LJg19Zazyd4TBI= 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: OiNR4MysybZL92hmK7Zv4KFAx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554146; bh=seH/G9MuryEaUTb+vUU4bWqq9FkY6ljYB6BYds1x1WI=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=weTMDC93NmxU8HeDr58Jtvh1PXvGIu8P0xP1DqjlVKWRbDJo+/wfRAg29t1lsk1fk9h eTQJC8akIZqosTObpuEgzTA8xFQP4UGYztX4tl/UEQ+j8xr9CdGsfTOOSHQPiabF4E4AJ Zuj8kP8acw4Ha42IsK3h6CnotUgI7YrE+Ok= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554147245100005 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen This patch removes redundant updates of "BoardManufacturerType02" and "SerialNumberType02". Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel Acked-by: Leif Lindholm --- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunc= tion.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManu= facturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseB= oardManufacturerFunction.c index f61546955f12..3441e7798860 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.c @@ -120,16 +120,6 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer)= { STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER), SerialNumberType02 ); - OemUpdateSmbiosInfo ( - mSmbiosMiscHiiHandle, - STRING_TOKEN (STR_MISC_BASE_BOARD_MANUFACTURER), - BoardManufacturerType02 - ); - OemUpdateSmbiosInfo ( - mSmbiosMiscHiiHandle, - STRING_TOKEN (STR_MISC_BASE_BOARD_SERIAL_NUMBER), - SerialNumberType02 - ); OemUpdateSmbiosInfo ( mSmbiosMiscHiiHandle, STRING_TOKEN (STR_MISC_BASE_BOARD_SKU_NUMBER), --=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 (#93931): https://edk2.groups.io/g/devel/message/93931 Mute This Topic: https://groups.io/mt/93773966/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 Sun Nov 24 01:26:09 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+93932+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+93932+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 1663554150891806.4504836106669; Sun, 18 Sep 2022 19:22:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id PVGqYY1788612xyFuUtoYHVQ; Sun, 18 Sep 2022 19:22:30 -0700 X-Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.117]) by mx.groups.io with SMTP id smtpd.web11.15634.1663554149503314356 for ; Sun, 18 Sep 2022 19:22:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hvcXoDSFYm1XCtIMyaJgOgF350Fpb8L7cLdH524Rvpmi7Tux4OKkmPwR8muuo5yR7S5IoU9apXLYgYa+R2qZk8pVudv8+xpoRr9UgKseMqANEmB5j0BJgxb3t1peg+QZIqarmlKhEn4D5fWYz1hVeD3ffx7PO/JQZH842V6OUG2fPfruvDzXmpTkzKVKle2lAZjv9ky8CXb961+KpPcjruX/5DfmbDRczOtxmLf+c7HH+XzZDb9lGDm4mTRzawhegg/Oz2kwvvt0Fnm4iyVuowi7BOkT8Kz57uK8Z4G6q7dqJo9EilUlq3YpL7UqkmjL9zMJXjSPr2vi4UG8iePG5A== 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=rxFp5F6wcddgQ77hT2EmOauK4rAynwNSUMyflRNyZas=; b=hcGjNpVUiw+IPLmWppRJ0d6KVccbPC/VOS0cC+MQP96Wv0+0DLtsmsFSK0WY9p9vHXl+9u0gWoNgJXHHvwvud8HV1MIq3G8Eo//Q6kmJ+2oL58FOf6Ll3WGk+a4GRKWugaHebzp8knVlzTeY0xo4688YZUAfwv6sjLxpZth3C0kQnToAOqmlDTddNVAiV8hZm9JNGmiJ98JcAHYCbj5QwyCB+yRhlF9PKvI3QC7AM7EoEm71bf4d9u+nJv/i0ULzx0MHrWbJ8ZxmOsTENVbZ/1LLV0DCTZ2pSYP/pWm7NY7UjS0N09Z3E4WiVo//VdGusUrDWp/F0KRx0qx8O7UroQ== 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:27 +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:27 +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, Minh Nguyen , Nhi Pham , Rebecca Cran , Ard Biesheuvel Subject: [edk2-devel] [PATCH v4 6/6] ArmPkg/SmbiosMiscDxe: Get SMBIOS information from OemMiscLib Date: Mon, 19 Sep 2022 09:19:50 +0700 Message-Id: <20220919021950.2110333-7-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: ebef48fb-ba08-411f-61aa-08da99e5cb9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: hjkHOZv+Ud7c+DqIXhLIYVbBGh+FnQ4WY78Th6JFK5M+cGBThXjVRFapmxARTkmbsgjIqV6LaZGZyio8iBE0cda4IdlF2nOFR7Ef/K/bLFyBOrCLmVH+c9aYHSZEYzwmpJvN51vxZxrKnjLNcpR1ceN09OQNLPsr2rhiraE2ncWxUOQgOsk61x2sZVXxasn5+icSNjQSzjsdC68kreYsXazZWUtX5LGvwK+UIHu6pRo8fZWBSKl7TtNqUEyl4nJJA80RYR/wzzhl6lPGmEy87MiAlNPXt+vZUibEpJla7qLu9ERoKV09DgSGJCbefYiznVIUZzNqxcCLpIEpw5r9XlNeGt1IfAgKdxH+L/ioQL3rw3kT4AbVN17BNToqNMkA9FK9e5C8SkXAGyQnaAt59seNrpLItkRGFdP5RHn8pjMGogtvcZ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m9UgCGYZzm2zD13Ln3vKG4ABdk2smimVzSRh1swNlESEtZjxJOd1DdO3B0Ir?= =?us-ascii?Q?wfRsTwANr+Otlss699Si99fZXYBN2f/tKEDKMGBbrXzA+Jr/DarwvDJ3y3Zl?= =?us-ascii?Q?gqBmX477tNSoxJR4wK5KLMO33Dw3j72/ZJy/5qNjfVV6tTc/s+r8Wrh7MSBu?= =?us-ascii?Q?4sqWIIqG1wZ1L1F5I1bRPYcEIBNudF+pFQMQElciP7p+g54aIX5f7IoZ6F5j?= =?us-ascii?Q?LCcSuK9FY6wEcyJ3/a+fStA=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebef48fb-ba08-411f-61aa-08da99e5cb9d 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:27.1339 (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: dYjU3B52+Vu8txboUNVI9qXk8vBA3fbtkfLbetVpn9pMRFi0SwznfSbbSUan/C7jKLdpDJALIY+1k0tOSPiJ8q1sUnsGBwj8BZ+8v6nH6rs= 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: D1LNc3NydPl8UZoWPW3aWL6Sx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1663554150; bh=uwXHBtP5mt7EOssAJLI7YcQA/BCrO+DEZwyGdohMcC4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=j8XA1J0eCaSXidOdbOJVOCNDgzxgNNLt54hDCh7A+MVMZQLDl/YMJg76aAZ6C3gpO4G nZHlyOnUVgoG7Y9BVRx10QHT/4N6Bg9majROzWk25sY1IMeEhCYvwYR7RC7Z52NRCFQHY CeBg7CmpA1FZrCPVeLjND/zDngYVEsnNAig= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1663554151286100001 Content-Type: text/plain; charset="utf-8" From: Minh Nguyen In some scenarios, the information of Bios Version, Bios Release and Embedded Controller Firmware Release are fetched during UEFI booting. This patch supports updating those fields dynamically when the PCDs are empty. Signed-off-by: Nhi Pham Reviewed-by: Rebecca Cran Reviewed-by: Sami Mujawar Acked-by: Ard Biesheuvel --- ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf | 5= ++++ ArmPkg/Include/Library/OemMiscLib.h | 21= ++++++++++++++ ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c | 29= ++++++++++++++++++++ ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c | 22= +++++++-------- 4 files changed, 66 insertions(+), 11 deletions(-) diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf b/Ar= mPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf index 8653f57720d1..7286ed61142a 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLibNull.inf @@ -30,6 +30,11 @@ [Packages] [LibraryClasses] BaseMemoryLib DebugLib + PcdLib =20 [Guids] gZeroGuid + +[Pcd] + gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease + gArmTokenSpaceGuid.PcdSystemBiosRelease diff --git a/ArmPkg/Include/Library/OemMiscLib.h b/ArmPkg/Include/Library/O= emMiscLib.h index 1936619d9b5b..541274999e5c 100644 --- a/ArmPkg/Include/Library/OemMiscLib.h +++ b/ArmPkg/Include/Library/OemMiscLib.h @@ -37,6 +37,7 @@ typedef struct { } OEM_MISC_PROCESSOR_DATA; =20 typedef enum { + BiosVersionType00, ProductNameType01, SerialNumType01, UuidType01, @@ -247,4 +248,24 @@ OemGetSystemUuid ( OUT GUID *SystemUuid ); =20 +/** Fetches the BIOS release. + + @return The BIOS release. +**/ +UINT16 +EFIAPI +OemGetBiosRelease ( + VOID + ); + +/** Fetches the embedded controller firmware release. + + @return The embedded controller firmware release. +**/ +UINT16 +EFIAPI +OemGetEmbeddedControllerFirmwareRelease ( + VOID + ); + #endif // OEM_MISC_LIB_H_ diff --git a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c b/ArmPkg/U= niversal/Smbios/OemMiscLibNull/OemMiscLib.c index 32f6d55c1a9a..a5d635da9e11 100644 --- a/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c +++ b/ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c @@ -16,6 +16,7 @@ #include #include #include +#include =20 /** Gets the CPU frequency of the specified processor. =20 @@ -254,3 +255,31 @@ OemGetSystemUuid ( ASSERT (FALSE); CopyGuid (SystemUuid, &gZeroGuid); } + +/** Fetches the BIOS release. + + @return The BIOS release. +**/ +UINT16 +EFIAPI +OemGetBiosRelease ( + VOID + ) +{ + ASSERT (FALSE); + return PcdGet16 (PcdSystemBiosRelease); +} + +/** Fetches the embedded controller firmware release. + + @return The embedded controller firmware release. +**/ +UINT16 +EFIAPI +OemGetEmbeddedControllerFirmwareRelease ( + VOID + ) +{ + ASSERT (FALSE); + return PcdGet16 (PcdEmbeddedControllerFirmwareRelease); +} diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFun= ction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFuncti= on.c index b49c4b754cab..e1310f331009 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c @@ -1,5 +1,6 @@ /** @file =20 + Copyright (c) 2022, Ampere Computing LLC. All rights reserved.
Copyright (c) 2021, NUVIA Inc. All rights reserved.
Copyright (c) 2009, Intel Corporation. All rights reserved.
Copyright (c) 2015, Hisilicon Limited. All rights reserved.
@@ -13,6 +14,7 @@ #include #include #include +#include #include #include =20 @@ -191,11 +193,11 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { TokenToUpdate =3D STRING_TOKEN (STR_MISC_BIOS_VERSION); HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL); } else { - Version =3D (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString); - if (StrLen (Version) > 0) { - TokenToUpdate =3D STRING_TOKEN (STR_MISC_BIOS_VERSION); - HiiSetString (mSmbiosMiscHiiHandle, TokenToUpdate, Version, NULL); - } + OemUpdateSmbiosInfo ( + mSmbiosMiscHiiHandle, + STRING_TOKEN (STR_MISC_BIOS_VERSION), + BiosVersionType00 + ); } =20 Char16String =3D GetBiosReleaseDate (); @@ -251,13 +253,11 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { } } =20 - SmbiosRecord->SystemBiosMajorRelease =3D (UINT8)(PcdGet16 (PcdSystemBios= Release) >> 8); - SmbiosRecord->SystemBiosMinorRelease =3D (UINT8)(PcdGet16 (PcdSystemBios= Release) & 0xFF); + SmbiosRecord->SystemBiosMajorRelease =3D (UINT8)(OemGetBiosRelease () >>= 8); + SmbiosRecord->SystemBiosMinorRelease =3D (UINT8)(OemGetBiosRelease () & = 0xFF); =20 - SmbiosRecord->EmbeddedControllerFirmwareMajorRelease =3D (UINT16) - (PcdGet16 (PcdEmb= eddedControllerFirmwareRelease) >> 8); - SmbiosRecord->EmbeddedControllerFirmwareMinorRelease =3D (UINT16) - (PcdGet16 (PcdEmb= eddedControllerFirmwareRelease) & 0xFF); + SmbiosRecord->EmbeddedControllerFirmwareMajorRelease =3D (UINT16)(OemGet= EmbeddedControllerFirmwareRelease () >> 8); + SmbiosRecord->EmbeddedControllerFirmwareMinorRelease =3D (UINT16)(OemGet= EmbeddedControllerFirmwareRelease () & 0xFF); =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); UnicodeStrToAsciiStrS (Vendor, OptionalStrStart, VendorStrLen + 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 (#93932): https://edk2.groups.io/g/devel/message/93932 Mute This Topic: https://groups.io/mt/93773967/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-