From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 7ABA07803D9 for ; Tue, 14 May 2024 08:16:15 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=vQk78dEQmUo4O9ez8Mx2Q6QSY4lfipTdSXFuUV2n/V4=; c=relaxed/simple; d=groups.io; h=Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:Received-SPF:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20240206; t=1715674573; v=1; b=HrKNPsZB5V/nmWl8okxz7ZJbvGRnRAzO5ywIW/SXKOal4ujyGnJXdPudcN1egnQBnCUz6gtZ UidISjg5o9xQyEtd4ydH4G6vtLQ6wxbfDvcXvwvu1ZGlZL04juhpAhSom4yK96qvePwBJlUkEYS KWRDctCeNwj1yZJkip2UVm3lFUcvGJf+iqUjcODrCyFOOEyI/40AXOS3J3dCZR2Riq6vZ4bjQiB HbPtnW7lDyZq9kXjLIU/L8CBMJDRYboUZUNskwOSN/4Shm8zbadmX6W8v1r97cOqj4E19VcCUjV EetD29nxFCUeXZ69RApSvAbo4m6lspO8STfKLWczBLhSA== X-Received: by 127.0.0.2 with SMTP id roYdYY7687511xcBJiKXRCpw; Tue, 14 May 2024 01:16:13 -0700 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.42]) by mx.groups.io with SMTP id smtpd.web11.10149.1715674572761958952 for ; Tue, 14 May 2024 01:16:12 -0700 X-Received: from DM6PR11CA0010.namprd11.prod.outlook.com (2603:10b6:5:190::23) by DS0PR12MB6487.namprd12.prod.outlook.com (2603:10b6:8:c4::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Tue, 14 May 2024 08:16:10 +0000 X-Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:5:190:cafe::6c) by DM6PR11CA0010.outlook.office365.com (2603:10b6:5:190::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55 via Frontend Transport; Tue, 14 May 2024 08:16:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C X-Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7587.21 via Frontend Transport; Tue, 14 May 2024 08:16:10 +0000 X-Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 14 May 2024 03:16:09 -0500 X-Received: from BLR-LAB-SFW01.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 14 May 2024 03:16:08 -0500 From: "Abdul Lateef Attar via groups.io" To: CC: Abdul Lateef Attar , Abner Chang , Paul Grimes Subject: [edk2-devel] [PATCH 2/6] AmdPlatformPkg: Adds BaseAlwaysFalseDepexLib Library Date: Tue, 14 May 2024 13:45:44 +0530 Message-ID: <5b85416b44ae4be3a14839f07c4d8a359754a999.1715674395.git.AbdulLateef.Attar@amd.com> In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: AbdulLateef.Attar@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|DS0PR12MB6487:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c824a48-0202-4e99-6332-08dc73ee1d1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?KTTHpH3Cj88dAC8gnBUsrAJ9tQrn7LuO5pKeIFcvvCvVB4b4zmvYA/omzpBx?= =?us-ascii?Q?ytV3X7WsN6nJe/iS2bSy7CNyIL+n6agMJv2zMZOsokCciAuPSZUS1b9jI8h3?= =?us-ascii?Q?2O0V8BenTFKfqhpEGMQ5l7EUyAft1PzoeZsaN/epPNHwoRsAwdtngWohPwj/?= =?us-ascii?Q?PLSxombl6Opxfpu8zz9MB4LL2vkWd+QZugBHlVuO3aB/9Q7wIr41z0asKQKg?= =?us-ascii?Q?H0YWIbHOoMULybNGGq1aenc5o57TNdFao1og0F62IbIjD02FXPcdap2d1aZT?= =?us-ascii?Q?kd7j/sFxIzBT6QsWUqF0xq0oaDluLSDyxqsEBkcUfufOkyjDQYXtlG4q8Aay?= =?us-ascii?Q?+pZoEax1fj7hsvF0ev0T6hmOTm7vcehlkqlnsdJNyCb40xaAMULwNYEn1vjP?= =?us-ascii?Q?wtd5M5Pi9/lrB5QtRp1F8PmO2kCJSao1pg7TeR8yedgF+sLDdE6nlg209KDK?= =?us-ascii?Q?gXLYMmLpee8Sh2thb5M1mPuthQsuKznkAxKzWLT6s0d8cCS4H5jUX8ZFJBlr?= =?us-ascii?Q?tz2L5I9jI18+zYCfqAzDTnnDvZAHYQSX79pqBPFWgIny104EuHKSxmBiUK/r?= =?us-ascii?Q?NLumQTVxtpdToPe2ud5m9Jz0cwv5p0DPH8qpNi00gbBkgaZzA7lKe4a61x06?= =?us-ascii?Q?aHwdkKgja1dvHBNuE97qyl0dxQGRhz3v9zRD+atn/wn7sXOIcYbZ4afv/Lbw?= =?us-ascii?Q?RRh5ZHbp1tndOh7jJ+hft95tpOVqG1/BHb4a4uC58LVOkRM8nXrrBe7wcFZL?= =?us-ascii?Q?c+kJ6M18e2rW27mf4ftdFkt+YlCsydg18FaEKKrOZ0x3Ja3bu53VSwTniiZP?= =?us-ascii?Q?3ZkqTKfKYkiIUSGGAwdmmxkiU7coTRoTnit21jy7yNZASZ+4eQHOBD52uReX?= =?us-ascii?Q?KYSJ5kTDOjZ/Oh9pAO3R3l1pjGoQSCveUzw1WMmda2nXw+Tez9f1m8F3V2Cj?= =?us-ascii?Q?oJXDlunO9vNKXepzqPhSbVvwUoSMSLPhoZ51CbNp+HnSlMRQZbU7pkMRUQoT?= =?us-ascii?Q?PMK6xZO6i/mvbDRrO5w3aqz3MvlTba+qnqwW6dxkQKwUMPgFh34MFbfXhgd4?= =?us-ascii?Q?E8rHMUKVHmt7jvHGa0BQ7vlQbzrqibUk7/iI4pzWaa9LubG7GNRPadlA9q5W?= =?us-ascii?Q?7aMPKGivx2jmiEHe9GtS9WPGmzvIT1gLNF1J7Qb+g/jhjsdaHzJ2rIGM8Uls?= =?us-ascii?Q?ctKV3ont3jY06c+BgFm6SvGnit3ZfxxZyCQau3wMMYUDerRflI8QLFaCIWCj?= =?us-ascii?Q?ltxAchewcXtjm46DPM8qxZps9NplbwOgb9zIuVpPPYOjGhF4PtkWEZwMVc7E?= =?us-ascii?Q?AcR2iMI7L9+J7VGCVq3Waf7ThxjSPK5YMz7skK2B976AHWXqw2/BFxS14jow?= =?us-ascii?Q?hEwt9cNIgZ18RDScoW214nxLAVec?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2024 08:16:10.6353 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c824a48-0202-4e99-6332-08dc73ee1d1a X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6487 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 Resent-Date: Tue, 14 May 2024 01:16:12 -0700 Resent-From: AbdulLateef.Attar@amd.com Reply-To: devel@edk2.groups.io,AbdulLateef.Attar@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: VhVdgSRgoFvIxazzKWWOnsuRx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=HrKNPsZB; dmarc=pass (policy=none) header.from=groups.io; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Adds BaseAlwaysFalseDepexLib Library which always adds DEPEX to FALSE. Using this library will prevent module/driver being dispatched. Usage: MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf { NULL|AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseAlwaysFalseDepe= xLib.inf } Cc: Abner Chang Cc: Paul Grimes Signed-off-by: Abdul Lateef Attar --- .../AMD/AmdPlatformPkg/AmdPlatformPkg.dsc | 2 ++ .../BaseAlwaysFalseDepexLib.c | 20 +++++++++++ .../BaseAlwaysFalseDepexLib.inf | 35 +++++++++++++++++++ .../BaseAlwaysFalseDepexLib.uni | 12 +++++++ 4 files changed, 69 insertions(+) create mode 100644 Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepe= xLib/BaseAlwaysFalseDepexLib.c create mode 100644 Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepe= xLib/BaseAlwaysFalseDepexLib.inf create mode 100644 Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepe= xLib/BaseAlwaysFalseDepexLib.uni diff --git a/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc b/Platform/AMD/= AmdPlatformPkg/AmdPlatformPkg.dsc index 151235b791..e39ad93c83 100644 --- a/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc +++ b/Platform/AMD/AmdPlatformPkg/AmdPlatformPkg.dsc @@ -24,6 +24,7 @@ !include MdePkg/MdeLibs.dsc.inc =20 [LibraryClasses.Common] + AlwaysFalseDepexLib|AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseA= lwaysFalseDepexLib.inf BaseLib|MdePkg/Library/BaseLib/BaseLib.inf BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf @@ -46,6 +47,7 @@ MemoryAllocationLib|MdePkg/Library/UefiMemoryAllocationLib/UefiMemoryAll= ocationLib.inf =20 [Components] + AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseAlwaysFalseDepexLib.i= nf AmdPlatformPkg/Universal/LogoDxe/JpegLogoDxe.inf = # Server platform JPEG logo driver AmdPlatformPkg/Universal/LogoDxe/LogoDxe.inf = # Server platfrom Bitmap logo driver AmdPlatformPkg/Universal/LogoDxe/S3LogoDxe.inf diff --git a/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/Ba= seAlwaysFalseDepexLib.c b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFal= seDepexLib/BaseAlwaysFalseDepexLib.c new file mode 100644 index 0000000000..e9f176223d --- /dev/null +++ b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseAlway= sFalseDepexLib.c @@ -0,0 +1,20 @@ +/** @file + No functionality of this file. + + Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. All rights reserv= ed. + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +/** + Empty function to allow Library Class to be valid. +**/ +VOID +AlwaysFalsePlaceHolderFunction ( + VOID + ) +{ +} diff --git a/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/Ba= seAlwaysFalseDepexLib.inf b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysF= alseDepexLib/BaseAlwaysFalseDepexLib.inf new file mode 100644 index 0000000000..4e86256497 --- /dev/null +++ b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseAlway= sFalseDepexLib.inf @@ -0,0 +1,35 @@ +## @file +# This is the module used to consume the always false dependency. +# Used to not dispatching the specific module included by using +# external DSC/FDF include file. +# For example: MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc +# +# The module linked with the NULL class BaseAlwaysFalseDepexLib is still +# put in the FV however it won't be executed. +# +# Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. All rights reser= ved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D BaseAlwaysFalseDepexLib + MODULE_UNI_FILE =3D BaseAlwaysFalseDepexLib.uni + FILE_GUID =3D 74DC464F-BC11-4E7D-8829-DD2F911988A8 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D AlwaysFalseDepexLib + +# +# VALID_ARCHITECTURES =3D X64 +# + +[Sources] + BaseAlwaysFalseDepexLib.c + +[Packages] + MdePkg/MdePkg.dec + +[Depex] + FALSE diff --git a/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/Ba= seAlwaysFalseDepexLib.uni b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysF= alseDepexLib/BaseAlwaysFalseDepexLib.uni new file mode 100644 index 0000000000..5c7ccf1840 --- /dev/null +++ b/Platform/AMD/AmdPlatformPkg/Library/BaseAlwaysFalseDepexLib/BaseAlway= sFalseDepexLib.uni @@ -0,0 +1,12 @@ +## @file +# +# Copyright (C) 2023 - 2024 Advanced Micro Devices, Inc. All rights reser= ved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +#string STR_MODULE_ABSTRACT #language en-US "Library instance = to provide FALSE Depex to prevent running of driver." + +#string STR_MODULE_DESCRIPTION #language en-US "Library instance = to provide FALSE Depex to prevent running of driver." + --=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 (#118883): https://edk2.groups.io/g/devel/message/118883 Mute This Topic: https://groups.io/mt/106090921/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-