Home | History | Annotate | Download | only in DxeCoreEntryPoint
      1 /** @file
      2   Entry point to the DXE Core.
      3 
      4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
      5 This program and the accompanying materials
      6 are licensed and made available under the terms and conditions of the BSD License
      7 which accompanies this distribution.  The full text of the license may be found at
      8 http://opensource.org/licenses/bsd-license.php.
      9 
     10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13 **/
     14 
     15 
     16 #include <PiDxe.h>
     17 
     18 
     19 #include <Library/DxeCoreEntryPoint.h>
     20 #include <Library/DebugLib.h>
     21 #include <Library/BaseLib.h>
     22 
     23 //
     24 // Cache copy of HobList pointer.
     25 //
     26 VOID *gHobList = NULL;
     27 
     28 /**
     29   The entry point of PE/COFF Image for the DXE Core.
     30 
     31   This function is the entry point for the DXE Core. This function is required to call
     32   ProcessModuleEntryPointList() and ProcessModuleEntryPointList() is never expected to return.
     33   The DXE Core is responsible for calling ProcessLibraryConstructorList() as soon as the EFI
     34   System Table and the image handle for the DXE Core itself have been established.
     35   If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
     36 
     37   @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase.
     38 
     39 **/
     40 VOID
     41 EFIAPI
     42 _ModuleEntryPoint (
     43   IN VOID  *HobStart
     44   )
     45 {
     46   //
     47   // Cache a pointer to the HobList
     48   //
     49   gHobList = HobStart;
     50 
     51   //
     52   // Call the DXE Core entry point
     53   //
     54   ProcessModuleEntryPointList (HobStart);
     55 
     56   //
     57   // Should never return
     58   //
     59   ASSERT(FALSE);
     60   CpuDeadLoop ();
     61 }
     62 
     63 
     64 /**
     65   Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
     66 
     67   This function is required to call _ModuleEntryPoint() passing in HobStart.
     68 
     69   @param  HobStart  The pointer to the beginning of the HOB List passed in from the PEI Phase.
     70 
     71 **/
     72 VOID
     73 EFIAPI
     74 EfiMain (
     75   IN VOID  *HobStart
     76   )
     77 {
     78   _ModuleEntryPoint (HobStart);
     79 }
     80