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 your 
LibraryClass instance.
You did not mention which SerialPortLib instance you use, but probably you need 
to execute FpgaInterfaceInit() earlier in platform code or fork SerialPortLib 
for now.

Regards,
Marvin

> -----Original Message-----
> From: edk2-devel <edk2-devel-boun...@lists.01.org> 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 autogen 
> 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 = BaseDebugLibSerialPortConstructor ();
>   ASSERT_EFI_ERROR (Status);
> 
>   Status = PeiServicesTablePointerLibConstructor (FileHandle, PeiServices);
>   ASSERT_EFI_ERROR (Status);
> 
>   Status = TimerConstructor ();
>   ASSERT_EFI_ERROR (Status);
> 
>   Status = 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://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to