From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.2.61; helo=eur02-ve1-obe.outbound.protection.outlook.com; envelope-from=udit.kumar@nxp.com; receiver=edk2-devel@lists.01.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20061.outbound.protection.outlook.com [40.107.2.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C00AF2098EA8D for ; Thu, 19 Jul 2018 21:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FR6ENqmKr3m3LncWpca2+4fdg0Xr0DmYdZV097KrpvM=; b=JYWH/nUkhcBo4dlXp1LPfgwY5MVM8X00sUlIIOzXc1Wckr4QQjrlnkV3owzE38vIW9znZUNPnrc+/QhLygO31gJqMl3xBBK1mHVAMS4waCSICVVM8Je3WSqWFiQvu9SpTrUwo7xZiMEfhcXZev7rn1W84d3u+ALQoQ3uFJuJtbA= Received: from AM6PR0402MB3334.eurprd04.prod.outlook.com (52.133.18.151) by AM6PR0402MB3846.eurprd04.prod.outlook.com (52.133.29.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Fri, 20 Jul 2018 04:07:41 +0000 Received: from AM6PR0402MB3334.eurprd04.prod.outlook.com ([fe80::24da:40ae:2827:efc9]) by AM6PR0402MB3334.eurprd04.prod.outlook.com ([fe80::24da:40ae:2827:efc9%3]) with mapi id 15.20.0973.018; Fri, 20 Jul 2018 04:07:41 +0000 From: Udit Kumar To: Andrew Fish , Marvin H?user CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] Help on AutoGen Files Thread-Index: AdQfMQEaxcY4kHCxQrezTBTX+QtiPAAWoiJQAACZUgAAFCeVUA== Date: Fri, 20 Jul 2018 04:07:41 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=udit.kumar@nxp.com; x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR0402MB3846; 6:7njKbgffkb1kiXc5oUoPJ94/5lKIvQN11ChR0GAir2HuOKO9LwWg4grcmhAWNHmaq+5i/15s+GyLS1ozURS/5qZFGpljTBYJLwG5CII4lSCr4VMZFS0ZJXpHNEliqXpLptRwVKLDY9T71pJBaPS/rW31bQsZDY4ee2k/KdMJ/289bC/XKdTMuKCAq8apalf5diH7Tv+9yxnqNSx957wVCVTXCXj/o7aDMkZR/u6Rss4DexEMxfKhMpAOKdboueH3JuI9veVGzSboXz5nVOzs6IZ2+fq01weoyXouPHiQ6hVTML4O3Fi3/pBqMvc4Q33g+8G7KoI154PxVBaAuXsY3OBu0Cww0SPY/CJhbAV1mL9BIR+CqSNIC0g5aEYlZSKg6LhaeLCFOq6MCWFZvcansQ99gna8u5n1Z4wSoVI4iLVqDvJGcJNn8SGrTpiFBIkge6gF6wLAzORrc1Rv2Tq3AA==; 5:oAujey5tGZnN3t1UgMtuGZySiM6LQn6roHI1vTzDC4Ejxk0UIOu5bSbR6q9PIUf8b3ItO3mzSSrU/pZjlZX+szpQmVbH67QH8o6coudDhkfw9KuyWjpb/F9XkjCCxnx/WtYOUP1tWEytj8YrTwcLgIlBGbyseXuaP/zgOCTSSQ4=; 7:fEy3YvTgXx9PD37dCejlztxPuBGb5wujtGmFTWm1UiZonpSb6nrRVYsic57Vnguk84dWRdzKjWmo2wXUXC/o6v8S69HXeVDsnOuOB09Oc0rwNNFM0ovg532FxMB1Ei2eW+WcK957nYr2EviAUzDgSzaRz71qjV8qaCIK1605ek+/sfAVwuH3HnpOKuA2GE09I5I4UxEYWxViPJIow3PW9WGNUZyOGkX+xoCUqeNPJ56OgG3jXgAbtRDOVDjPufgR x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 0a8521b5-fa24-41e3-60cc-08d5edf656f2 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(48565401081)(2017052603328)(7153060)(7193020); SRVR:AM6PR0402MB3846; x-ms-traffictypediagnostic: AM6PR0402MB3846: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(162533806227266)(45079756050767); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM6PR0402MB3846; BCL:0; PCL:0; RULEID:; SRVR:AM6PR0402MB3846; x-forefront-prvs: 073966E86B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(346002)(376002)(396003)(39860400002)(13464003)(189003)(199004)(53234004)(966005)(5660300001)(44832011)(25786009)(575784001)(86362001)(486006)(7736002)(68736007)(8936002)(74316002)(14454004)(26005)(476003)(305945005)(4326008)(53546011)(6506007)(66066001)(7696005)(76176011)(99286004)(102836004)(45080400002)(2906002)(186003)(55236004)(478600001)(39060400002)(316002)(5250100002)(6436002)(106356001)(11346002)(105586002)(97736004)(110136005)(33656002)(256004)(14444005)(6246003)(446003)(229853002)(53936002)(3846002)(6116002)(81156014)(55016002)(2900100001)(6306002)(9686003)(8676002)(81166006); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR0402MB3846; H:AM6PR0402MB3334.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: iU/p0ammrv+QSX9KMhEWSo6Q/JUDkXR8h8Z3uiKANPZCYFfLrmQbNYvpEgUbhvya9yv92AHzfFwUfgenaU/UNtVUiPdCj0THh9/OSaGmXYdY460ABCg1tgl9tW489RpRjk/A7cmpHIJmR05pmSr6Js5t5nhaj0YMO5OjpvPIegrHSEDTk4WJmEmn69T9EopseoKL15CFHoxhiqnmhKV6PvkJIXxdpPgpgUpmpsi1MXPq6v9WkSkifCaiKgkBh4zOPbyfykgQOqm7h88gncjiiOtww0Vw8vB4un4xYyzluMJviwvJMI0pkqXYvkmkO4FqWccBpF+x0lVRgnvfdO7ci513TGBgxUpJ8AFAUM4xnrI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0a8521b5-fa24-41e3-60cc-08d5edf656f2 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2018 04:07:41.7693 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3846 Subject: Re: Help on AutoGen Files X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Jul 2018 04:07:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Andrew and Marvin, > You cannot explicitly influence the order of the calls, but implicitly vi= a the > dependency tree, which means you need to make SerialPortLib depend on you= r > LibraryClass instance. Looks this is difficult that I can force order on already available code.=20 > Worst case you can demote FpgaInterfaceInit () from being a constructor t= o just Currently I am forcing the clock lib to call FpgaInterfaceInit first, this = clock lib=20 gives input clock to PL011 serial driver.=20 Regards Udit > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Andrew Fish > Sent: Thursday, July 19, 2018 11:56 PM > To: Marvin H?user > Cc: edk2-devel@lists.01.org > Subject: Re: [edk2] Help on AutoGen Files >=20 > Udit, >=20 > As Marvin points out the [LibraryClasses] section of the INF file are goi= ng to > imply the order of the library constructor calls in the AutoGen >=20 > Worst case you can demote FpgaInterfaceInit () from being a constructor t= o just > being a public library function that the other lib can call explicitly fr= om its > constructor. Maybe that is too drastic and you could must move a function= out > of FpgaInterfaceInit () and make that function part of the Public library > interface? >=20 > Thanks, >=20 > Andrew Fish >=20 > > On Jul 19, 2018, at 11:14 AM, Marvin H?user > wrote: > > > > Hey Udit, > > > > You cannot explicitly influence the order of the calls, but implicitly = via the > dependency tree, which means you need to make SerialPortLib depend on you= r > LibraryClass instance. > > You did not mention which SerialPortLib instance you use, but probably = you > need to execute FpgaInterfaceInit() earlier in platform code or fork Seri= alPortLib > for now. > > > > Regards, > > Marvin > > > >> -----Original Message----- > >> From: edk2-devel On Behalf Of Udit > >> Kumar > >> Sent: Thursday, July 19, 2018 9:33 AM > >> To: edk2-devel@lists.01.org > >> Subject: [edk2] Help on AutoGen Files > >> > >> Hi Experts, > >> How I can change the order of initialization in Constructor list of au= togen file. > >> In my build system, if I look at > >> MdeModulePkg/Universal/PCD/Pei/Pcd/DEBUG/AutoGen.c > >> Below is function of Library Constructor List > >> > >> VOID > >> EFIAPI > >> ProcessLibraryConstructorList ( > >> IN EFI_PEI_FILE_HANDLE FileHandle, > >> IN CONST EFI_PEI_SERVICES **PeiServices > >> ) > >> { > >> EFI_STATUS Status; > >> > >> Status =3D BaseDebugLibSerialPortConstructor (); ASSERT_EFI_ERROR > >> (Status); > >> > >> Status =3D PeiServicesTablePointerLibConstructor (FileHandle, > >> PeiServices); ASSERT_EFI_ERROR (Status); > >> > >> Status =3D TimerConstructor (); > >> ASSERT_EFI_ERROR (Status); > >> > >> Status =3D FpgaInterfaceInit (); > >> ASSERT_EFI_ERROR (Status); > >> > >> } > >> > >> > >> My problem is SerialPortConstructor needs frequency, which can be > >> retrieved after FpgaInterfaceInit() Therefore, my preferred way for > >> this constructor list will be > >> FpgaInterfaceInit() followed by BaseDebugLibSerialPortConstructor() > >> > >> how I can achieve this. > >> > >> > >> Many Thanks > >> Udit > >> _______________________________________________ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fl= i > >> sts.01.org%2Fmailman%2Flistinfo%2Fedk2- > devel&data=3D02%7C01%7Cudit. > >> > kumar%40nxp.com%7C5df5baccbdde4daa481808d5eda51660%7C686ea1d3bc2 > b4c6f > >> > a92cd99c5c301635%7C0%7C0%7C636676215665542230&sdata=3D6CnFNG5 > t05yH% > >> 2FOSYpcbp%2F1gWQenUyWcJ%2Fb7C0Yt1n5Y%3D&reserved=3D0 > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fli= s > > ts.01.org%2Fmailman%2Flistinfo%2Fedk2- > devel&data=3D02%7C01%7Cudit.ku > > > mar%40nxp.com%7C5df5baccbdde4daa481808d5eda51660%7C686ea1d3bc2b4 > c6fa92 > > > cd99c5c301635%7C0%7C0%7C636676215665542230&sdata=3D6CnFNG5t05y > H%2FOS > > Ypcbp%2F1gWQenUyWcJ%2Fb7C0Yt1n5Y%3D&reserved=3D0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://emea01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Flist= s.01 > .org%2Fmailman%2Flistinfo%2Fedk2- > devel&data=3D02%7C01%7Cudit.kumar%40nxp.com%7C5df5baccbdde4daa4 > 81808d5eda51660%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636 > 676215665542230&sdata=3D6CnFNG5t05yH%2FOSYpcbp%2F1gWQenUyWcJ > %2Fb7C0Yt1n5Y%3D&reserved=3D0