From nobody Fri May 17 04:49:44 2024 Delivered-To: importer@patchew.org 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+112991+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 1703796451231926.2460202551326; Thu, 28 Dec 2023 12:47:31 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=57r2GbpeSdVXN2F1QDBF134OWRE6yBhVySXJPsyMm0o=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1703796450; v=1; b=DFadufIGbELrDNZmecz6Qvr+UmpOxSOf7I9/li3RsFlYyKoUu01X00vHywS9HNGIBOefdZLR 1mxwt0+hzQBUJ44IGkedulJp3bGfiIEFXcC5NbN4c5FvEOS47F2Iykq7p7Xmr9uvYjW5sdn3Xvt cp43d5ssNCc/Owyr2SO9CPHE= X-Received: by 127.0.0.2 with SMTP id HzUiYY1788612xEofnzPju47; Thu, 28 Dec 2023 12:47:30 -0800 X-Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.79]) by mx.groups.io with SMTP id smtpd.web11.131661.1703796450195263590 for ; Thu, 28 Dec 2023 12:47:30 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WOBEmD083ASrc0mODaJYDnbI45y89lxnYNrDl4LLD6VvfYyxgozbX3+VGz5dbmh08uQd3+4Xtb7OlPzzkl1lWdl18aQs5U1bZsEXF8r8k6QtZaVBOAoREpKf/tBO+4vg9rsn9ZxKQ0Ulm8HORL9pjSpDSYWaC1RZGKembY0jgQM+AL1lSdKfuyA1L8s85AcBIOApkAWjipekoHH47+/jIiu02oTYIfZVAQtekRCmwXUcBI11GiDL1ZYYfsgZ3o7U8XKdkRBgYRRNK5OBWeRF90tFDg5DPY2v17BihRPxq1zzT1UX1r9VGtbXZsd0Y7HjXsAC8rTt/cuAICPgvhwviQ== 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=bPbqR+objVw/teB3/oyJAnwrl6l9aKar2Ot3Zp9NHQE=; b=cvNBZcTb0QCsgHjvrvM4reG+bt/9c1FL4yzTphwLC+eqBJia0UWNgypRPAsNhsxaqnYwcai/Jwdl4tXHFQAx0JqCfFfuqTYWd7vSofkDTpvYH3gIIVpufUpQF/2ejhVkE59YpqXNrmDkvZ9xyjrzJmv4DDR4UKvkrP/qlDlf79hixHJjty7LwTyMAf4KI+rDvoChynHj9GUIhqCKmwVKvbE7IUztsgvJ252q9V8HuK1oUD5zr+LZdgf3YD68ZjFKeGmhmoTmThGOmdtwCIzUKNkk2alVzlXuOUhXrGq6xZGVmiHUdUejuvF5hfl1aW4tFP0cDTinIhKsczqrQYgEMA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from SN6PR08CA0010.namprd08.prod.outlook.com (2603:10b6:805:66::23) by MW3PR12MB4506.namprd12.prod.outlook.com (2603:10b6:303:53::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Thu, 28 Dec 2023 20:47:27 +0000 X-Received: from SA2PEPF00001508.namprd04.prod.outlook.com (2603:10b6:805:66:cafe::96) by SN6PR08CA0010.outlook.office365.com (2603:10b6:805:66::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27 via Frontend Transport; Thu, 28 Dec 2023 20:47:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; 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+112991+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.160) by SA2PEPF00001508.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 20:47:27 +0000 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:12 -0800 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:12 -0800 X-Received: from cad98f4d2e3d.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Thu, 28 Dec 2023 12:47:12 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH v2 1/3] EmbeddedPkg/PrePiMemoryAllocationLib: Add ReallocatePool Date: Thu, 28 Dec 2023 12:47:06 -0800 Message-ID: <824c8fc0358b7c0823d4d35de5bfe7440f09c84c.1703796256.git.jbrasen@nvidia.com> In-Reply-To: References: MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001508:EE_|MW3PR12MB4506:EE_ X-MS-Office365-Filtering-Correlation-Id: b0e4301a-9575-4aa6-823e-08dc07e633d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: t0FNf1LCIx2E+egMTWixNh21pcCDB4i8qvmD2bqqZVFsoP5hbC1W39vil9mvuFa6P6dA0v1bLB8GP44lvAFUgyaU15xU2CoDk5B7JvhZpoj2+pWDQn/wHIhMXqttFcROcSYntQjiFHJTxsBN2htULIRKpp08mTrzvuybeHaf5DFkI6W4DaUbjYH4IhBp/xnTIjPipfFEl9zoQ484WkNWEmLLVbMoqwpggGGI3Zi7fERXxf2vpEwRYevE//6qIiaJqMwQy5O80w8TqNjHgU1z4HeknbA2VMkwh2VIOFZU0Jy3hODmwpJeabqXb7I89vYdBMicOD5B3m0HEUQ7xFobZY8XHRtqtuPd3oyB6O8AoT/y+/mLX1iD6nx2NvSAzeb3s5RInSr+y4c2qsAW7GeVKIKeRdAPODyAOMdI902AGoZsc0MBan2X4UtHldJxz/jSZlA9/cVktL3YS9aMAh5ueX4BHiM+uJY24T1/YWaHI0xZAo0nTpBNX1D13T1KCSWP7i4xpR3eYdqb3rAWACnvKOcK+Ez8VmrnukeXzwu12EwvXE2AA6UPkruLRcYaCypxGEc4i1GA9c7i8/EB/J5oTShp+vw5JObjwXzov2aiKKv3S7y7G0AgyYhmpXoNc12OP4IINcMotwqEaNf/dxMnOryTGkFNuuKL0FmqbsCJecY4EmnI82SxIABAocsIB52ILrbw1p2UH+hAryFjJidPBcBqvh4WHnhdfPn3SOS5jPR8Xhu3gxkAg5Y5mZoIYQLg X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 20:47:27.1930 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0e4301a-9575-4aa6-823e-08dc07e633d6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4506 Precedence: Bulk 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,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 1G9iRlF4RhwUBotdsZ6L1g24x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703796451556100001 Content-Type: text/plain; charset="utf-8" Add implementation of ReallocatePool which is defined in the MemoryAllocationLib header file to allow components to not need special handling for PrePi module types. Signed-off-by: Jeff Brasen --- .../MemoryAllocationLib.c | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationL= ib.c b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c index 08a0add340cf..fa81cc9d595a 100644 --- a/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c +++ b/EmbeddedPkg/Library/PrePiMemoryAllocationLib/MemoryAllocationLib.c @@ -269,3 +269,60 @@ FreePool ( { // Not implemented yet } + +/** + Reallocates a buffer of type EfiBootServicesData. + + Allocates and zeros the number bytes specified by NewSize from memory of= type + EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldS= ize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, a= nd + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there i= s not + enough memory remaining to satisfy the request, then NULL is returned. + + If the allocation of the new buffer is successful and the smaller of New= Size and OldSize + is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). + + @param OldSize The size, in bytes, of OldBuffer. + @param NewSize The size, in bytes, of the buffer to reallocate. + @param OldBuffer The buffer to copy to the allocated buffer. This= is an optional + parameter that may be NULL. + + @return A pointer to the allocated buffer or NULL if allocation fails. + +**/ +VOID * +EFIAPI +ReallocatePool ( + IN UINTN OldSize, + IN UINTN NewSize, + IN VOID *OldBuffer OPTIONAL + ) +{ + VOID *NewBuffer; + + // Validate the OldBuffer is HobAllocated. + DEBUG_CODE_BEGIN (); + EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; + + if (OldBuffer !=3D NULL) { + HandOffHob =3D GetHobList (); + ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)OldBuffer >=3D HandOffHob->EfiMe= moryBottom)); + ASSERT (((EFI_PHYSICAL_ADDRESS)(UINTN)(OldBuffer + OldSize) <=3D HandO= ffHob->EfiFreeMemoryBottom)); + } + + DEBUG_CODE_END (); + + // If new buffer would be smaller just return old buffer as FreePool isn= 't supported. + if ((OldBuffer !=3D NULL) && (OldSize >=3D NewSize)) { + return OldBuffer; + } + + NewBuffer =3D AllocateZeroPool (NewSize); + if ((NewBuffer !=3D NULL) && (OldBuffer !=3D NULL)) { + CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize)); + FreePool (OldBuffer); + } + + return NewBuffer; +} --=20 2.34.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 (#112991): https://edk2.groups.io/g/devel/message/112991 Mute This Topic: https://groups.io/mt/103407484/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 Fri May 17 04:49:44 2024 Delivered-To: importer@patchew.org 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+112990+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 1703796447318149.51522086666057; Thu, 28 Dec 2023 12:47:27 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=1UA/Hk+qVL0rJ0DoUOGmWDigf46HmrctJC1UmpDcT40=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1703796447; v=1; b=gcAuN4nDbczs8dymWNl3ci/6jP+orP43SB/gq3B+QUt6Sp1lEEe1PfyX4jPOU9VMkfprpLxF eJsUqXHL0qycehIzlTtxnYClPZc1y2C22u4loLFdTgO6j/zp2QwkVhQ/Zt/QtwQaBE+dM8+fl4C D0Z1twviUjAMdvZXxvy5/xJQ= X-Received: by 127.0.0.2 with SMTP id fxceYY1788612xtMWro5DvI5; Thu, 28 Dec 2023 12:47:27 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.56]) by mx.groups.io with SMTP id smtpd.web10.131899.1703796446385570207 for ; Thu, 28 Dec 2023 12:47:26 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cdxLFVToPyiXMLbUnh19k2BzlIiF9BsAFuQS8ONVP8KxfcZ/GBsoQOE/B/bIVeg72F+YJDaiW6Z3lVNGQbqVaBdGe1WdZrLwjypNq2fmjM70O0z+IGpqAaJAyr6n5+eHHMI7rFBoKyvMu2FfBxm7WE47Infrhh7KyNc3XFd6die/BoIeTG9d2/mvwxojBAo6ENo1AB2TWCC+WF5bxtHrWYnGPlDY7zNedGBjDv0pRsxh9oCAABP07H1ELfbMPraUWrqOFBiO6FA/S0In9sbP0u35Mwt2I7rBBAoS5Al9UqJNY/enU/tkUx8yIDt8+YmnE/J7zaFr9blKLgNzIj0cLw== 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=t25Eh7Y/FoYhrIHApJ8levA9sqR7DgpPkKiTVDXsFGo=; b=Rgc6CB2qZhKJQGkaTBmAzVISwKQ1ROUSKw3Tw3iGxaY8dQZsHDQ1opvmyMZKpQWUxqwQzaJV23GVJSXkHXERuNPqRPYNGitv8YzxkHNWmvFeLv04HTBNGEd6sUEAulQdLp0bWHE9htC1+wBXUlYy1kJjeO1PdRTS9gZG1A+OJOMd3IliwfIiVlHDG0GxgfFHbGadXzTXNtcs22KNsT+mPY4B2izvAmk4cv3lFzj/dADcJ+mo3Q4Yl/FoITtKDlm3Vg3nmLBdGvco8V2GrCM2FY6krBlOYry0UvUoNUp51UI1TMNk1L2uNYE9EDaLG3aQTEX+R9f12hsTAJO9p69qvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from DM6PR01CA0007.prod.exchangelabs.com (2603:10b6:5:296::12) by MW6PR12MB8997.namprd12.prod.outlook.com (2603:10b6:303:23e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.19; Thu, 28 Dec 2023 20:47:24 +0000 X-Received: from DS3PEPF000099DE.namprd04.prod.outlook.com (2603:10b6:5:296:cafe::84) by DM6PR01CA0007.outlook.office365.com (2603:10b6:5:296::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 20:47:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; 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+112990+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.161) by DS3PEPF000099DE.mail.protection.outlook.com (10.167.17.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 20:47:23 +0000 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:13 -0800 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:13 -0800 X-Received: from cad98f4d2e3d.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Thu, 28 Dec 2023 12:47:12 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH v2 2/3] EmbeddedPkg: Add host based dependency to ci Date: Thu, 28 Dec 2023 12:47:07 -0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DE:EE_|MW6PR12MB8997:EE_ X-MS-Office365-Filtering-Correlation-Id: 13996ddd-9cb9-4d5f-262d-08dc07e631d3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: XWgJeRhxPdwpZ/j1vR4O7AFKjiUct26Yg8Z6uAC/ZTiyxzoYUEV1AhZ3SR6ZL8xfr64gX686wnWxnax4ib2LeFpHyZdWV/LzloAcNOdQ6U0bkqC1Uzdc7wUeQ5nxTSpWMMbeVh7zXe37ZgfazI7dhoBWZvAq5+norBeT1NkVil4WaR8JRC9LgU3MgIRyAjk8uAyrwXRfVH0rczqP0OKF8Zmz9JWsUlQMuY9VuEzbg9qZLWJosR0by4PL4c8TUwZIlP3Z+NuqE7dhG+FYDwz8wnJSRxzujSkfhegkxNm4p/SxYlVxY1u6P4luhP0dmyDDOiXJIs4lGzH0R/vXXlDxYb0PukIYiHvRIzpIDZXuAuUoK6gRSmQoJPmxSnJ3mJmB2TkxusKRWKsV5TzLvyof3vUVYyKQPpVjoxjwnbv5ZYCNkaCTteCAni3/uBoI65xTPTicBbXC9OPnYxydbuzlnTkUokrfqGdREu+PRmn5PDzGj+c25IzvovkHfjm+AFKGn2Mr2Dbjx0ii2x+rz9zEwmT35QHa/ODXNDr+/gca0n527/iMMr5WjJPlx3RZr2DdWiVu9aQCZ4W3KnLtHa/NFaJono2+RyK1up7Y+BFMdqlf/gQAFxrr43bUOo73Nsreik0mF7+gXCYjJ1Aw1dxtT9XYYO/Dh2Mp6Yzq158Yam22xi7esRRQu+7UfmlC4/Rwd9naB9mDdQuKetuo8ZdQJrd+Jo8Fud5awkdAi4cV1ek1fe7SAm4Vu2n6xFyas7/D X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 20:47:23.8155 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13996ddd-9cb9-4d5f-262d-08dc07e631d3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF000099DE.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8997 Precedence: Bulk 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,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: yeh4xa6XopHX745rA5JVjEgJx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703796447592100003 Content-Type: text/plain; charset="utf-8" Add UnitTestFrameworkPkg to AcceptableDependencies-HOST_APPLICATION list Signed-off-by: Jeff Brasen --- EmbeddedPkg/EmbeddedPkg.ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/EmbeddedPkg.ci.yaml b/EmbeddedPkg/EmbeddedPkg.ci.y= aml index 96a60a6f8b4d..6d042fc721ab 100644 --- a/EmbeddedPkg/EmbeddedPkg.ci.yaml +++ b/EmbeddedPkg/EmbeddedPkg.ci.yaml @@ -50,7 +50,9 @@ "MdePkg/MdePkg.dec" ], # For host based unit tests - "AcceptableDependencies-HOST_APPLICATION":[], + "AcceptableDependencies-HOST_APPLICATION":[ + "UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec" + ], # For UEFI shell based apps "AcceptableDependencies-UEFI_APPLICATION":[], "IgnoreInf": [] --=20 2.34.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 (#112990): https://edk2.groups.io/g/devel/message/112990 Mute This Topic: https://groups.io/mt/103407483/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 Fri May 17 04:49:44 2024 Delivered-To: importer@patchew.org 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+112992+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 170379645456498.99951141181032; Thu, 28 Dec 2023 12:47:34 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=5AKz3A2Lwsx3OIrhR96hk29dfLFb25JGuDpojKu56mQ=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1703796454; v=1; b=FJaaSxpEnvXVZ+mSgqG3C4E1Gmv3GvEYT5dtC2eHLitOYTOeclez5xiS6jfg6kbwW0veXB+6 DNLfrAmV5JvnG6X0QRHyIVzUuh/aETOQKcmBPE/i2IJyQKObxxKB1/edhgtvcJyMj1Ais8T9aef ZkFhvkif1k0aZPtyeq5FrqnA= X-Received: by 127.0.0.2 with SMTP id ef7bYY1788612xJiwvZfBhSs; Thu, 28 Dec 2023 12:47:34 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.54]) by mx.groups.io with SMTP id smtpd.web10.131905.1703796453598733852 for ; Thu, 28 Dec 2023 12:47:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mVEIHYIVWXbIrSZ/1G+zSu5hC2gXojMs5ruI+u1FVKBcfNjpADXdlNtdP7npx6t2qeygUQSqRGprS9PcUsXQwV7JZsMSewzRKT4JTM4F4wCyM0Fr0DZG2Be9YbhNfg4WBue/dfNYv/6ExB5UamqA0lArzHhK9ioAyq1AKViFbDr0QK2O+LO7NSiOH5fmDHkdPvruHdXPkmzVIfOMNZ+thF7Kya3XxQNsZmvvdfYOmxl5wff/lqnMiJGsgk/n7FO+42HJuUJOQJtMysZWyJ1GnL6y8biHBv2ISpmz7+jQTL+6p7jDDGNlwRmiDVfQs++lBJgoWZgIKFMBs901KDTdHw== 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=iIWEwg/AzXknWbutBntVjxiYOCJa/oQ++nnXWc6zJ1E=; b=AL+1CnhPJFf8PrNtwcO/OC3LpYpIGpknYSepntHOS1tXquIGt75dWbCK2+Z1RMkx6TTJdrrFP+FrQajBv+N4//5Q2+NBhd+0UgfTTSk6jnmMl38A3phDnQ6j2nOJ7NLdvcDNE9mg2N1gZ1ntu2Vf3OKQxDNptzLRUE8zQo7DZ9S8EA4lro3wFenU/uiBvSOJwrx4MOQ+BBwAINvF7j0hdFyBz70xfsJn5yRqcfDYF/43Gvxk8wt7fDb+2zMFA39lhnSqY70LpTeII0g2GwiMIXWDrqv6uemhEuZwMEbU24OVqEmGnVbH9BtkgjJ6XSAOWvjQ7a7RkN2i0+ZEuz5GiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) X-Received: from SN6PR08CA0021.namprd08.prod.outlook.com (2603:10b6:805:66::34) by BL3PR12MB6449.namprd12.prod.outlook.com (2603:10b6:208:3b8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.18; Thu, 28 Dec 2023 20:47:28 +0000 X-Received: from SA2PEPF00001508.namprd04.prod.outlook.com (2603:10b6:805:66:cafe::d8) by SN6PR08CA0021.outlook.office365.com (2603:10b6:805:66::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 20:47:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; 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+112992+1787277+3901457@groups.io; helo=mail02.groups.io; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.117.160) by SA2PEPF00001508.mail.protection.outlook.com (10.167.242.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 20:47:27 +0000 X-Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:14 -0800 X-Received: from rnnvmail201.nvidia.com (10.129.68.8) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Thu, 28 Dec 2023 12:47:14 -0800 X-Received: from cad98f4d2e3d.nvidia.com (10.127.8.13) by mail.nvidia.com (10.129.68.8) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Thu, 28 Dec 2023 12:47:13 -0800 From: "Jeff Brasen via groups.io" To: CC: , , , Jeff Brasen Subject: [edk2-devel] [PATCH v2 3/3] EmbeddedPkg: Add DtPlatformLoaderLib gmock support Date: Thu, 28 Dec 2023 12:47:08 -0800 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-NVConfidentiality: public X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001508:EE_|BL3PR12MB6449:EE_ X-MS-Office365-Filtering-Correlation-Id: cbb8550b-3e34-4f72-f317-08dc07e63448 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 7fKMbTN0weXo4rk/ZXCrPqgNlicgyyC4BiL6zC0MpSW+3OBhiYEvA/UoqRnHqBk8ywOugXN5MYa77Q/xMYuhtczHAIKZnR0S3A4Gh5fi3ccG0XIhIsrnzUUZcguDUONI1UXHBsQN3QIPoHb4QS1euM9UWJ1WQ1PwiBCoKGKCahM++qUGrcE/FxwdeVF5K6xECvuxo9VLC+hc76AODu+yFGnRRtJlUK4yd+FGkCGfvy5VDQZzwSTB2voQli3SPBrjq8kn7ZTcun4E39s/KfBNslNvq+8eHM0v4vAnjigWsLxl0R1HTTuyMvoEojA8S/OCgwlKGowoIFX6yUn8D3uSMRttH5CiK8DZkUMKKOVMZ0Wu8UrN7DGymGmceXUkAPXQbTZi6RVEqdF3ffgpBw/4vCBVpDeDmtck3ljFb9M5w2/Z7mmB3uUx8NxH0nY5l9jvOhp286e6CI/C2b1Nz1NR3YBxFbZr0Xn/YDyGarvjMXiPynUB3i5bvOaV4FFbDtM3PWfVIrHAVh/qrdYEoliZTfXlpVXiowlSXEBsUcCrINK0o6P02RMnKmZm/0DhlQGUou+u77vToYzNZs6N+XreUrHcXhj6My9aIrsFfmQrHf7du+iEWaPIRW24pAZ00VZwa42JRTHbgIROgKRbhXnS8PB0CG1Edz875zoctDzbtFiDZaeF8zi7S93Qu9tzXMC3YtJ0oymRnReylYZKuq5QUFphyLiTn91DKCwegzVYDtI4nuaIRja9BSsWr43+dKS7 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 20:47:27.9430 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cbb8550b-3e34-4f72-f317-08dc07e63448 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00001508.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6449 Precedence: Bulk 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,jbrasen@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: g3WlBJXvSAzoB810KnIM4Iw7x1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703796455573100001 Content-Type: text/plain; charset="utf-8" Add Google Mock Library for DtPlatformLoaderDtbLib Signed-off-by: Jeff Brasen --- EmbeddedPkg/EmbeddedPkg.dec | 1 + .../MockDtPlatformDtbLoaderLib.inf | 29 +++++++++++++++++ .../Library/MockDtPlatformDtbLoaderLib.h | 31 +++++++++++++++++++ .../MockDtPlatformDtbLoaderLib.cpp | 13 ++++++++ 4 files changed, 74 insertions(+) create mode 100644 EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatform= DtbLoaderLib/MockDtPlatformDtbLoaderLib.inf create mode 100644 EmbeddedPkg/Test/Mock/Include/GoogleTest/Library/MockDt= PlatformDtbLoaderLib.h create mode 100644 EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatform= DtbLoaderLib/MockDtPlatformDtbLoaderLib.cpp diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec index 94dc3c9b76ca..b4834e8b4f88 100644 --- a/EmbeddedPkg/EmbeddedPkg.dec +++ b/EmbeddedPkg/EmbeddedPkg.dec @@ -28,6 +28,7 @@ [Defines] ##########################################################################= ###### [Includes.common] Include # Root include for the package + Test/Mock/Include =20 [LibraryClasses.common] PrePiLib|Include/Library/PrePiLib.h diff --git a/EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatformDtbLoad= erLib/MockDtPlatformDtbLoaderLib.inf b/EmbeddedPkg/Test/Mock/Library/Google= Test/MockDtPlatformDtbLoaderLib/MockDtPlatformDtbLoaderLib.inf new file mode 100644 index 000000000000..9618efd86470 --- /dev/null +++ b/EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatformDtbLoaderLib/M= ockDtPlatformDtbLoaderLib.inf @@ -0,0 +1,29 @@ +## @file +# Google Test mocks for MockDtPlatformDtbLoaderLib +# +# Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2023, Intel Corporation. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D MockDtPlatformDtbLoaderLib + FILE_GUID =3D 34c05e81-3c56-4c78-b4b7-a39be19163a4 + MODULE_TYPE =3D HOST_APPLICATION + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D DtPlatformDtbLoaderLib + +[Sources] +MockDtPlatformDtbLoaderLib.cpp + +[Packages] + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec + +[LibraryClasses] + GoogleTestLib + +[BuildOptions] + MSFT:*_*_*_CC_FLAGS =3D /EHsc diff --git a/EmbeddedPkg/Test/Mock/Include/GoogleTest/Library/MockDtPlatfor= mDtbLoaderLib.h b/EmbeddedPkg/Test/Mock/Include/GoogleTest/Library/MockDtPl= atformDtbLoaderLib.h new file mode 100644 index 000000000000..ce0fca2c3293 --- /dev/null +++ b/EmbeddedPkg/Test/Mock/Include/GoogleTest/Library/MockDtPlatformDtbLoa= derLib.h @@ -0,0 +1,31 @@ +/** @file + Google Test mocks for DtPlatformDtbLoaderLib + + Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2023, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef MOCK_DT_PLATFORM_DTB_LOADER_LIB_H_ +#define MOCK_DT_PLATFORM_DTB_LOADER_LIB_H_ + +#include +#include +extern "C" { + #include + #include + #include +} + +struct MockDtPlatformDtbLoaderLib { + MOCK_INTERFACE_DECLARATION (MockDtPlatformDtbLoaderLib); + + MOCK_FUNCTION_DECLARATION ( + EFI_STATUS, + DtPlatformLoadDtb, + (OUT VOID **Dtb, + OUT UINTN *DtbSize) + ); +}; + +#endif diff --git a/EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatformDtbLoad= erLib/MockDtPlatformDtbLoaderLib.cpp b/EmbeddedPkg/Test/Mock/Library/Google= Test/MockDtPlatformDtbLoaderLib/MockDtPlatformDtbLoaderLib.cpp new file mode 100644 index 000000000000..a5db68e59a09 --- /dev/null +++ b/EmbeddedPkg/Test/Mock/Library/GoogleTest/MockDtPlatformDtbLoaderLib/M= ockDtPlatformDtbLoaderLib.cpp @@ -0,0 +1,13 @@ +/** @file + Google Test mocks for MockDtPlatformDtbLoaderLib + + Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (c) 2023, Intel Corporation. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#include + +MOCK_INTERFACE_DEFINITION (MockDtPlatformDtbLoaderLib); + +MOCK_FUNCTION_DEFINITION (MockDtPlatformDtbLoaderLib, DtPlatformLoadDtb, 2= , EFIAPI); --=20 2.34.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 (#112992): https://edk2.groups.io/g/devel/message/112992 Mute This Topic: https://groups.io/mt/103407486/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-