From nobody Sat May 18 01:16:12 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+81117+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+81117+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1632542385; cv=none; d=zohomail.com; s=zohoarc; b=nh24RrmELbg8evvvmyh0Wxc8FamRI0luBTpgH+WdCyWNgStFWG9Uj97Q239hzTL8P+8V7JGejA1t9TegDr0xagEvzj0kjYDCj/Hsl999heq3lpq3gutwzHL/dC5VZUyipmj1GH2ZDVd5jWt1JdSURoXy8V0bLg+pZ8CMdEmKdXg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632542385; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=FkbBvfO2Op30aqwvhDBGKGjFovVX/nnGgk5lTwVSKms=; b=XWIUz0l8FMbIQAXPVpWSIQwe/qkblsjGoRl0PLIz3AQRvOZzd++560m6R92rwkAVqoVBoq9Yp1Z/5cDVbL3M65LY7Xa6cAVG1hBoRCQnbSHuROPLIY1lLyHepFPkZ67WDAy4rp1VylaTXeF9OxHYM+oldLKNMiXqr0KJTjuFkbg= ARC-Authentication-Results: i=1; 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+81117+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1632542385436322.96649710338966; Fri, 24 Sep 2021 20:59:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ERp6YY1788612xAyxXyW4ASU; Fri, 24 Sep 2021 20:59:45 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web10.3296.1632542383734152108 for ; Fri, 24 Sep 2021 20:59:44 -0700 X-IronPort-AV: E=McAfee;i="6200,9189,10117"; a="224251305" X-IronPort-AV: E=Sophos;i="5.85,321,1624345200"; d="scan'208";a="224251305" X-Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 20:59:42 -0700 X-IronPort-AV: E=Sophos;i="5.85,321,1624345200"; d="scan'208";a="552087712" X-Received: from gdong1-mobl1.amr.corp.intel.com ([10.212.80.242]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 20:59:42 -0700 From: "Guo Dong" To: devel@edk2.groups.io Cc: Guo Dong , Ray Ni , Maurice Ma , Benjamin You Subject: [edk2-devel] [`edk2-devel][PATCH] UefiPayloadPkg: Use dummy constructor for PlatformHookLib Date: Fri, 24 Sep 2021 20:59:32 -0700 Message-Id: <20210925035932.81-1-guo.dong@intel.com> MIME-Version: 1.0 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,guo.dong@intel.com X-Gm-Message-State: OOGBFPbYIr8Tyrbidc473m1hx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1632542385; bh=lugtVwbfqARMbnaUy7tE6oGlat5ieRkyVsHft5A9ukA=; h=Cc:Date:From:Reply-To:Subject:To; b=obcV1F6brlilolXtz/T2SVsGggARzcLJwrIB4eGbPqexifyosWI3lGR0y4c3qFySpvT YUCJZ6MpCVvI76sEwBQVi72sFXSRb1VIH+a+8yZGwyoLZjOSdf/81LpVdO0k1+bbcABed kTEx9pWeMZNzI+QLXbst9VQnsiMf9dGcV+o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1632542386377100001 Content-Type: text/plain; charset="utf-8" From: Guo Dong The Library constructor is only used for library dependency. So use a dummy function to make it clear instead of using an actual function. Cc: Ray Ni Cc: Maurice Ma Cc: Benjamin You Signed-off-by: Guo Dong Reviewed-by: Ray Ni --- UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c = | 17 +++++++++++++++++ UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf= | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.c b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.c index bd433bdbe0..004fcd8b7c 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.c +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.c @@ -13,6 +13,23 @@ #include #include =20 + +/** Library Constructor + + @retval RETURN_SUCCESS Success. +**/ +EFI_STATUS +EFIAPI +PlatformHookSerialPortConstructor ( + VOID + ) +{ + // Nothing to do here. This constructor is added to + // enable the chain of constructor invocation for + // dependent libraries. + return RETURN_SUCCESS; +} + /** Performs platform specific initialization required for the CPU to access the hardware associated with a SerialPortLib instance. This function do= es diff --git a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platfor= mHookLib.inf b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/Platf= ormHookLib.inf index 2dfd8b1216..7ac6bfa1b1 100644 --- a/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.inf +++ b/UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLi= b.inf @@ -14,7 +14,7 @@ MODULE_TYPE =3D BASE VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D PlatformHookLib - CONSTRUCTOR =3D PlatformHookSerialPortInitialize + CONSTRUCTOR =3D PlatformHookSerialPortConstructor =20 [Sources] PlatformHookLib.c --=20 2.32.0.windows.2 -=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 (#81117): https://edk2.groups.io/g/devel/message/81117 Mute This Topic: https://groups.io/mt/85855021/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-