From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web12.14694.1632625305658011255 for ; Sat, 25 Sep 2021 20:01:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=a6WA83UY; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="222423719" X-IronPort-AV: E=Sophos;i="5.85,322,1624345200"; d="scan'208";a="222423719" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2021 20:01:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,322,1624345200"; d="scan'208";a="706017048" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by fmsmga005.fm.intel.com with ESMTP; 25 Sep 2021 20:01:44 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sat, 25 Sep 2021 20:01:44 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sat, 25 Sep 2021 20:01:44 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sat, 25 Sep 2021 20:01:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e6S8n5amCFMQJegSRsS1AsVmdIgATaCloS0J7GIgmzuShScKeM4Ytb39eSq4up0wg2yVrNK21nxxnvKIl0M28+NPzdyqESxgT09URl+iKMoEuWwj6xPzgnpKhpBb8VgZn9FY0HCRlf+ydqZ0jKym8gyVpybiHSmBzW1mNN36J1p8a2ODVSj6YJhCzRPdmqeUPoivAVMD83yy4nY2IYPjlCKZVJHa6KBBBdyG81Enle+UF3FoPi5x3Mm6/zDBGkH0lvS8M4GloAlusgJ4FR3sVmdeYPrnm8Fexu/eO+PNswd8OauyLdryUN+oFLQ0kvA+XCQ8hqbXsKpuRR1dU6pzzA== 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; bh=nJocbpG2xDu3rmTO6GGbLKFmi4xkXP22m5RME5R9lq0=; b=j7GaYIjPiCALLUzsRgaBaUFDLGjZzXMVI8Z3zPgWW+M4YqotAzpoycaj4Pi3ogS3dzEwSsyAPXZX85kUkzRzKylnzoesvQfEhZuRkr8CXOMI/7pQyqpLHhWepKAdviqQaLfiiDXpMLdHX3HzPVfNGth4Zn7XaD1yXHVBw644fTsAl6xF3r9EvzelPJ6EMUjU78uLNq1LZKM8z8ZU178Xg4qaas4eBxtMIcpO3UiDx4YGJrII5Ucr19Fwy/MRjrgQnUIS3WbTi98H2Fgf/ucI2Wk6Pm8DdTb0m0NAXnXIHN/vpYhizqFAw5c1FOW2ibthcHDMqeYb+UH+HgCRiMh5Cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nJocbpG2xDu3rmTO6GGbLKFmi4xkXP22m5RME5R9lq0=; b=a6WA83UYMIU0pcP7wP2VISeOCAOzlr/Kqa7/UaRRB4PpuAupmpbyjnDNbJ1IS0HfMajP2qRh3bXtjzZPnUZqqR+Fcsqiyh9WbxXe2eGP2fyM4QXBpdelJRBw/FDkdSe7B+Ms7L0tHWRCnkSaGP1zWsIEpvTgbcf+Qi1mXpGRf74= Received: from CY4PR1101MB2072.namprd11.prod.outlook.com (2603:10b6:910:1d::15) by CY4PR1101MB2085.namprd11.prod.outlook.com (2603:10b6:910:20::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Sun, 26 Sep 2021 03:01:42 +0000 Received: from CY4PR1101MB2072.namprd11.prod.outlook.com ([fe80::7dc5:34b5:bbff:832f]) by CY4PR1101MB2072.namprd11.prod.outlook.com ([fe80::7dc5:34b5:bbff:832f%8]) with mapi id 15.20.4544.021; Sun, 26 Sep 2021 03:01:42 +0000 From: "Ni, Ray" To: "Dong, Guo" , "devel@edk2.groups.io" CC: "Ma, Maurice" , "You, Benjamin" Subject: Re: [`edk2-devel][PATCH] UefiPayloadPkg: Use dummy constructor for PlatformHookLib Thread-Topic: [`edk2-devel][PATCH] UefiPayloadPkg: Use dummy constructor for PlatformHookLib Thread-Index: AQHXscHHfj29tby1S0KrA+P9CMpoG6u1oddw Date: Sun, 26 Sep 2021 03:01:41 +0000 Message-ID: References: <20210925035932.81-1-guo.dong@intel.com> In-Reply-To: <20210925035932.81-1-guo.dong@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1d98390b-8989-4fcd-71b5-08d98099f77f x-ms-traffictypediagnostic: CY4PR1101MB2085: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UDli/Lkznf7mRHoA1292FzDoZy1S+xYI3PE76GrmH3Iq04T04mAFHKyi+demKv+PQTO8vV9f2A+AVvp+9PXdAbhW92XNbrVQC1iUPJm2xL8eJGbSUIxbhCYGPY7opFYTqlSiixuca6oXslHPhpgrm/ZCNe2ApnJkvmibOgBZ2Ma3gOQ5ixBIZRO0mBJy9ZrPKhfgVPmsU8+ERRD3a7QvVuMODjpBqhulxSKE5dPUU+ewsK572E51mURHIQVtTiMdy2zqr8szF3kPI6MXVHRYDNrAwPlfYorTjL4lZ4xYy9gkxzWzqZNGYLp9PrDqHTnERwzcbPYhsqlTETH2wXmPIRRMnQD9wHZ8fsDc3JFOH/hN26FUgarjLpry9cdmV4spYA+4CSKufauCeAcTFurl95cSdFUNtJoUV66thS0n28VwVj+xhAY6pgnJId49V8yhP+1VtY73KSadG9PYKeW9mYXPjDCeBYIND+6qYf5LU05Du1iZQ0/dSH5VbGoOoI+LKa3qUSzXzjf9cUHvB/Qlp+/mpb6CVUsFKRxtqLQDyU2LMIn74XUIY2oSimTxUIPNVjNxtvkISf/+HPrTQf7xuj7YhvbypJoYFTEasWCCJzkuhRrr42YK92FTrHrRUsom/ldxXgPFGIPfRwjnYgTxltpBeJxy0dzJ8OJferrvMLBP8ogljFsUmRRDS0svX66FDuWbGDOWsVfKz7bcCcwAX/2r4+c1CHuKrPoYRl68x7w= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR1101MB2072.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(26005)(53546011)(86362001)(7696005)(186003)(6506007)(33656002)(508600001)(38070700005)(52536014)(5660300002)(55016002)(38100700002)(107886003)(110136005)(71200400001)(2906002)(8676002)(76116006)(54906003)(316002)(8936002)(9686003)(66946007)(66446008)(66556008)(66476007)(4326008)(64756008)(83380400001)(122000001)(81973001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4BrnpMPiI35c2HQX4yLcHWYUuAfqcId8wfXmJe62JovO+o3CGSF2xriB1HUa?= =?us-ascii?Q?+P5wDdhs9M+wYr+mOD5pD6Yeh0+k/F26Jj44rY/33k89gkRNH6KQo64+dJIM?= =?us-ascii?Q?IJ867qd7dnxJzBVzZuCUwadXc7Sd7ww3XnE3xg4iIwI8Ru7ae80/pDnBuZGs?= =?us-ascii?Q?BU+q2/KbisUtVn2MXn49aGs03yX4s3uyxFtiGR+Y0bdrgdytzWStClaQlGzN?= =?us-ascii?Q?o5BfBW1EudCyfirzsNIWqz4cwhKYR76+w0oI0Xj9jJ4bsc7AGYl3ngeB4z78?= =?us-ascii?Q?XxZPdgX8HMiZfb4L58kDxPpsy+XXFe4uQcBGn7na+6YwobZtF6IJcfGopEyy?= =?us-ascii?Q?bU6W2hciSPEELmNv8C3sVduWlf1pvdTCG1p67trDv3ic6mDHGfOsfJKHwFZf?= =?us-ascii?Q?Ym6HsG+4iP1CsDnhD08johK0eXjFjfwTUs+E7rzrWL9aDP33QOyqe05/7hsU?= =?us-ascii?Q?rkkQUG0FWClHj2+7K8DAsB5mA2XlTKLCxPrZn4/it9t2NLtl57wcm6d3DdWx?= =?us-ascii?Q?a+1VT2lMMJ9kFM2PzKHOX/mdsbWvNYZ5veZenPtypttiMIDg0qatwMoWr+6T?= =?us-ascii?Q?1fdWnWAXFg1tTGMD68uWbk2HlVg8M6DIgoWohYaOsgVVaiiYtjHE6s8Rgvpa?= =?us-ascii?Q?1jt696JtxbrXhmpND9k9TB12Q6wMm6QSy9xkFPYq5nK+hjnzqwgaqI+7bKug?= =?us-ascii?Q?ErkXYPhFwDEGHDeboT17mv2q+rh+fzLFjAI293zvK+OE/cR4IBBn22eMFa6N?= =?us-ascii?Q?u8UKJjhqQ69HENQ1J8YYv3eX0xDE+GGQoZ51eaMTcpu9meCZwGqSXKCHlHtS?= =?us-ascii?Q?GGzVVqOt5bt7s4BGS1maxS+UoCrWXgyyjD/Ptt0dbJSeBVPXk5MRPbwYYG4I?= =?us-ascii?Q?YQRp+7UPmBW7CBZ/oxoG5BnFRPXkdoEQWX6wNai+h/wPkdUN5TfcNDikZbl9?= =?us-ascii?Q?H6rnUL2a9rokk/wgFKnAbz91bEdSSbpeHRdq61Lisr8E6pu3G4FefKS/TZ8q?= =?us-ascii?Q?4kXB8xH7wtlJyASv+jCrTUn/7dSKKJ0+MQWwaa9M6V3l5IjciRFRF8VIuA14?= =?us-ascii?Q?QDfTvhtdlDaSatRPuESzh7u8m7Ow183IP0IPKPuqvOceHpiJQ/JeMReWyh1z?= =?us-ascii?Q?6ow0Am9/GTPWwoF+XAYbr9+K7XyhRVmeNZunwlMGXJWIByeMJjgmexb1laHc?= =?us-ascii?Q?mzoanj+NTJ6evSmbbEESlsEdKkJanwBf5/WBPPWsjlkQ1XmZ1GAbkcfB/8N3?= =?us-ascii?Q?liKoWINLAqp9s3IygyQaYCOnTruPMVrpOXEMPsqXsYYXhN7So2tH9zW2RWCh?= =?us-ascii?Q?OEvPDOmUtl30GlPcoys1LthN?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR1101MB2072.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d98390b-8989-4fcd-71b5-08d98099f77f X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Sep 2021 03:01:41.8742 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Em7aWPKzuvGzmNjpEKOkI0HLmPpBRMcPL2gXMyaNirMOMpZy957fl/LEoM62l8bOw9FKeZ7S38vOBvjyv6Z6yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2085 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni -----Original Message----- From: Dong, Guo =20 Sent: Saturday, September 25, 2021 12:00 PM To: devel@edk2.groups.io Cc: Dong, Guo ; Ni, Ray ; Ma, Maurice= ; You, Benjamin Subject: [`edk2-devel][PATCH] UefiPayloadPkg: Use dummy constructor for Pla= tformHookLib 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 --- 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