The drivers publish their sequence requirement in a [Depex] statement in their 
INF file. When the conditions in the Depex are TRUE the driver is dispatched. 

UEFI_DRIVER(s) do not have a Depex of TRUE, they have an implicit Depex of 
CoreAllEfiServicesAvailable().  So basically no Depex mean you depend on all 
the UEFI services being available, it is not a Depex of TRUE. 

The UEFI drivers generally produce DriverBinding protocol, so all they do in 
their entry point is register this protocol. The BDS then uses platform policy 
to decide what drivers need to be started to boot. 

Thanks,

Andrew Fish


The dispatcher code lives in the DXE Core: 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c

CoreAllEfiServicesAvailable () : 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c

EFI_CORE_PROTOCOL_NOTIFY_ENTRY  mArchProtocols[] = {
  { &gEfiSecurityArchProtocolGuid,         (VOID **)&gSecurity,      NULL, 
NULL, FALSE },
  { &gEfiCpuArchProtocolGuid,              (VOID **)&gCpu,           NULL, 
NULL, FALSE },
  { &gEfiMetronomeArchProtocolGuid,        (VOID **)&gMetronome,     NULL, 
NULL, FALSE },
  { &gEfiTimerArchProtocolGuid,            (VOID **)&gTimer,         NULL, 
NULL, FALSE },
  { &gEfiBdsArchProtocolGuid,              (VOID **)&gBds,           NULL, 
NULL, FALSE },
  { &gEfiWatchdogTimerArchProtocolGuid,    (VOID **)&gWatchdogTimer, NULL, 
NULL, FALSE },
  { &gEfiRuntimeArchProtocolGuid,          (VOID **)&gRuntime,       NULL, 
NULL, FALSE },
  { &gEfiVariableArchProtocolGuid,         (VOID **)NULL,            NULL, 
NULL, FALSE },
  { &gEfiVariableWriteArchProtocolGuid,    (VOID **)NULL,            NULL, 
NULL, FALSE },
  { &gEfiCapsuleArchProtocolGuid,          (VOID **)NULL,            NULL, 
NULL, FALSE },
  { &gEfiMonotonicCounterArchProtocolGuid, (VOID **)NULL,            NULL, 
NULL, FALSE },
  { &gEfiResetArchProtocolGuid,            (VOID **)NULL,            NULL, 
NULL, FALSE },
  { &gEfiRealTimeClockArchProtocolGuid,    (VOID **)NULL,            NULL, 
NULL, FALSE },
  { NULL,                                  (VOID **)NULL,            NULL, 
NULL, FALSE }
};
/**
  Return TRUE if all AP services are availible.

  @retval EFI_SUCCESS    All AP services are available
  @retval EFI_NOT_FOUND  At least one AP service is not available

**/
EFI_STATUS
CoreAllEfiServicesAvailable (
  VOID
  )
{
  EFI_CORE_PROTOCOL_NOTIFY_ENTRY  *Entry;

  for (Entry = mArchProtocols; Entry->ProtocolGuid != NULL; Entry++) {
    if (!Entry->Present) {
      return EFI_NOT_FOUND;
    }
  }
  return EFI_SUCCESS;
}
https://svn.code.sf.net/p/edk2/code/trunk/edk2/MdePkg/Include/Protocol/DriverBinding.h


On Apr 8, 2014, at 5:42 PM, manish mahajan <[email protected]> wrote:

> Thanks Laurie. Which file decides the sequence of executing ENTRY_POINT 
> functions of DXE drivers? Which file controls the bootup sequence?
> 
> 
> Thanks,
> Manish
>  
> 
> 
> On Tue, Apr 8, 2014 at 4:10 PM, Jarlstrom, Laurie 
> <[email protected]> wrote:
> You need to also add your new driver to your .fdf platform file.
> 
>  
> 
> thanks,
> 
> Laurie
> 
>  
> 
> [email protected]
> 
> EFI / Framework Technical
> 
> Marketing Engineering Team
> 
> (503) 712-9395
> 
> From: manish mahajan [mailto:[email protected]] 
> Sent: Tuesday, April 08, 2014 4:01 PM
> To: [email protected]
> Subject: [edk2] Entry point for DXE_DRIVER module
> 
>  
> 
> Hi All,
> 
>  
> 
> I have added a new DXE_DRIVER module. I want to make sure that this 
> DXE_DRIVER is getting invoked during boot up process.
> 
>  
> 
> [Defines]
> 
>   INF_VERSION                    = 0x00010005
> 
>   BASE_NAME                      = UefiMainSample
> 
>   FILE_GUID                      = 7C04A583-9E3E-4f1c-AD65-E05268D0B4D1
> 
>   MODULE_TYPE                    = DXE_DRIVER
> 
>   VERSION_STRING                 = 0.1
> 
>   ENTRY_POINT                    = UefiMain
> 
>  
> 
> I have added my new .inf file before Bds.inf, so that UefiMain will be called 
> before Bds Module.
> 
>  
> 
> To make sure that UefiMain function is called during bootup, I added while(1) 
> loop in UefiMain(). But still I can see Boot Options. 
> 
>  
> 
> That means my UefiMain function is not called, since it did not "hang". 
> Please advice me in this case.
> 
>  
> 
> Thanks,
> Manish
>  
> 
> 
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment 
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to