From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (NAM04-BN8-obe.outbound.protection.outlook.com [40.107.100.122]) by mx.groups.io with SMTP id smtpd.web11.15623.1663554087288046901 for ; Sun, 18 Sep 2022 19:21:28 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@os.amperecomputing.com header.s=selector2 header.b=vmFs2vwI; spf=pass (domain: os.amperecomputing.com, ip: 40.107.100.122, mailfrom: nhi@os.amperecomputing.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+5OuFyHqIpNyFoGyDJ1MUxdbrZzTfEBBYwODcoIiGThNZExYMdyWlBpBi7LMNnnzuYiiwjWlzv+65o3lI5t76X9x0cLYKTUtWie2qGxV7fMJ2qxKA8Xiip7m/08QzFyhrSxMG3qWLmpGpm7ZgvixXEXWrfTwV8o6Mw7SR9oZwcrI0IDcu70nv58lRFRv3T04ka2DkRrAr/9K56gzS4DNZMiXWhEGJGAI/KopiQHWK1RKwDJNo9+2iYq4Q9nV8YNsHeseIE53h3fgVIj4FcKJvip+QKOOgh5yoUFmn5ACj7L3PhuuLSin2v4EYelUFawdEn7jc1ChPGMmgGA65UF6Q== 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=3fc6qUPQ3ndXk7g7X0iThHcL3xBWoWw0ABYYtoNUhuc=; b=WzAu0U3Z8Iep44giH+N0h5OnNJWg9I+9k6G1LBfyDOZIn/pOGsaMSdvxFUV8D2YzqwhSPgf4FkvKBdUPBx9ewAXozvsfMk1h+D3xjColTTz48oQZ9GmNi66jLzQZqnmNakvSlhc1dBvUG5OuCMspD8bF1ctlXe0MJb00Hgz1ql0tUGiMENPpYWVlNtwwVIaD1U4B/TBEHbGc2oO2qJh4fSraZFyOg4h94O+0PCdTNWDp9XLbHNXUjWL+H13ZcdOVqbuY+V9YkvGUKqxi9sM/2Rytz6CgO+GVbIvKbdnLEsM+O7s4vDpNPixQAt0QB6wYIj2bl7dWAHwJ89Iphb4BmA== 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=3fc6qUPQ3ndXk7g7X0iThHcL3xBWoWw0ABYYtoNUhuc=; b=vmFs2vwI6om3TmnGu+BkfWx++QtLip7heSebSX/4sArXNGeMbE7ZenrphV34lLFNPBBgPms826FLxhlNEWLEkUWrf4skXeE0+DIjTjFeJFU/FTdanZLqf7n83uimPQWs2CTpXXvsand2Djutq+ujZdR6xm5bdxY3bHhGTbsKiBI= 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 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:21:25 +0000 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:21:25 +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: [edk2-platforms][PATCH v2 1/2] SbsaQemu/OemMiscLib: Update for new OemMiscLib APIs Date: Mon, 19 Sep 2022 09:19:03 +0700 Message-ID: <20220919021904.2110188-2-nhi@os.amperecomputing.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220919021904.2110188-1-nhi@os.amperecomputing.com> References: <20220919021904.2110188-1-nhi@os.amperecomputing.com> X-ClientProxiedBy: SG2P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::18) 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-TrafficTypeDiagnostic: PH0PR01MB7287:EE_|CO1PR01MB6791:EE_ X-MS-Office365-Filtering-Correlation-Id: da65e9e0-9a22-4ab7-f6d5-08da99e5a6a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: v2WC4UXzIVXF0aRyxpLL2frkzm1ebrau0hnoEgpGSEta2OXa3xDrFZV5Ae6lPrbvHOXoOvrej0FeWMfmRToLkwZzYi407IyYpMyIv9c8rmpZC7Gi4+Sgxy2t9xnDHtiI7wSBTI4K92cQzpWcvES150vT3pbXeZ4AUMmkxIacXoSYchOjwJhAzvcbJ6FGg1r2wjpa2SnYgr4m/E7QMgeL5eR+X0/HK/YAC1KICN30+xnMGuj+Z6BzAol/92mYcBWxDH3hUwb8iGZdSKoLv0Xo2U1ydz7caWmoHEu4M+PUeHD5rFBbbeBY+hgPVReEAftpzQANvqny4dyFIL0e5ovlJ2sAHY1mardJSv+vTDNpocaeORwm/kq3855YdjLBxl0xKspo1ffiw/fmvoT4k+zU6Br6pqCXXVJn8AggDBOySGElzT/t6tpEjb9xfCPfcvgEFqRpXVekjpBI5fRDjtuq5EPbsIF+riOSTka3OsKVRsZ/66CQrBmE+uKqefrIqHcBJE2u8Uu0xlOz1oqvvuNyPp1ucI+FvXYXHi3fVwTNDz6qwTNStwukX08Y0prCvov9gPxRhmLn+f+PSGwGVT24Gj4nlU8jvttfABjFCDOUT00n3T8fquX+Ld+PdosRC0abf5SEMHjmIg12BIOx3dYliYhEiE4ysukKWRcsrWVunvbE3IeKm/v1JJlxeFgtFlKn0Esnc619omdxVLX1wOfvvGqrQI3gziyjI1Vt0wmLB1F6VS40SybAcRq3CUNc/FKW017OI1vP4/0+MBK4MxvrsQ== 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:(13230022)(4636009)(366004)(136003)(346002)(39840400004)(376002)(396003)(451199015)(66946007)(5660300002)(8676002)(4326008)(66556008)(66476007)(8936002)(86362001)(316002)(38100700002)(38350700002)(107886003)(6666004)(41300700001)(52116002)(6486002)(6506007)(478600001)(2616005)(186003)(1076003)(6512007)(26005)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qfKeVoAaQpf5xQa3FNcfUOXIgS3N9G70gsQbyghe+D33NOZ/LoEls/o77WrN?= =?us-ascii?Q?vEVyoABtbOrp50Hb6ZHNfGObhgu8Ob/pw2EOANXk7E1NSG+hmuJipaVGGTbo?= =?us-ascii?Q?uJpvzwM8TBEAHpMxL781XmeHzNvQHWEt+HWKmQ9MdWKXDIEAbUyqhaJbxc8Q?= =?us-ascii?Q?Q7q2Q34gJxSm4D+RhQAgne6+xAXJKxtX3dq6qhQpgzMRcUbllH7hapSjWDyC?= =?us-ascii?Q?FbMlpmAJMNlBQjNyub9l1WZ7A0CfE2Jz4Oz/qP0wLZP8At5lURW4gL7TAfJ9?= =?us-ascii?Q?uQTi1PoGaxbehqLtabZE22ftRraDHTmF6NP935VM2N6hJU0RgfD+mKCEKHj+?= =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3luClP1DGRsbQcpMm5cdicCCVQIlm?= =?us-ascii?Q?uXKLGJt03//mRQ5H/Ecp5K9gjyCxI9DCDtZ0LuDbMh9e85c7L+plcV+xI6zk?= =?us-ascii?Q?LD/3a8lBpugx6t1qpJRZLaRObWmBrz2IDWmZVZZxol0j0ZhGMS2XPnpIDXC3?= =?us-ascii?Q?vu6s/78SgTZzOn3hVQxOxT7twcXxsXY9IUA+1ZRc9Vk4dl/qDHZesbKMqkNn?= =?us-ascii?Q?gdomjyWh5XtlU5BGPhNjjQJ2s4TBCCIu58GM0PT7GB1mjVDKw1KGeokuA8Zh?= =?us-ascii?Q?Dqn/QQm7Y7kz8P7WPBPhx2yl7qNv0Gg9+u68ASzLoCVfaHseioKIkLnYMJB2?= =?us-ascii?Q?wcCpuh+ApidO8T9jow22XDm00wDNp0MGkszzeS1NGLs6rmY5A88gRLh4iltA?= =?us-ascii?Q?gZtkXpgHdSiXr2ArY/YXbyA=3D?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: da65e9e0-9a22-4ab7-f6d5-08da99e5a6a3 X-MS-Exchange-CrossTenant-AuthSource: PH0PR01MB7287.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2022 02:21:25.1325 (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: jDu4Fzb47moFs0TrmoFXJzeDDS9gw/L1uVwJDDFLUCYDq5/dLiViclTHv7TiNSt1nXqs3G+UFcNd4VBKt2y0Mt2o4bE7of+c0sj8l+UIzyM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR01MB6791 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This is to reflect the new APIs added to edk2/OemMiscLib library. Signed-off-by: Nhi Pham --- Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf | 5 +++ Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c | 42 ++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf b/Platform/Qe= mu/SbsaQemu/OemMiscLib/OemMiscLib.inf index 04a07a55cee9..a34f54d431d4 100644 --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf @@ -34,7 +34,12 @@ [LibraryClasses] IoLib PcdLib =20 +[Guids] + gZeroGuid + [Pcd] + gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease + gArmTokenSpaceGuid.PcdSystemBiosRelease gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress =20 gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSystemManufacturer diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c b/Platform/Qemu= /SbsaQemu/OemMiscLib/OemMiscLib.c index 326bb56bcfa3..3ccf22bf282d 100644 --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c @@ -9,6 +9,7 @@ **/ =20 #include +#include #include #include #include @@ -330,3 +331,44 @@ OemGetChassisNumPowerCords ( { 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 + ) +{ + CopyGuid (SystemUuid, &gZeroGuid); +} + +/** Fetches the BIOS release. + + @return The BIOS release. +**/ +UINT16 +EFIAPI +OemGetBiosRelease ( + VOID + ) +{ + return PcdGet16 (PcdSystemBiosRelease); +} + +/** Fetches the embedded controller firmware release. + + @return The embedded controller firmware release. +**/ +UINT16 +EFIAPI +OemGetEmbeddedControllerFirmwareRelease ( + VOID + ) +{ + return PcdGet16 (PcdEmbeddedControllerFirmwareRelease); +} --=20 2.25.1