]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Make end of line consistent caused by previous check in.
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Aug 2009 15:35:55 +0000 (15:35 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 24 Aug 2009 15:35:55 +0000 (15:35 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9183 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Universal/Network/UefiPxeBcDxe/Arm/PxeArch.h
MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h

index 3d8c00ce786f4209e07baf00cefb871c8d6b38ab..14c8466476c1e8b167a6b06fc949852ab4a4e814 100644 (file)
-/** @file
-  DXE Core Main Entry Point
-
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "DxeMain.h"
-
-//
-// DXE Core Global Variables for Protocols from PEI
-//
-EFI_HANDLE                                mDecompressHandle = NULL;
-
-//
-// DXE Core globals for Architecture Protocols
-//
-EFI_SECURITY_ARCH_PROTOCOL        *gSecurity      = NULL;
-EFI_CPU_ARCH_PROTOCOL             *gCpu           = NULL;
-EFI_METRONOME_ARCH_PROTOCOL       *gMetronome     = NULL;
-EFI_TIMER_ARCH_PROTOCOL           *gTimer         = NULL;
-EFI_BDS_ARCH_PROTOCOL             *gBds           = NULL;
-EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *gWatchdogTimer = NULL;
-
-//
-// DXE Core Global used to update core loaded image protocol handle
-//
-EFI_GUID                           *gDxeCoreFileName;
-EFI_LOADED_IMAGE_PROTOCOL          *gDxeCoreLoadedImage;
-
-//
-// DXE Core Module Variables
-//
-EFI_BOOT_SERVICES mBootServices = {
-  {
-    EFI_BOOT_SERVICES_SIGNATURE,                                                          // Signature
-    EFI_BOOT_SERVICES_REVISION,                                                           // Revision
-    sizeof (EFI_BOOT_SERVICES),                                                           // HeaderSize
-    0,                                                                                    // CRC32
-    0                                                                                     // Reserved
-  },
-  (EFI_RAISE_TPL)                               CoreRaiseTpl,                             // RaiseTPL
-  (EFI_RESTORE_TPL)                             CoreRestoreTpl,                           // RestoreTPL
-  (EFI_ALLOCATE_PAGES)                          CoreAllocatePages,                        // AllocatePages
-  (EFI_FREE_PAGES)                              CoreFreePages,                            // FreePages
-  (EFI_GET_MEMORY_MAP)                          CoreGetMemoryMap,                         // GetMemoryMap
-  (EFI_ALLOCATE_POOL)                           CoreAllocatePool,                         // AllocatePool
-  (EFI_FREE_POOL)                               CoreFreePool,                             // FreePool
-  (EFI_CREATE_EVENT)                            CoreCreateEvent,                          // CreateEvent
-  (EFI_SET_TIMER)                               CoreSetTimer,                             // SetTimer
-  (EFI_WAIT_FOR_EVENT)                          CoreWaitForEvent,                         // WaitForEvent
-  (EFI_SIGNAL_EVENT)                            CoreSignalEvent,                          // SignalEvent
-  (EFI_CLOSE_EVENT)                             CoreCloseEvent,                           // CloseEvent
-  (EFI_CHECK_EVENT)                             CoreCheckEvent,                           // CheckEvent
-  (EFI_INSTALL_PROTOCOL_INTERFACE)              CoreInstallProtocolInterface,             // InstallProtocolInterface
-  (EFI_REINSTALL_PROTOCOL_INTERFACE)            CoreReinstallProtocolInterface,           // ReinstallProtocolInterface
-  (EFI_UNINSTALL_PROTOCOL_INTERFACE)            CoreUninstallProtocolInterface,           // UninstallProtocolInterface
-  (EFI_HANDLE_PROTOCOL)                         CoreHandleProtocol,                       // HandleProtocol
-  (VOID *)                                      NULL,                                     // Reserved
-  (EFI_REGISTER_PROTOCOL_NOTIFY)                CoreRegisterProtocolNotify,               // RegisterProtocolNotify
-  (EFI_LOCATE_HANDLE)                           CoreLocateHandle,                         // LocateHandle
-  (EFI_LOCATE_DEVICE_PATH)                      CoreLocateDevicePath,                     // LocateDevicePath
-  (EFI_INSTALL_CONFIGURATION_TABLE)             CoreInstallConfigurationTable,            // InstallConfigurationTable
-  (EFI_IMAGE_LOAD)                              CoreLoadImage,                            // LoadImage
-  (EFI_IMAGE_START)                             CoreStartImage,                           // StartImage
-  (EFI_EXIT)                                    CoreExit,                                 // Exit
-  (EFI_IMAGE_UNLOAD)                            CoreUnloadImage,                          // UnloadImage
-  (EFI_EXIT_BOOT_SERVICES)                      CoreExitBootServices,                     // ExitBootServices
-  (EFI_GET_NEXT_MONOTONIC_COUNT)                CoreEfiNotAvailableYetArg1,               // GetNextMonotonicCount
-  (EFI_STALL)                                   CoreStall,                                // Stall
-  (EFI_SET_WATCHDOG_TIMER)                      CoreSetWatchdogTimer,                     // SetWatchdogTimer
-  (EFI_CONNECT_CONTROLLER)                      CoreConnectController,                    // ConnectController
-  (EFI_DISCONNECT_CONTROLLER)                   CoreDisconnectController,                 // DisconnectController
-  (EFI_OPEN_PROTOCOL)                           CoreOpenProtocol,                         // OpenProtocol
-  (EFI_CLOSE_PROTOCOL)                          CoreCloseProtocol,                        // CloseProtocol
-  (EFI_OPEN_PROTOCOL_INFORMATION)               CoreOpenProtocolInformation,              // OpenProtocolInformation
-  (EFI_PROTOCOLS_PER_HANDLE)                    CoreProtocolsPerHandle,                   // ProtocolsPerHandle
-  (EFI_LOCATE_HANDLE_BUFFER)                    CoreLocateHandleBuffer,                   // LocateHandleBuffer
-  (EFI_LOCATE_PROTOCOL)                         CoreLocateProtocol,                       // LocateProtocol
-  (EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)    CoreInstallMultipleProtocolInterfaces,    // InstallMultipleProtocolInterfaces
-  (EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)  CoreUninstallMultipleProtocolInterfaces,  // UninstallMultipleProtocolInterfaces
-  (EFI_CALCULATE_CRC32)                         CoreEfiNotAvailableYetArg3,               // CalculateCrc32
-  (EFI_COPY_MEM)                                CopyMem,                                  // CopyMem
-  (EFI_SET_MEM)                                 SetMem,                                   // SetMem
-  (EFI_CREATE_EVENT_EX)                         CoreCreateEventEx                         // CreateEventEx
-};
-
-EFI_DXE_SERVICES mDxeServices = {
-  {
-    DXE_SERVICES_SIGNATURE,                                           // Signature
-    DXE_SERVICES_REVISION,                                            // Revision
-    sizeof (DXE_SERVICES),                                            // HeaderSize
-    0,                                                                    // CRC32
-    0                                                                     // Reserved
-  },
-  (EFI_ADD_MEMORY_SPACE)             CoreAddMemorySpace,                  // AddMemorySpace
-  (EFI_ALLOCATE_MEMORY_SPACE)        CoreAllocateMemorySpace,             // AllocateMemorySpace
-  (EFI_FREE_MEMORY_SPACE)            CoreFreeMemorySpace,                 // FreeMemorySpace
-  (EFI_REMOVE_MEMORY_SPACE)          CoreRemoveMemorySpace,               // RemoveMemorySpace
-  (EFI_GET_MEMORY_SPACE_DESCRIPTOR)  CoreGetMemorySpaceDescriptor,        // GetMemorySpaceDescriptor
-  (EFI_SET_MEMORY_SPACE_ATTRIBUTES)  CoreSetMemorySpaceAttributes,        // SetMemorySpaceAttributes
-  (EFI_GET_MEMORY_SPACE_MAP)         CoreGetMemorySpaceMap,               // GetMemorySpaceMap
-  (EFI_ADD_IO_SPACE)                 CoreAddIoSpace,                      // AddIoSpace
-  (EFI_ALLOCATE_IO_SPACE)            CoreAllocateIoSpace,                 // AllocateIoSpace
-  (EFI_FREE_IO_SPACE)                CoreFreeIoSpace,                     // FreeIoSpace
-  (EFI_REMOVE_IO_SPACE)              CoreRemoveIoSpace,                   // RemoveIoSpace
-  (EFI_GET_IO_SPACE_DESCRIPTOR)      CoreGetIoSpaceDescriptor,            // GetIoSpaceDescriptor
-  (EFI_GET_IO_SPACE_MAP)             CoreGetIoSpaceMap,                   // GetIoSpaceMap
-  (EFI_DISPATCH)                     CoreDispatcher,                      // Dispatch
-  (EFI_SCHEDULE)                     CoreSchedule,                        // Schedule
-  (EFI_TRUST)                        CoreTrust,                           // Trust
-  (EFI_PROCESS_FIRMWARE_VOLUME)      CoreProcessFirmwareVolume,           // ProcessFirmwareVolume
-};
-
-EFI_SYSTEM_TABLE mEfiSystemTableTemplate = {
-  {
-    EFI_SYSTEM_TABLE_SIGNATURE,                                           // Signature
-    EFI_SYSTEM_TABLE_REVISION,                                            // Revision
-    sizeof (EFI_SYSTEM_TABLE),                                            // HeaderSize
-    0,                                                                    // CRC32
-    0                                                                     // Reserved
-  },
-  NULL,                                                                   // FirmwareVendor
-  0,                                                                      // FirmwareRevision
-  NULL,                                                                   // ConsoleInHandle
-  NULL,                                                                   // ConIn
-  NULL,                                                                   // ConsoleOutHandle
-  NULL,                                                                   // ConOut
-  NULL,                                                                   // StandardErrorHandle
-  NULL,                                                                   // StdErr
-  NULL,                                                                   // RuntimeServices
-  &mBootServices,                                                         // BootServices
-  0,                                                                      // NumberOfConfigurationTableEntries
-  NULL                                                                    // ConfigurationTable
-};
-
-EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {
-  {
-    EFI_RUNTIME_SERVICES_SIGNATURE,                               // Signature
-    EFI_RUNTIME_SERVICES_REVISION,                                // Revision
-    sizeof (EFI_RUNTIME_SERVICES),                                // HeaderSize
-    0,                                                            // CRC32
-    0                                                             // Reserved
-  },
-  (EFI_GET_TIME)                    CoreEfiNotAvailableYetArg2,   // GetTime
-  (EFI_SET_TIME)                    CoreEfiNotAvailableYetArg1,   // SetTime
-  (EFI_GET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg3,   // GetWakeupTime
-  (EFI_SET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg2,   // SetWakeupTime
-  (EFI_SET_VIRTUAL_ADDRESS_MAP)     CoreEfiNotAvailableYetArg4,   // SetVirtualAddressMap
-  (EFI_CONVERT_POINTER)             CoreEfiNotAvailableYetArg2,   // ConvertPointer
-  (EFI_GET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // GetVariable
-  (EFI_GET_NEXT_VARIABLE_NAME)      CoreEfiNotAvailableYetArg3,   // GetNextVariableName
-  (EFI_SET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // SetVariable
-  (EFI_GET_NEXT_HIGH_MONO_COUNT)    CoreEfiNotAvailableYetArg1,   // GetNextHighMonotonicCount
-  (EFI_RESET_SYSTEM)                CoreEfiNotAvailableYetArg4,   // ResetSystem
-  (EFI_UPDATE_CAPSULE)              CoreEfiNotAvailableYetArg3,   // UpdateCapsule
-  (EFI_QUERY_CAPSULE_CAPABILITIES)  CoreEfiNotAvailableYetArg4,   // QueryCapsuleCapabilities
-  (EFI_QUERY_VARIABLE_INFO)         CoreEfiNotAvailableYetArg4    // QueryVariableInfo
-};
-
-EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {
-  INITIALIZE_LIST_HEAD_VARIABLE (gRuntimeTemplate.ImageHead),
-  INITIALIZE_LIST_HEAD_VARIABLE (gRuntimeTemplate.EventHead),
-
-  //
-  // Make sure Size != sizeof (EFI_MEMORY_DESCRIPTOR). This will
-  // prevent people from having pointer math bugs in their code.
-  // now you have to use *DescriptorSize to make things work.
-  //
-  sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),
-  EFI_MEMORY_DESCRIPTOR_VERSION,
-  0,
-  NULL,
-  NULL,
-  FALSE,
-  FALSE
-};
-
-EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;
-
-//
-// DXE Core Global Variables for the EFI System Table, Boot Services Table,
-// DXE Services Table, and Runtime Services Table
-//
-EFI_DXE_SERVICES      *gDxeCoreDS = &mDxeServices;
-EFI_SYSTEM_TABLE      *gDxeCoreST = NULL;
-
-//
-// For debug initialize gDxeCoreRT to template. gDxeCoreRT must be allocated from RT memory
-//  but gDxeCoreRT is used for ASSERT () and DEBUG () type macros so lets give it
-//  a value that will not cause debug infrastructure to crash early on.
-//
-EFI_RUNTIME_SERVICES  *gDxeCoreRT = &mEfiRuntimeServicesTableTemplate;
-EFI_HANDLE            gDxeCoreImageHandle = NULL;
-
-
-//
-// EFI Decompress Protocol
-//
-EFI_DECOMPRESS_PROTOCOL  gEfiDecompress = {
-  DxeMainUefiDecompressGetInfo,
-  DxeMainUefiDecompress
-};
-
-//
-// Main entry point to the DXE Core
-//
-
-/**
-  Main entry point to DXE Core.
-
-  @param  HobStart               Pointer to the beginning of the HOB List from PEI.
-
-  @return This function should never return.
-
-**/
-VOID
-EFIAPI
-DxeMain (
-  IN  VOID *HobStart
-  )
-{
-  EFI_STATUS                         Status;
-  EFI_PHYSICAL_ADDRESS               MemoryBaseAddress;
-  UINT64                             MemoryLength;
-
-  //
-  // Initialize Memory Services
-  //
-  CoreInitializeMemoryServices (&HobStart, &MemoryBaseAddress, &MemoryLength);
-
-  //
-  // Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData
-  // Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table
-  //
-  gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);
-  ASSERT (gDxeCoreST != NULL);
-
-  gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);
-  ASSERT (gDxeCoreRT != NULL);
-
-  gDxeCoreST->RuntimeServices = gDxeCoreRT;
-
-  //
-  // Start the Image Services.
-  //
-  Status = CoreInitializeImageServices (HobStart);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Call constructor for all libraries
-  //
-  ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);
-  PERF_END   (NULL,"PEI", NULL, 0) ;
-  PERF_START (NULL,"DXE", NULL, 0) ;
-
-  //
-  // Initialize the Global Coherency Domain Services
-  //
-  Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Install the DXE Services Table into the EFI System Tables's Configuration Table
-  //
-  Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDxeCoreDS);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Install the HOB List into the EFI System Tables's Configuration Table
-  //
-  Status = CoreInstallConfigurationTable (&gEfiHobListGuid, HobStart);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Install Memory Type Information Table into the EFI System Tables's Configuration Table
-  //
-  Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Report Status Code here for DXE_ENTRY_POINT once it is available
-  //
-  REPORT_STATUS_CODE (
-    EFI_PROGRESS_CODE,
-    FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry)
-    );
-
-  //
-  // Create the aligned system table pointer structure that is used by external
-  // debuggers to locate the system table...  Also, install debug image info
-  // configuration table.
-  //
-  CoreInitializeDebugImageInfoTable ();
-  CoreNewDebugImageInfoEntry (
-    EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL,
-    gDxeCoreLoadedImage,
-    gDxeCoreImageHandle
-    );
-
-  DEBUG ((DEBUG_INFO | DEBUG_LOAD, "HOBLIST address in DXE = 0x%p\n", HobStart));
-
-  DEBUG_CODE_BEGIN ();
-    EFI_PEI_HOB_POINTERS               Hob;
-
-    for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {
-      if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Memory Allocation %08x %0lx - %0lx\n", \
-          Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress,               \
-          Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress + Hob.MemoryAllocation->AllocDescriptor.MemoryLength - 1, \
-          Hob.MemoryAllocation->AllocDescriptor.MemoryType));
-      }
-    }
-    for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {
-      if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV2) {
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV2 Hob           %08x %0lx - %0lx\n", Hob.FirmwareVolume2->BaseAddress, Hob.FirmwareVolume2->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));
-      } else if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV) {
-        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV Hob            %08x %0lx - %0lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));
-      }
-    }
-  DEBUG_CODE_END ();
-
-  //
-  // Initialize the Event Services
-  //
-  Status = CoreInitializeEventServices ();
-  ASSERT_EFI_ERROR (Status);
-
-
-  //
-  // Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs
-  //
-  // These Protocols are not architectural. This implementation is sharing code between
-  // PEI and DXE in order to save FLASH space. These Protocols could also be implemented
-  // as part of the DXE Core. However, that would also require the DXE Core to be ported
-  // each time a different CPU is used, a different Decompression algorithm is used, or a
-  // different Image type is used. By placing these Protocols in PEI, the DXE Core remains
-  // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,
-  // and from CPU to CPU.
-  //
-
-  //
-  // Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components
-  //
-  Status = CoreInstallMultipleProtocolInterfaces (
-             &mDecompressHandle,
-             &gEfiDecompressProtocolGuid,           &gEfiDecompress,
-             NULL
-             );
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Register for the GUIDs of the Architectural Protocols, so the rest of the
-  // EFI Boot Services and EFI Runtime Services tables can be filled in.
-  //
-  CoreNotifyOnArchProtocolInstallation ();
-
-  //
-  // Produce Firmware Volume Protocols, one for each FV in the HOB list.
-  //
-  Status = FwVolBlockDriverInit (gDxeCoreImageHandle, gDxeCoreST);
-  ASSERT_EFI_ERROR (Status);
-
-  Status = FwVolDriverInit (gDxeCoreImageHandle, gDxeCoreST);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Produce the Section Extraction Protocol
-  //
-  Status = InitializeSectionExtraction (gDxeCoreImageHandle, gDxeCoreST);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Initialize the DXE Dispatcher
-  //
-  PERF_START (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;
-  CoreInitializeDispatcher ();
-  PERF_END (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;
-
-  //
-  // Invoke the DXE Dispatcher
-  //
-  PERF_START (NULL, "CoreDispatcher", "DxeMain", 0);
-  CoreDispatcher ();
-  PERF_END (NULL, "CoreDispatcher", "DxeMain", 0);
-
-  //
-  // Display Architectural protocols that were not loaded if this is DEBUG build
-  //
-  DEBUG_CODE_BEGIN ();
-    CoreDisplayMissingArchProtocols ();
-  DEBUG_CODE_END ();
-
-  //
-  // Display any drivers that were not dispatched because dependency expression
-  // evaluated to false if this is a debug build
-  //
-  DEBUG_CODE_BEGIN ();
-    CoreDisplayDiscoveredNotDispatched ();
-  DEBUG_CODE_END ();
-
-  //
-  // Assert if the Architectural Protocols are not present.
-  //
-  ASSERT_EFI_ERROR (CoreAllEfiServicesAvailable ());
-
-  //
-  // Report Status code before transfer control to BDS
-  //
-  REPORT_STATUS_CODE (
-    EFI_PROGRESS_CODE,
-    FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds)
-    );
-
-  //
-  // Transfer control to the BDS Architectural Protocol
-  //
-  gBds->Entry (gBds);
-
-  //
-  // BDS should never return
-  //
-  ASSERT (FALSE);
-  CpuDeadLoop ();
-}
-
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are
-  available.
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg0 (
-  VOID
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are
-  available.
-
-  @param  Arg1                   Undefined
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg1 (
-  UINTN Arg1
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are available.
-
-  @param  Arg1                   Undefined
-  @param  Arg2                   Undefined
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg2 (
-  UINTN Arg1,
-  UINTN Arg2
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are available.
-
-  @param  Arg1                   Undefined
-  @param  Arg2                   Undefined
-  @param  Arg3                   Undefined
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg3 (
-  UINTN Arg1,
-  UINTN Arg2,
-  UINTN Arg3
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are available.
-
-  @param  Arg1                   Undefined
-  @param  Arg2                   Undefined
-  @param  Arg3                   Undefined
-  @param  Arg4                   Undefined
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg4 (
-  UINTN Arg1,
-  UINTN Arg2,
-  UINTN Arg3,
-  UINTN Arg4
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Place holder function until all the Boot Services and Runtime Services are available.
-
-  @param  Arg1                   Undefined
-  @param  Arg2                   Undefined
-  @param  Arg3                   Undefined
-  @param  Arg4                   Undefined
-  @param  Arg5                   Undefined
-
-  @return EFI_NOT_AVAILABLE_YET
-
-**/
-EFI_STATUS
-EFIAPI
-CoreEfiNotAvailableYetArg5 (
-  UINTN Arg1,
-  UINTN Arg2,
-  UINTN Arg3,
-  UINTN Arg4,
-  UINTN Arg5
-  )
-{
-  //
-  // This function should never be executed.  If it does, then the architectural protocols
-  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the
-  // DXE Core and all the Architectural Protocols are complete.
-  //
-
-  return EFI_NOT_AVAILABLE_YET;
-}
-
-
-/**
-  Calcualte the 32-bit CRC in a EFI table using the service provided by the
-  gRuntime service.
-
-  @param  Hdr                    Pointer to an EFI standard header
-
-**/
-VOID
-CalculateEfiHdrCrc (
-  IN  OUT EFI_TABLE_HEADER    *Hdr
-  )
-{
-  UINT32 Crc;
-
-  Hdr->CRC32 = 0;
-
-  //
-  // If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then
-  //  Crc will come back as zero if we set it to zero here
-  //
-  Crc = 0;
-  gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);
-  Hdr->CRC32 = Crc;
-}
-
-
-/**
-  Terminates all boot services.
-
-  @param  ImageHandle            Handle that identifies the exiting image.
-  @param  MapKey                 Key to the latest memory map.
-
-  @retval EFI_SUCCESS            Boot Services terminated
-  @retval EFI_INVALID_PARAMETER  MapKey is incorrect.
-
-**/
-EFI_STATUS
-EFIAPI
-CoreExitBootServices (
-  IN EFI_HANDLE   ImageHandle,
-  IN UINTN        MapKey
-  )
-{
-  EFI_STATUS                Status;
-
-  //
-  // Terminate memory services if the MapKey matches
-  //
-  Status = CoreTerminateMemoryMap (MapKey);
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
-  //
-  // Disable Timer
-  //
-  gTimer->SetTimerPeriod (gTimer, 0);
-
-  //
-  // Notify other drivers that we are exiting boot services.
-  //
-  CoreNotifySignalList (&gEfiEventExitBootServicesGuid);
-
-  //
-  // Disable CPU Interrupts
-  //
-  gCpu->DisableInterrupt (gCpu);
-
-  //
-  // Report that ExitBootServices() has been called
-  //
-  REPORT_STATUS_CODE (
-    EFI_PROGRESS_CODE,
-    FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)
-    );
-
-  //
-  // Clear the non-runtime values of the EFI System Table
-  //
-  gDxeCoreST->BootServices        = NULL;
-  gDxeCoreST->ConIn               = NULL;
-  gDxeCoreST->ConsoleInHandle     = NULL;
-  gDxeCoreST->ConOut              = NULL;
-  gDxeCoreST->ConsoleOutHandle    = NULL;
-  gDxeCoreST->StdErr              = NULL;
-  gDxeCoreST->StandardErrorHandle = NULL;
-
-  //
-  // Recompute the 32-bit CRC of the EFI System Table
-  //
-  CalculateEfiHdrCrc (&gDxeCoreST->Hdr);
-
-  //
-  // Zero out the Boot Service Table
-  //
-  ZeroMem (gBS, sizeof (EFI_BOOT_SERVICES));
-  gBS = NULL;
-
-  //
-  // Update the AtRuntime field in Runtiem AP.
-  //
-  gRuntime->AtRuntime = TRUE;
-
-  return Status;
-}
-
-
-/**
-  Given a compressed source buffer, this function retrieves the size of the
-  uncompressed buffer and the size of the scratch buffer required to decompress
-  the compressed source buffer.
-
-  The GetInfo() function retrieves the size of the uncompressed buffer and the
-  temporary scratch buffer required to decompress the buffer specified by Source
-  and SourceSize. If the size of the uncompressed buffer or the size of the
-  scratch buffer cannot be determined from the compressed data specified by
-  Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the
-  size of the uncompressed buffer is returned in DestinationSize, the size of
-  the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.
-  The GetInfo() function does not have scratch buffer available to perform a
-  thorough checking of the validity of the source data. It just retrieves the
-  "Original Size" field from the beginning bytes of the source data and output
-  it as DestinationSize. And ScratchSize is specific to the decompression
-  implementation.
-
-  @param  This               A pointer to the EFI_DECOMPRESS_PROTOCOL instance.
-  @param  Source             The source buffer containing the compressed data.
-  @param  SourceSize         The size, in bytes, of the source buffer.
-  @param  DestinationSize    A pointer to the size, in bytes, of the
-                             uncompressed buffer that will be generated when the
-                             compressed buffer specified by Source and
-                             SourceSize is decompressed.
-  @param  ScratchSize        A pointer to the size, in bytes, of the scratch
-                             buffer that is required to decompress the
-                             compressed buffer specified by Source and
-                             SourceSize.
-
-  @retval EFI_SUCCESS        The size of the uncompressed data was returned in
-                             DestinationSize and the size of the scratch buffer
-                             was returned in ScratchSize.
-  @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of
-                                the scratch buffer cannot be determined from the
-                                compressed data specified by Source and
-                                SourceSize.
-
-**/
-EFI_STATUS
-EFIAPI
-DxeMainUefiDecompressGetInfo (
-  IN EFI_DECOMPRESS_PROTOCOL            *This,
-  IN   VOID                             *Source,
-  IN   UINT32                           SourceSize,
-  OUT  UINT32                           *DestinationSize,
-  OUT  UINT32                           *ScratchSize
-  )
-{
-  if (Source == NULL || DestinationSize == NULL || ScratchSize == NULL) {
-    return EFI_INVALID_PARAMETER;
-  }
-  return UefiDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);
-}
-
-
-/**
-  Decompresses a compressed source buffer.
-
-  The Decompress() function extracts decompressed data to its original form.
-  This protocol is designed so that the decompression algorithm can be
-  implemented without using any memory services. As a result, the Decompress()
-  Function is not allowed to call AllocatePool() or AllocatePages() in its
-  implementation. It is the caller's responsibility to allocate and free the
-  Destination and Scratch buffers.
-  If the compressed source data specified by Source and SourceSize is
-  sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If
-  the compressed source data specified by Source and SourceSize is not in a
-  valid compressed data format, then EFI_INVALID_PARAMETER is returned.
-
-  @param  This                A pointer to the EFI_DECOMPRESS_PROTOCOL instance.
-  @param  Source              The source buffer containing the compressed data.
-  @param  SourceSize          SourceSizeThe size of source data.
-  @param  Destination         On output, the destination buffer that contains
-                              the uncompressed data.
-  @param  DestinationSize     The size of the destination buffer.  The size of
-                              the destination buffer needed is obtained from
-                              EFI_DECOMPRESS_PROTOCOL.GetInfo().
-  @param  Scratch             A temporary scratch buffer that is used to perform
-                              the decompression.
-  @param  ScratchSize         The size of scratch buffer. The size of the
-                              scratch buffer needed is obtained from GetInfo().
-
-  @retval EFI_SUCCESS         Decompression completed successfully, and the
-                              uncompressed buffer is returned in Destination.
-  @retval EFI_INVALID_PARAMETER  The source buffer specified by Source and
-                                 SourceSize is corrupted (not in a valid
-                                 compressed format).
-
-**/
-EFI_STATUS
-EFIAPI
-DxeMainUefiDecompress (
-  IN     EFI_DECOMPRESS_PROTOCOL          *This,
-  IN     VOID                             *Source,
-  IN     UINT32                           SourceSize,
-  IN OUT VOID                             *Destination,
-  IN     UINT32                           DestinationSize,
-  IN OUT VOID                             *Scratch,
-  IN     UINT32                           ScratchSize
-  )
-{
-  EFI_STATUS  Status;
-  UINT32      TestDestinationSize;
-  UINT32      TestScratchSize;
-
-  if (Source == NULL || Destination== NULL || Scratch == NULL) {
-    return EFI_INVALID_PARAMETER;
-  }
-
-  Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);
-  if (EFI_ERROR (Status)) {
-    return Status;
-  }
-
-  if (ScratchSize < TestScratchSize || DestinationSize < TestDestinationSize) {
-    return RETURN_INVALID_PARAMETER;
-  }
-
-  return UefiDecompress (Source, Destination, Scratch);
-}
+/** @file\r
+  DXE Core Main Entry Point\r
+\r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "DxeMain.h"\r
+\r
+//\r
+// DXE Core Global Variables for Protocols from PEI\r
+//\r
+EFI_HANDLE                                mDecompressHandle = NULL;\r
+\r
+//\r
+// DXE Core globals for Architecture Protocols\r
+//\r
+EFI_SECURITY_ARCH_PROTOCOL        *gSecurity      = NULL;\r
+EFI_CPU_ARCH_PROTOCOL             *gCpu           = NULL;\r
+EFI_METRONOME_ARCH_PROTOCOL       *gMetronome     = NULL;\r
+EFI_TIMER_ARCH_PROTOCOL           *gTimer         = NULL;\r
+EFI_BDS_ARCH_PROTOCOL             *gBds           = NULL;\r
+EFI_WATCHDOG_TIMER_ARCH_PROTOCOL  *gWatchdogTimer = NULL;\r
+\r
+//\r
+// DXE Core Global used to update core loaded image protocol handle\r
+//\r
+EFI_GUID                           *gDxeCoreFileName;\r
+EFI_LOADED_IMAGE_PROTOCOL          *gDxeCoreLoadedImage;\r
+\r
+//\r
+// DXE Core Module Variables\r
+//\r
+EFI_BOOT_SERVICES mBootServices = {\r
+  {\r
+    EFI_BOOT_SERVICES_SIGNATURE,                                                          // Signature\r
+    EFI_BOOT_SERVICES_REVISION,                                                           // Revision\r
+    sizeof (EFI_BOOT_SERVICES),                                                           // HeaderSize\r
+    0,                                                                                    // CRC32\r
+    0                                                                                     // Reserved\r
+  },\r
+  (EFI_RAISE_TPL)                               CoreRaiseTpl,                             // RaiseTPL\r
+  (EFI_RESTORE_TPL)                             CoreRestoreTpl,                           // RestoreTPL\r
+  (EFI_ALLOCATE_PAGES)                          CoreAllocatePages,                        // AllocatePages\r
+  (EFI_FREE_PAGES)                              CoreFreePages,                            // FreePages\r
+  (EFI_GET_MEMORY_MAP)                          CoreGetMemoryMap,                         // GetMemoryMap\r
+  (EFI_ALLOCATE_POOL)                           CoreAllocatePool,                         // AllocatePool\r
+  (EFI_FREE_POOL)                               CoreFreePool,                             // FreePool\r
+  (EFI_CREATE_EVENT)                            CoreCreateEvent,                          // CreateEvent\r
+  (EFI_SET_TIMER)                               CoreSetTimer,                             // SetTimer\r
+  (EFI_WAIT_FOR_EVENT)                          CoreWaitForEvent,                         // WaitForEvent\r
+  (EFI_SIGNAL_EVENT)                            CoreSignalEvent,                          // SignalEvent\r
+  (EFI_CLOSE_EVENT)                             CoreCloseEvent,                           // CloseEvent\r
+  (EFI_CHECK_EVENT)                             CoreCheckEvent,                           // CheckEvent\r
+  (EFI_INSTALL_PROTOCOL_INTERFACE)              CoreInstallProtocolInterface,             // InstallProtocolInterface\r
+  (EFI_REINSTALL_PROTOCOL_INTERFACE)            CoreReinstallProtocolInterface,           // ReinstallProtocolInterface\r
+  (EFI_UNINSTALL_PROTOCOL_INTERFACE)            CoreUninstallProtocolInterface,           // UninstallProtocolInterface\r
+  (EFI_HANDLE_PROTOCOL)                         CoreHandleProtocol,                       // HandleProtocol\r
+  (VOID *)                                      NULL,                                     // Reserved\r
+  (EFI_REGISTER_PROTOCOL_NOTIFY)                CoreRegisterProtocolNotify,               // RegisterProtocolNotify\r
+  (EFI_LOCATE_HANDLE)                           CoreLocateHandle,                         // LocateHandle\r
+  (EFI_LOCATE_DEVICE_PATH)                      CoreLocateDevicePath,                     // LocateDevicePath\r
+  (EFI_INSTALL_CONFIGURATION_TABLE)             CoreInstallConfigurationTable,            // InstallConfigurationTable\r
+  (EFI_IMAGE_LOAD)                              CoreLoadImage,                            // LoadImage\r
+  (EFI_IMAGE_START)                             CoreStartImage,                           // StartImage\r
+  (EFI_EXIT)                                    CoreExit,                                 // Exit\r
+  (EFI_IMAGE_UNLOAD)                            CoreUnloadImage,                          // UnloadImage\r
+  (EFI_EXIT_BOOT_SERVICES)                      CoreExitBootServices,                     // ExitBootServices\r
+  (EFI_GET_NEXT_MONOTONIC_COUNT)                CoreEfiNotAvailableYetArg1,               // GetNextMonotonicCount\r
+  (EFI_STALL)                                   CoreStall,                                // Stall\r
+  (EFI_SET_WATCHDOG_TIMER)                      CoreSetWatchdogTimer,                     // SetWatchdogTimer\r
+  (EFI_CONNECT_CONTROLLER)                      CoreConnectController,                    // ConnectController\r
+  (EFI_DISCONNECT_CONTROLLER)                   CoreDisconnectController,                 // DisconnectController\r
+  (EFI_OPEN_PROTOCOL)                           CoreOpenProtocol,                         // OpenProtocol\r
+  (EFI_CLOSE_PROTOCOL)                          CoreCloseProtocol,                        // CloseProtocol\r
+  (EFI_OPEN_PROTOCOL_INFORMATION)               CoreOpenProtocolInformation,              // OpenProtocolInformation\r
+  (EFI_PROTOCOLS_PER_HANDLE)                    CoreProtocolsPerHandle,                   // ProtocolsPerHandle\r
+  (EFI_LOCATE_HANDLE_BUFFER)                    CoreLocateHandleBuffer,                   // LocateHandleBuffer\r
+  (EFI_LOCATE_PROTOCOL)                         CoreLocateProtocol,                       // LocateProtocol\r
+  (EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES)    CoreInstallMultipleProtocolInterfaces,    // InstallMultipleProtocolInterfaces\r
+  (EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES)  CoreUninstallMultipleProtocolInterfaces,  // UninstallMultipleProtocolInterfaces\r
+  (EFI_CALCULATE_CRC32)                         CoreEfiNotAvailableYetArg3,               // CalculateCrc32\r
+  (EFI_COPY_MEM)                                CopyMem,                                  // CopyMem\r
+  (EFI_SET_MEM)                                 SetMem,                                   // SetMem\r
+  (EFI_CREATE_EVENT_EX)                         CoreCreateEventEx                         // CreateEventEx\r
+};\r
+\r
+EFI_DXE_SERVICES mDxeServices = {\r
+  {\r
+    DXE_SERVICES_SIGNATURE,                                           // Signature\r
+    DXE_SERVICES_REVISION,                                            // Revision\r
+    sizeof (DXE_SERVICES),                                            // HeaderSize\r
+    0,                                                                    // CRC32\r
+    0                                                                     // Reserved\r
+  },\r
+  (EFI_ADD_MEMORY_SPACE)             CoreAddMemorySpace,                  // AddMemorySpace\r
+  (EFI_ALLOCATE_MEMORY_SPACE)        CoreAllocateMemorySpace,             // AllocateMemorySpace\r
+  (EFI_FREE_MEMORY_SPACE)            CoreFreeMemorySpace,                 // FreeMemorySpace\r
+  (EFI_REMOVE_MEMORY_SPACE)          CoreRemoveMemorySpace,               // RemoveMemorySpace\r
+  (EFI_GET_MEMORY_SPACE_DESCRIPTOR)  CoreGetMemorySpaceDescriptor,        // GetMemorySpaceDescriptor\r
+  (EFI_SET_MEMORY_SPACE_ATTRIBUTES)  CoreSetMemorySpaceAttributes,        // SetMemorySpaceAttributes\r
+  (EFI_GET_MEMORY_SPACE_MAP)         CoreGetMemorySpaceMap,               // GetMemorySpaceMap\r
+  (EFI_ADD_IO_SPACE)                 CoreAddIoSpace,                      // AddIoSpace\r
+  (EFI_ALLOCATE_IO_SPACE)            CoreAllocateIoSpace,                 // AllocateIoSpace\r
+  (EFI_FREE_IO_SPACE)                CoreFreeIoSpace,                     // FreeIoSpace\r
+  (EFI_REMOVE_IO_SPACE)              CoreRemoveIoSpace,                   // RemoveIoSpace\r
+  (EFI_GET_IO_SPACE_DESCRIPTOR)      CoreGetIoSpaceDescriptor,            // GetIoSpaceDescriptor\r
+  (EFI_GET_IO_SPACE_MAP)             CoreGetIoSpaceMap,                   // GetIoSpaceMap\r
+  (EFI_DISPATCH)                     CoreDispatcher,                      // Dispatch\r
+  (EFI_SCHEDULE)                     CoreSchedule,                        // Schedule\r
+  (EFI_TRUST)                        CoreTrust,                           // Trust\r
+  (EFI_PROCESS_FIRMWARE_VOLUME)      CoreProcessFirmwareVolume,           // ProcessFirmwareVolume\r
+};\r
+\r
+EFI_SYSTEM_TABLE mEfiSystemTableTemplate = {\r
+  {\r
+    EFI_SYSTEM_TABLE_SIGNATURE,                                           // Signature\r
+    EFI_SYSTEM_TABLE_REVISION,                                            // Revision\r
+    sizeof (EFI_SYSTEM_TABLE),                                            // HeaderSize\r
+    0,                                                                    // CRC32\r
+    0                                                                     // Reserved\r
+  },\r
+  NULL,                                                                   // FirmwareVendor\r
+  0,                                                                      // FirmwareRevision\r
+  NULL,                                                                   // ConsoleInHandle\r
+  NULL,                                                                   // ConIn\r
+  NULL,                                                                   // ConsoleOutHandle\r
+  NULL,                                                                   // ConOut\r
+  NULL,                                                                   // StandardErrorHandle\r
+  NULL,                                                                   // StdErr\r
+  NULL,                                                                   // RuntimeServices\r
+  &mBootServices,                                                         // BootServices\r
+  0,                                                                      // NumberOfConfigurationTableEntries\r
+  NULL                                                                    // ConfigurationTable\r
+};\r
+\r
+EFI_RUNTIME_SERVICES mEfiRuntimeServicesTableTemplate = {\r
+  {\r
+    EFI_RUNTIME_SERVICES_SIGNATURE,                               // Signature\r
+    EFI_RUNTIME_SERVICES_REVISION,                                // Revision\r
+    sizeof (EFI_RUNTIME_SERVICES),                                // HeaderSize\r
+    0,                                                            // CRC32\r
+    0                                                             // Reserved\r
+  },\r
+  (EFI_GET_TIME)                    CoreEfiNotAvailableYetArg2,   // GetTime\r
+  (EFI_SET_TIME)                    CoreEfiNotAvailableYetArg1,   // SetTime\r
+  (EFI_GET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg3,   // GetWakeupTime\r
+  (EFI_SET_WAKEUP_TIME)             CoreEfiNotAvailableYetArg2,   // SetWakeupTime\r
+  (EFI_SET_VIRTUAL_ADDRESS_MAP)     CoreEfiNotAvailableYetArg4,   // SetVirtualAddressMap\r
+  (EFI_CONVERT_POINTER)             CoreEfiNotAvailableYetArg2,   // ConvertPointer\r
+  (EFI_GET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // GetVariable\r
+  (EFI_GET_NEXT_VARIABLE_NAME)      CoreEfiNotAvailableYetArg3,   // GetNextVariableName\r
+  (EFI_SET_VARIABLE)                CoreEfiNotAvailableYetArg5,   // SetVariable\r
+  (EFI_GET_NEXT_HIGH_MONO_COUNT)    CoreEfiNotAvailableYetArg1,   // GetNextHighMonotonicCount\r
+  (EFI_RESET_SYSTEM)                CoreEfiNotAvailableYetArg4,   // ResetSystem\r
+  (EFI_UPDATE_CAPSULE)              CoreEfiNotAvailableYetArg3,   // UpdateCapsule\r
+  (EFI_QUERY_CAPSULE_CAPABILITIES)  CoreEfiNotAvailableYetArg4,   // QueryCapsuleCapabilities\r
+  (EFI_QUERY_VARIABLE_INFO)         CoreEfiNotAvailableYetArg4    // QueryVariableInfo\r
+};\r
+\r
+EFI_RUNTIME_ARCH_PROTOCOL gRuntimeTemplate = {\r
+  INITIALIZE_LIST_HEAD_VARIABLE (gRuntimeTemplate.ImageHead),\r
+  INITIALIZE_LIST_HEAD_VARIABLE (gRuntimeTemplate.EventHead),\r
+\r
+  //\r
+  // Make sure Size != sizeof (EFI_MEMORY_DESCRIPTOR). This will\r
+  // prevent people from having pointer math bugs in their code.\r
+  // now you have to use *DescriptorSize to make things work.\r
+  //\r
+  sizeof (EFI_MEMORY_DESCRIPTOR) + sizeof (UINT64) - (sizeof (EFI_MEMORY_DESCRIPTOR) % sizeof (UINT64)),\r
+  EFI_MEMORY_DESCRIPTOR_VERSION,\r
+  0,\r
+  NULL,\r
+  NULL,\r
+  FALSE,\r
+  FALSE\r
+};\r
+\r
+EFI_RUNTIME_ARCH_PROTOCOL *gRuntime = &gRuntimeTemplate;\r
+\r
+//\r
+// DXE Core Global Variables for the EFI System Table, Boot Services Table,\r
+// DXE Services Table, and Runtime Services Table\r
+//\r
+EFI_DXE_SERVICES      *gDxeCoreDS = &mDxeServices;\r
+EFI_SYSTEM_TABLE      *gDxeCoreST = NULL;\r
+\r
+//\r
+// For debug initialize gDxeCoreRT to template. gDxeCoreRT must be allocated from RT memory\r
+//  but gDxeCoreRT is used for ASSERT () and DEBUG () type macros so lets give it\r
+//  a value that will not cause debug infrastructure to crash early on.\r
+//\r
+EFI_RUNTIME_SERVICES  *gDxeCoreRT = &mEfiRuntimeServicesTableTemplate;\r
+EFI_HANDLE            gDxeCoreImageHandle = NULL;\r
+\r
+\r
+//\r
+// EFI Decompress Protocol\r
+//\r
+EFI_DECOMPRESS_PROTOCOL  gEfiDecompress = {\r
+  DxeMainUefiDecompressGetInfo,\r
+  DxeMainUefiDecompress\r
+};\r
+\r
+//\r
+// Main entry point to the DXE Core\r
+//\r
+\r
+/**\r
+  Main entry point to DXE Core.\r
+\r
+  @param  HobStart               Pointer to the beginning of the HOB List from PEI.\r
+\r
+  @return This function should never return.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+DxeMain (\r
+  IN  VOID *HobStart\r
+  )\r
+{\r
+  EFI_STATUS                         Status;\r
+  EFI_PHYSICAL_ADDRESS               MemoryBaseAddress;\r
+  UINT64                             MemoryLength;\r
+\r
+  //\r
+  // Initialize Memory Services\r
+  //\r
+  CoreInitializeMemoryServices (&HobStart, &MemoryBaseAddress, &MemoryLength);\r
+\r
+  //\r
+  // Allocate the EFI System Table and EFI Runtime Service Table from EfiRuntimeServicesData\r
+  // Use the templates to initialize the contents of the EFI System Table and EFI Runtime Services Table\r
+  //\r
+  gDxeCoreST = AllocateRuntimeCopyPool (sizeof (EFI_SYSTEM_TABLE), &mEfiSystemTableTemplate);\r
+  ASSERT (gDxeCoreST != NULL);\r
+\r
+  gDxeCoreRT = AllocateRuntimeCopyPool (sizeof (EFI_RUNTIME_SERVICES), &mEfiRuntimeServicesTableTemplate);\r
+  ASSERT (gDxeCoreRT != NULL);\r
+\r
+  gDxeCoreST->RuntimeServices = gDxeCoreRT;\r
+\r
+  //\r
+  // Start the Image Services.\r
+  //\r
+  Status = CoreInitializeImageServices (HobStart);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Call constructor for all libraries\r
+  //\r
+  ProcessLibraryConstructorList (gDxeCoreImageHandle, gDxeCoreST);\r
+  PERF_END   (NULL,"PEI", NULL, 0) ;\r
+  PERF_START (NULL,"DXE", NULL, 0) ;\r
+\r
+  //\r
+  // Initialize the Global Coherency Domain Services\r
+  //\r
+  Status = CoreInitializeGcdServices (&HobStart, MemoryBaseAddress, MemoryLength);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Install the DXE Services Table into the EFI System Tables's Configuration Table\r
+  //\r
+  Status = CoreInstallConfigurationTable (&gEfiDxeServicesTableGuid, gDxeCoreDS);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Install the HOB List into the EFI System Tables's Configuration Table\r
+  //\r
+  Status = CoreInstallConfigurationTable (&gEfiHobListGuid, HobStart);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Install Memory Type Information Table into the EFI System Tables's Configuration Table\r
+  //\r
+  Status = CoreInstallConfigurationTable (&gEfiMemoryTypeInformationGuid, &gMemoryTypeInformation);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Report Status Code here for DXE_ENTRY_POINT once it is available\r
+  //\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32(PcdStatusCodeValueDxeCoreEntry)\r
+    );\r
+\r
+  //\r
+  // Create the aligned system table pointer structure that is used by external\r
+  // debuggers to locate the system table...  Also, install debug image info\r
+  // configuration table.\r
+  //\r
+  CoreInitializeDebugImageInfoTable ();\r
+  CoreNewDebugImageInfoEntry (\r
+    EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL,\r
+    gDxeCoreLoadedImage,\r
+    gDxeCoreImageHandle\r
+    );\r
+\r
+  DEBUG ((DEBUG_INFO | DEBUG_LOAD, "HOBLIST address in DXE = 0x%p\n", HobStart));\r
+\r
+  DEBUG_CODE_BEGIN ();\r
+    EFI_PEI_HOB_POINTERS               Hob;\r
+\r
+    for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
+      if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) {\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "Memory Allocation %08x %0lx - %0lx\n", \\r
+          Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress,               \\r
+          Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress + Hob.MemoryAllocation->AllocDescriptor.MemoryLength - 1, \\r
+          Hob.MemoryAllocation->AllocDescriptor.MemoryType));\r
+      }\r
+    }\r
+    for (Hob.Raw = HobStart; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
+      if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV2) {\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV2 Hob           %08x %0lx - %0lx\n", Hob.FirmwareVolume2->BaseAddress, Hob.FirmwareVolume2->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));\r
+      } else if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_FV) {\r
+        DEBUG ((DEBUG_INFO | DEBUG_LOAD, "FV Hob            %08x %0lx - %0lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->BaseAddress + Hob.FirmwareVolume2->Length - 1, Hob.ResourceDescriptor->ResourceType));\r
+      }\r
+    }\r
+  DEBUG_CODE_END ();\r
+\r
+  //\r
+  // Initialize the Event Services\r
+  //\r
+  Status = CoreInitializeEventServices ();\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+\r
+  //\r
+  // Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs\r
+  //\r
+  // These Protocols are not architectural. This implementation is sharing code between\r
+  // PEI and DXE in order to save FLASH space. These Protocols could also be implemented\r
+  // as part of the DXE Core. However, that would also require the DXE Core to be ported\r
+  // each time a different CPU is used, a different Decompression algorithm is used, or a\r
+  // different Image type is used. By placing these Protocols in PEI, the DXE Core remains\r
+  // generic, and only PEI and the Arch Protocols need to be ported from Platform to Platform,\r
+  // and from CPU to CPU.\r
+  //\r
+\r
+  //\r
+  // Publish the EFI, Tiano, and Custom Decompress protocols for use by other DXE components\r
+  //\r
+  Status = CoreInstallMultipleProtocolInterfaces (\r
+             &mDecompressHandle,\r
+             &gEfiDecompressProtocolGuid,           &gEfiDecompress,\r
+             NULL\r
+             );\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Register for the GUIDs of the Architectural Protocols, so the rest of the\r
+  // EFI Boot Services and EFI Runtime Services tables can be filled in.\r
+  //\r
+  CoreNotifyOnArchProtocolInstallation ();\r
+\r
+  //\r
+  // Produce Firmware Volume Protocols, one for each FV in the HOB list.\r
+  //\r
+  Status = FwVolBlockDriverInit (gDxeCoreImageHandle, gDxeCoreST);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  Status = FwVolDriverInit (gDxeCoreImageHandle, gDxeCoreST);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Produce the Section Extraction Protocol\r
+  //\r
+  Status = InitializeSectionExtraction (gDxeCoreImageHandle, gDxeCoreST);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Initialize the DXE Dispatcher\r
+  //\r
+  PERF_START (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;\r
+  CoreInitializeDispatcher ();\r
+  PERF_END (NULL,"CoreInitializeDispatcher", "DxeMain", 0) ;\r
+\r
+  //\r
+  // Invoke the DXE Dispatcher\r
+  //\r
+  PERF_START (NULL, "CoreDispatcher", "DxeMain", 0);\r
+  CoreDispatcher ();\r
+  PERF_END (NULL, "CoreDispatcher", "DxeMain", 0);\r
+\r
+  //\r
+  // Display Architectural protocols that were not loaded if this is DEBUG build\r
+  //\r
+  DEBUG_CODE_BEGIN ();\r
+    CoreDisplayMissingArchProtocols ();\r
+  DEBUG_CODE_END ();\r
+\r
+  //\r
+  // Display any drivers that were not dispatched because dependency expression\r
+  // evaluated to false if this is a debug build\r
+  //\r
+  DEBUG_CODE_BEGIN ();\r
+    CoreDisplayDiscoveredNotDispatched ();\r
+  DEBUG_CODE_END ();\r
+\r
+  //\r
+  // Assert if the Architectural Protocols are not present.\r
+  //\r
+  ASSERT_EFI_ERROR (CoreAllEfiServicesAvailable ());\r
+\r
+  //\r
+  // Report Status code before transfer control to BDS\r
+  //\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32 (PcdStatusCodeValueDxeCoreHandoffToBds)\r
+    );\r
+\r
+  //\r
+  // Transfer control to the BDS Architectural Protocol\r
+  //\r
+  gBds->Entry (gBds);\r
+\r
+  //\r
+  // BDS should never return\r
+  //\r
+  ASSERT (FALSE);\r
+  CpuDeadLoop ();\r
+}\r
+\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are\r
+  available.\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg0 (\r
+  VOID\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are\r
+  available.\r
+\r
+  @param  Arg1                   Undefined\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg1 (\r
+  UINTN Arg1\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg2 (\r
+  UINTN Arg1,\r
+  UINTN Arg2\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg3 (\r
+  UINTN Arg1,\r
+  UINTN Arg2,\r
+  UINTN Arg3\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
+  @param  Arg4                   Undefined\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg4 (\r
+  UINTN Arg1,\r
+  UINTN Arg2,\r
+  UINTN Arg3,\r
+  UINTN Arg4\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Place holder function until all the Boot Services and Runtime Services are available.\r
+\r
+  @param  Arg1                   Undefined\r
+  @param  Arg2                   Undefined\r
+  @param  Arg3                   Undefined\r
+  @param  Arg4                   Undefined\r
+  @param  Arg5                   Undefined\r
+\r
+  @return EFI_NOT_AVAILABLE_YET\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreEfiNotAvailableYetArg5 (\r
+  UINTN Arg1,\r
+  UINTN Arg2,\r
+  UINTN Arg3,\r
+  UINTN Arg4,\r
+  UINTN Arg5\r
+  )\r
+{\r
+  //\r
+  // This function should never be executed.  If it does, then the architectural protocols\r
+  // have not been designed correctly.  The CpuBreakpoint () is commented out for now until the\r
+  // DXE Core and all the Architectural Protocols are complete.\r
+  //\r
+\r
+  return EFI_NOT_AVAILABLE_YET;\r
+}\r
+\r
+\r
+/**\r
+  Calcualte the 32-bit CRC in a EFI table using the service provided by the\r
+  gRuntime service.\r
+\r
+  @param  Hdr                    Pointer to an EFI standard header\r
+\r
+**/\r
+VOID\r
+CalculateEfiHdrCrc (\r
+  IN  OUT EFI_TABLE_HEADER    *Hdr\r
+  )\r
+{\r
+  UINT32 Crc;\r
+\r
+  Hdr->CRC32 = 0;\r
+\r
+  //\r
+  // If gBS->CalculateCrce32 () == CoreEfiNotAvailableYet () then\r
+  //  Crc will come back as zero if we set it to zero here\r
+  //\r
+  Crc = 0;\r
+  gBS->CalculateCrc32 ((UINT8 *)Hdr, Hdr->HeaderSize, &Crc);\r
+  Hdr->CRC32 = Crc;\r
+}\r
+\r
+\r
+/**\r
+  Terminates all boot services.\r
+\r
+  @param  ImageHandle            Handle that identifies the exiting image.\r
+  @param  MapKey                 Key to the latest memory map.\r
+\r
+  @retval EFI_SUCCESS            Boot Services terminated\r
+  @retval EFI_INVALID_PARAMETER  MapKey is incorrect.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+CoreExitBootServices (\r
+  IN EFI_HANDLE   ImageHandle,\r
+  IN UINTN        MapKey\r
+  )\r
+{\r
+  EFI_STATUS                Status;\r
+\r
+  //\r
+  // Terminate memory services if the MapKey matches\r
+  //\r
+  Status = CoreTerminateMemoryMap (MapKey);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  //\r
+  // Disable Timer\r
+  //\r
+  gTimer->SetTimerPeriod (gTimer, 0);\r
+\r
+  //\r
+  // Notify other drivers that we are exiting boot services.\r
+  //\r
+  CoreNotifySignalList (&gEfiEventExitBootServicesGuid);\r
+\r
+  //\r
+  // Disable CPU Interrupts\r
+  //\r
+  gCpu->DisableInterrupt (gCpu);\r
+\r
+  //\r
+  // Report that ExitBootServices() has been called\r
+  //\r
+  REPORT_STATUS_CODE (\r
+    EFI_PROGRESS_CODE,\r
+    FixedPcdGet32 (PcdStatusCodeValueBootServiceExit)\r
+    );\r
+\r
+  //\r
+  // Clear the non-runtime values of the EFI System Table\r
+  //\r
+  gDxeCoreST->BootServices        = NULL;\r
+  gDxeCoreST->ConIn               = NULL;\r
+  gDxeCoreST->ConsoleInHandle     = NULL;\r
+  gDxeCoreST->ConOut              = NULL;\r
+  gDxeCoreST->ConsoleOutHandle    = NULL;\r
+  gDxeCoreST->StdErr              = NULL;\r
+  gDxeCoreST->StandardErrorHandle = NULL;\r
+\r
+  //\r
+  // Recompute the 32-bit CRC of the EFI System Table\r
+  //\r
+  CalculateEfiHdrCrc (&gDxeCoreST->Hdr);\r
+\r
+  //\r
+  // Zero out the Boot Service Table\r
+  //\r
+  ZeroMem (gBS, sizeof (EFI_BOOT_SERVICES));\r
+  gBS = NULL;\r
+\r
+  //\r
+  // Update the AtRuntime field in Runtiem AP.\r
+  //\r
+  gRuntime->AtRuntime = TRUE;\r
+\r
+  return Status;\r
+}\r
+\r
+\r
+/**\r
+  Given a compressed source buffer, this function retrieves the size of the\r
+  uncompressed buffer and the size of the scratch buffer required to decompress\r
+  the compressed source buffer.\r
+\r
+  The GetInfo() function retrieves the size of the uncompressed buffer and the\r
+  temporary scratch buffer required to decompress the buffer specified by Source\r
+  and SourceSize. If the size of the uncompressed buffer or the size of the\r
+  scratch buffer cannot be determined from the compressed data specified by\r
+  Source and SourceData, then EFI_INVALID_PARAMETER is returned. Otherwise, the\r
+  size of the uncompressed buffer is returned in DestinationSize, the size of\r
+  the scratch buffer is returned in ScratchSize, and EFI_SUCCESS is returned.\r
+  The GetInfo() function does not have scratch buffer available to perform a\r
+  thorough checking of the validity of the source data. It just retrieves the\r
+  "Original Size" field from the beginning bytes of the source data and output\r
+  it as DestinationSize. And ScratchSize is specific to the decompression\r
+  implementation.\r
+\r
+  @param  This               A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source             The source buffer containing the compressed data.\r
+  @param  SourceSize         The size, in bytes, of the source buffer.\r
+  @param  DestinationSize    A pointer to the size, in bytes, of the\r
+                             uncompressed buffer that will be generated when the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize is decompressed.\r
+  @param  ScratchSize        A pointer to the size, in bytes, of the scratch\r
+                             buffer that is required to decompress the\r
+                             compressed buffer specified by Source and\r
+                             SourceSize.\r
+\r
+  @retval EFI_SUCCESS        The size of the uncompressed data was returned in\r
+                             DestinationSize and the size of the scratch buffer\r
+                             was returned in ScratchSize.\r
+  @retval EFI_INVALID_PARAMETER The size of the uncompressed data or the size of\r
+                                the scratch buffer cannot be determined from the\r
+                                compressed data specified by Source and\r
+                                SourceSize.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+DxeMainUefiDecompressGetInfo (\r
+  IN EFI_DECOMPRESS_PROTOCOL            *This,\r
+  IN   VOID                             *Source,\r
+  IN   UINT32                           SourceSize,\r
+  OUT  UINT32                           *DestinationSize,\r
+  OUT  UINT32                           *ScratchSize\r
+  )\r
+{\r
+  if (Source == NULL || DestinationSize == NULL || ScratchSize == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+  return UefiDecompressGetInfo (Source, SourceSize, DestinationSize, ScratchSize);\r
+}\r
+\r
+\r
+/**\r
+  Decompresses a compressed source buffer.\r
+\r
+  The Decompress() function extracts decompressed data to its original form.\r
+  This protocol is designed so that the decompression algorithm can be\r
+  implemented without using any memory services. As a result, the Decompress()\r
+  Function is not allowed to call AllocatePool() or AllocatePages() in its\r
+  implementation. It is the caller's responsibility to allocate and free the\r
+  Destination and Scratch buffers.\r
+  If the compressed source data specified by Source and SourceSize is\r
+  sucessfully decompressed into Destination, then EFI_SUCCESS is returned. If\r
+  the compressed source data specified by Source and SourceSize is not in a\r
+  valid compressed data format, then EFI_INVALID_PARAMETER is returned.\r
+\r
+  @param  This                A pointer to the EFI_DECOMPRESS_PROTOCOL instance.\r
+  @param  Source              The source buffer containing the compressed data.\r
+  @param  SourceSize          SourceSizeThe size of source data.\r
+  @param  Destination         On output, the destination buffer that contains\r
+                              the uncompressed data.\r
+  @param  DestinationSize     The size of the destination buffer.  The size of\r
+                              the destination buffer needed is obtained from\r
+                              EFI_DECOMPRESS_PROTOCOL.GetInfo().\r
+  @param  Scratch             A temporary scratch buffer that is used to perform\r
+                              the decompression.\r
+  @param  ScratchSize         The size of scratch buffer. The size of the\r
+                              scratch buffer needed is obtained from GetInfo().\r
+\r
+  @retval EFI_SUCCESS         Decompression completed successfully, and the\r
+                              uncompressed buffer is returned in Destination.\r
+  @retval EFI_INVALID_PARAMETER  The source buffer specified by Source and\r
+                                 SourceSize is corrupted (not in a valid\r
+                                 compressed format).\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+DxeMainUefiDecompress (\r
+  IN     EFI_DECOMPRESS_PROTOCOL          *This,\r
+  IN     VOID                             *Source,\r
+  IN     UINT32                           SourceSize,\r
+  IN OUT VOID                             *Destination,\r
+  IN     UINT32                           DestinationSize,\r
+  IN OUT VOID                             *Scratch,\r
+  IN     UINT32                           ScratchSize\r
+  )\r
+{\r
+  EFI_STATUS  Status;\r
+  UINT32      TestDestinationSize;\r
+  UINT32      TestScratchSize;\r
+\r
+  if (Source == NULL || Destination== NULL || Scratch == NULL) {\r
+    return EFI_INVALID_PARAMETER;\r
+  }\r
+\r
+  Status = UefiDecompressGetInfo (Source, SourceSize, &TestDestinationSize, &TestScratchSize);\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
+  if (ScratchSize < TestScratchSize || DestinationSize < TestDestinationSize) {\r
+    return RETURN_INVALID_PARAMETER;\r
+  }\r
+\r
+  return UefiDecompress (Source, Destination, Scratch);\r
+}\r
index dd64a35843d07461d5709ffb7aeda0c345066aef..939ca7ed6256713d4daa4457fefec0b476e1666f 100644 (file)
@@ -1,70 +1,70 @@
-/** @file
-  ARM specifc functionality for DxeLoad. 
-  
-Copyright (c) 2006 - 2008, Intel Corporation. <BR>
-Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
-
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#include "DxeIpl.h"
-
-/**
-   Transfers control to DxeCore.
-
-   This function performs a CPU architecture specific operations to execute
-   the entry point of DxeCore with the parameters of HobList.
-   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
-
-   @param DxeCoreEntryPoint         The entry point of DxeCore.
-   @param HobList                   The start of HobList passed to DxeCore.
-
-**/
-VOID
-HandOffToDxeCore (
-  IN EFI_PHYSICAL_ADDRESS   DxeCoreEntryPoint,
-  IN EFI_PEI_HOB_POINTERS   HobList
-  )
-{
-  VOID                *BaseOfStack;
-  VOID                *TopOfStack;
-  EFI_STATUS          Status;
-
-  //
-  // Allocate 128KB for the Stack
-  //
-  BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));
-  ASSERT (BaseOfStack != NULL);
-
-  //
-  // Compute the top of the stack we were allocated. Pre-allocate a UINTN
-  // for safety.
-  //
-  TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);
-  TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
-
-  //
-  // End of PEI phase singal
-  //
-  Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);
-  ASSERT_EFI_ERROR (Status);
-
-  //
-  // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.
-  //    
-  UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, STACK_SIZE);
-
-  SwitchStack (
-    (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
-    HobList.Raw,
-    NULL,
-    TopOfStack
-    );
-}
+/** @file\r
+  ARM specifc functionality for DxeLoad. \r
+  \r
+Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
+Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
+\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#include "DxeIpl.h"\r
+\r
+/**\r
+   Transfers control to DxeCore.\r
+\r
+   This function performs a CPU architecture specific operations to execute\r
+   the entry point of DxeCore with the parameters of HobList.\r
+   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.\r
+\r
+   @param DxeCoreEntryPoint         The entry point of DxeCore.\r
+   @param HobList                   The start of HobList passed to DxeCore.\r
+\r
+**/\r
+VOID\r
+HandOffToDxeCore (\r
+  IN EFI_PHYSICAL_ADDRESS   DxeCoreEntryPoint,\r
+  IN EFI_PEI_HOB_POINTERS   HobList\r
+  )\r
+{\r
+  VOID                *BaseOfStack;\r
+  VOID                *TopOfStack;\r
+  EFI_STATUS          Status;\r
+\r
+  //\r
+  // Allocate 128KB for the Stack\r
+  //\r
+  BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));\r
+  ASSERT (BaseOfStack != NULL);\r
+\r
+  //\r
+  // Compute the top of the stack we were allocated. Pre-allocate a UINTN\r
+  // for safety.\r
+  //\r
+  TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);\r
+  TopOfStack = ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);\r
+\r
+  //\r
+  // End of PEI phase singal\r
+  //\r
+  Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
+  ASSERT_EFI_ERROR (Status);\r
+\r
+  //\r
+  // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore.\r
+  //    \r
+  UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, STACK_SIZE);\r
+\r
+  SwitchStack (\r
+    (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,\r
+    HobList.Raw,\r
+    NULL,\r
+    TopOfStack\r
+    );\r
+}\r
index a345035f1fa422b6017de4f2ceb728f09dc116db..d48a0a08666aae0a56703cbba38626ef8ae7caf0 100644 (file)
-#/** @file
-#  Last PEIM executed in PEI phase to load DXE Core from a Firmware Volume.
-#  
-#  This module produces a special PPI named the DXE Initial Program Load (IPL)
-#  PPI to discover and dispatch the DXE Foundation and components that are
-#  needed to run the DXE Foundation.
-#
-#  Copyright (c) 2006 - 2009, Intel Corporation. <BR>
-#  All rights reserved. This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies this distribution.  The full text of the license may be found at
-#  http://opensource.org/licenses/bsd-license.php
-#  
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#  
-#**/
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = DxeIpl
-  FILE_GUID                      = 86D70125-BAA3-4296-A62F-602BEBBB9081
-  MODULE_TYPE                    = PEIM
-  VERSION_STRING                 = 1.0
-
-  ENTRY_POINT                    = PeimInitializeDxeIpl
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC (EBC is for build only)
-#
-
-[Sources.common]
-  DxeIpl.h
-  DxeLoad.c
-
-[Sources.Ia32]
-  Ia32/VirtualMemory.h ||||PcdDxeIplSwitchToLongMode
-  Ia32/VirtualMemory.c ||||PcdDxeIplSwitchToLongMode
-  Ia32/DxeLoadFunc.c
-  Ia32/IdtVectorAsm.asm||||PcdDxeIplSwitchToLongMode
-  Ia32/IdtVectorAsm.S  ||||PcdDxeIplSwitchToLongMode
-
-[Sources.X64]
-  X64/VirtualMemory.h
-  X64/VirtualMemory.c
-  X64/DxeLoadFunc.c
-
-[Sources.IPF]
-  Ipf/DxeLoadFunc.c
-
-[Sources.EBC]
-  Ebc/DxeLoadFunc.c
-
-[Sources.ARM]
-  Arm/DxeLoadFunc.c
-
-[Packages]
-  MdePkg/MdePkg.dec
-  MdeModulePkg/MdeModulePkg.dec
-
-[LibraryClasses]
-  PcdLib
-  MemoryAllocationLib
-  BaseMemoryLib
-  ExtractGuidedSectionLib
-  UefiDecompressLib
-  ReportStatusCodeLib
-  PeiServicesLib
-  HobLib
-  BaseLib
-  PeimEntryPoint
-  DebugLib
-
-[Ppis]
-  gEfiDxeIplPpiGuid                 ## PRODUCES
-  gEfiEndOfPeiSignalPpiGuid         ## SOMETIMES_PRODUCES(Not produced on S3 boot path)
-  gEfiPeiDecompressPpiGuid          ## SOMETIMES_PRODUCES
-  gEfiPeiReadOnlyVariable2PpiGuid   ## SOMETIMES_CONSUMES
-  gEfiPeiLoadFilePpiGuid            ## CONSUMES
-  gEfiPeiS3ResumePpiGuid            ## SOMETIMES_CONSUMES(Consumed on S3 boot path)
-  gEfiPeiRecoveryModulePpiGuid      ## SOMETIMES_CONSUMES(Consumed on recovery boot path)
-
-[Guids]
-  gEfiMemoryTypeInformationGuid     ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
-  gEfiMemoryTypeInformationGuid     ## SOMETIMES_PRODUCES ## HOB
-
-[FeaturePcd.IA32]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode
-
-[FeaturePcd.common]
-  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress
-
-[FixedPcd.common]
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiHandoffToDxe
-
-[Depex]
-  gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiLoadFilePpiGuid
-
-#
-# [BootMode] 
-#   S3_RESUME                       ## SOMETIMES_CONSUMES
-#   RECOVERY                        ## SOMETIMES_CONSUMES
-#
-#  
-# [Hob]
-#   ##
-#   # New Stack HoB
-#   MEMORY_ALLOCATION               ## PRODUCES
-#   ##
-#   # Old Stack HOB
-#   MEMORY_ALLOCATION               ## CONSUMES
-#
-# [Hob.IPF]
-#   ##
-#   # BSP Stack HOB for IPF
-#   MEMORY_ALLOCATION               ## PRODUCES
-#
-# 
+#/** @file\r
+#  Last PEIM executed in PEI phase to load DXE Core from a Firmware Volume.\r
+#  \r
+#  This module produces a special PPI named the DXE Initial Program Load (IPL)\r
+#  PPI to discover and dispatch the DXE Foundation and components that are\r
+#  needed to run the DXE Foundation.\r
+#\r
+#  Copyright (c) 2006 - 2009, Intel Corporation. <BR>\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution.  The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#  \r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#  \r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = DxeIpl\r
+  FILE_GUID                      = 86D70125-BAA3-4296-A62F-602BEBBB9081\r
+  MODULE_TYPE                    = PEIM\r
+  VERSION_STRING                 = 1.0\r
+\r
+  ENTRY_POINT                    = PeimInitializeDxeIpl\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC (EBC is for build only)\r
+#\r
+\r
+[Sources.common]\r
+  DxeIpl.h\r
+  DxeLoad.c\r
+\r
+[Sources.Ia32]\r
+  Ia32/VirtualMemory.h ||||PcdDxeIplSwitchToLongMode\r
+  Ia32/VirtualMemory.c ||||PcdDxeIplSwitchToLongMode\r
+  Ia32/DxeLoadFunc.c\r
+  Ia32/IdtVectorAsm.asm||||PcdDxeIplSwitchToLongMode\r
+  Ia32/IdtVectorAsm.S  ||||PcdDxeIplSwitchToLongMode\r
+\r
+[Sources.X64]\r
+  X64/VirtualMemory.h\r
+  X64/VirtualMemory.c\r
+  X64/DxeLoadFunc.c\r
+\r
+[Sources.IPF]\r
+  Ipf/DxeLoadFunc.c\r
+\r
+[Sources.EBC]\r
+  Ebc/DxeLoadFunc.c\r
+\r
+[Sources.ARM]\r
+  Arm/DxeLoadFunc.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  PcdLib\r
+  MemoryAllocationLib\r
+  BaseMemoryLib\r
+  ExtractGuidedSectionLib\r
+  UefiDecompressLib\r
+  ReportStatusCodeLib\r
+  PeiServicesLib\r
+  HobLib\r
+  BaseLib\r
+  PeimEntryPoint\r
+  DebugLib\r
+\r
+[Ppis]\r
+  gEfiDxeIplPpiGuid                 ## PRODUCES\r
+  gEfiEndOfPeiSignalPpiGuid         ## SOMETIMES_PRODUCES(Not produced on S3 boot path)\r
+  gEfiPeiDecompressPpiGuid          ## SOMETIMES_PRODUCES\r
+  gEfiPeiReadOnlyVariable2PpiGuid   ## SOMETIMES_CONSUMES\r
+  gEfiPeiLoadFilePpiGuid            ## CONSUMES\r
+  gEfiPeiS3ResumePpiGuid            ## SOMETIMES_CONSUMES(Consumed on S3 boot path)\r
+  gEfiPeiRecoveryModulePpiGuid      ## SOMETIMES_CONSUMES(Consumed on recovery boot path)\r
+\r
+[Guids]\r
+  gEfiMemoryTypeInformationGuid     ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"\r
+  gEfiMemoryTypeInformationGuid     ## SOMETIMES_PRODUCES ## HOB\r
+\r
+[FeaturePcd.IA32]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode\r
+\r
+[FeaturePcd.common]\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSupportUefiDecompress\r
+\r
+[FixedPcd.common]\r
+  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValuePeiHandoffToDxe\r
+\r
+[Depex]\r
+  gEfiPeiMemoryDiscoveredPpiGuid AND gEfiPeiLoadFilePpiGuid\r
+\r
+#\r
+# [BootMode] \r
+#   S3_RESUME                       ## SOMETIMES_CONSUMES\r
+#   RECOVERY                        ## SOMETIMES_CONSUMES\r
+#\r
+#  \r
+# [Hob]\r
+#   ##\r
+#   # New Stack HoB\r
+#   MEMORY_ALLOCATION               ## PRODUCES\r
+#   ##\r
+#   # Old Stack HOB\r
+#   MEMORY_ALLOCATION               ## CONSUMES\r
+#\r
+# [Hob.IPF]\r
+#   ##\r
+#   # BSP Stack HOB for IPF\r
+#   MEMORY_ALLOCATION               ## PRODUCES\r
+#\r
+# \r
index de40902e35a0488c9f5a97b89016b1b68c89aed7..1caccec347411ae5a0169c5f749bff7887ff5ce0 100644 (file)
@@ -1,22 +1,22 @@
-/** @file
-  Defines PXE Arch type.
-  
-Copyright (c) 2006, Intel Corporation.<BR>
-Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>
-
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution.  The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-
-#ifndef _EFI_PXE_ARCH_H_
-#define _EFI_PXE_ARCH_H_
-
-#define SYS_ARCH  0x0A
-
-#endif
+/** @file\r
+  Defines PXE Arch type.\r
+  \r
+Copyright (c) 2006, Intel Corporation.<BR>\r
+Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
+\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _EFI_PXE_ARCH_H_\r
+#define _EFI_PXE_ARCH_H_\r
+\r
+#define SYS_ARCH  0x0A\r
+\r
+#endif\r
index 7b4978c96275af6f397d4687594608d340b7ceab..ac99e41735ec6cf3f5474014101b045981aa69a0 100644 (file)
@@ -1,99 +1,99 @@
-#/** @file
-# Component name for module UefiPxeBc
-#
-# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.
-#
-#  All rights reserved. This program and the accompanying materials
-#  are licensed and made available under the terms and conditions of the BSD License
-#  which accompanies this distribution. The full text of the license may be found at
-#  http://opensource.org/licenses/bsd-license.php
-#
-#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-#
-#
-#**/
-
-
-[Defines]
-  INF_VERSION                    = 0x00010005
-  BASE_NAME                      = UefiPxeBcDxe
-  FILE_GUID                      = 3B1DEAB5-C75D-442e-9238-8E2FFB62B0BB
-  MODULE_TYPE                    = UEFI_DRIVER
-  VERSION_STRING                 = 1.0
-  ENTRY_POINT                    = PxeBcDriverEntryPoint
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC
-#
-#  DRIVER_BINDING                =  gPxeBcDriverBinding                        
-#  COMPONENT_NAME                =  gPxeBcComponentName
-#  COMPONENT_NAME2               =  gPxeBcComponentName2
-#
-
-[Sources.common]
-  PxeBcMtftp.c
-  PxeBcSupport.h
-  PxeBcSupport.c
-  PxeBcDriver.c
-  PxeBcDhcp.h
-  ComponentName.c
-  PxeBcImpl.c
-  PxeBcImpl.h
-  PxeBcDhcp.c
-  PxeBcMtftp.h
-  PxeBcDriver.h
-
-[Sources.IA32]
-  Ia32/PxeArch.h
-
-[Sources.X64]
-  X64/PxeArch.h
-
-[Sources.IPF]
-  Ipf/PxeArch.h
-
-[Sources.ARM]
-  Arm/PxeArch.h
-
-[Sources.EBC]
-  Ebc/PxeArch.h
-  Ebc/PxeArch.c
-
-[Packages]
-  MdePkg/MdePkg.dec
-  MdeModulePkg/MdeModulePkg.dec
-
-
-
-[LibraryClasses]
-  BaseLib
-  UefiLib
-  UefiBootServicesTableLib
-  UefiDriverEntryPoint
-  BaseMemoryLib
-  MemoryAllocationLib
-  DebugLib
-  NetLib
-  DpcLib
-
-[Guids]
-  gEfiSmbiosTableGuid                              # ALWAYS_CONSUMED
-
-[Protocols]
-  gEfiArpServiceBindingProtocolGuid                # PROTOCOL ALWAYS_CONSUMED
-  gEfiArpProtocolGuid                              # PROTOCOL ALWAYS_CONSUMED
-  gEfiMtftp4ServiceBindingProtocolGuid             # PROTOCOL ALWAYS_CONSUMED
-  gEfiMtftp4ProtocolGuid                           # PROTOCOL ALWAYS_CONSUMED
-  gEfiUdp4ServiceBindingProtocolGuid               # PROTOCOL ALWAYS_CONSUMED
-  gEfiDhcp4ServiceBindingProtocolGuid              # PROTOCOL ALWAYS_CONSUMED
-  gEfiPxeBaseCodeCallbackProtocolGuid              # PROTOCOL ALWAYS_PRODUCED
-  gEfiPxeBaseCodeProtocolGuid                      # PROTOCOL ALWAYS_PRODUCED
-  gEfiLoadFileProtocolGuid                         # PROTOCOL ALWAYS_PRODUCED
-  gEfiDhcp4ProtocolGuid                            # PROTOCOL ALWAYS_CONSUMED
-  gEfiUdp4ProtocolGuid                             # PROTOCOL ALWAYS_CONSUMED
-  gEfiNetworkInterfaceIdentifierProtocolGuid_31    ## SOMETIMES_CONSUMES
-  gEfiIp4ServiceBindingProtocolGuid                # PROTOCOL ALWAYS_CONSUMED
-  gEfiIp4ProtocolGuid                              # PROTOCOL ALWAYS_CONSUMED
+#/** @file\r
+# Component name for module UefiPxeBc\r
+#\r
+# Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.\r
+#\r
+#  All rights reserved. This program and the accompanying materials\r
+#  are licensed and made available under the terms and conditions of the BSD License\r
+#  which accompanies this distribution. The full text of the license may be found at\r
+#  http://opensource.org/licenses/bsd-license.php\r
+#\r
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+#\r
+#\r
+#**/\r
+\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = UefiPxeBcDxe\r
+  FILE_GUID                      = 3B1DEAB5-C75D-442e-9238-8E2FFB62B0BB\r
+  MODULE_TYPE                    = UEFI_DRIVER\r
+  VERSION_STRING                 = 1.0\r
+  ENTRY_POINT                    = PxeBcDriverEntryPoint\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+#  DRIVER_BINDING                =  gPxeBcDriverBinding                        \r
+#  COMPONENT_NAME                =  gPxeBcComponentName\r
+#  COMPONENT_NAME2               =  gPxeBcComponentName2\r
+#\r
+\r
+[Sources.common]\r
+  PxeBcMtftp.c\r
+  PxeBcSupport.h\r
+  PxeBcSupport.c\r
+  PxeBcDriver.c\r
+  PxeBcDhcp.h\r
+  ComponentName.c\r
+  PxeBcImpl.c\r
+  PxeBcImpl.h\r
+  PxeBcDhcp.c\r
+  PxeBcMtftp.h\r
+  PxeBcDriver.h\r
+\r
+[Sources.IA32]\r
+  Ia32/PxeArch.h\r
+\r
+[Sources.X64]\r
+  X64/PxeArch.h\r
+\r
+[Sources.IPF]\r
+  Ipf/PxeArch.h\r
+\r
+[Sources.ARM]\r
+  Arm/PxeArch.h\r
+\r
+[Sources.EBC]\r
+  Ebc/PxeArch.h\r
+  Ebc/PxeArch.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
+\r
+\r
+[LibraryClasses]\r
+  BaseLib\r
+  UefiLib\r
+  UefiBootServicesTableLib\r
+  UefiDriverEntryPoint\r
+  BaseMemoryLib\r
+  MemoryAllocationLib\r
+  DebugLib\r
+  NetLib\r
+  DpcLib\r
+\r
+[Guids]\r
+  gEfiSmbiosTableGuid                              # ALWAYS_CONSUMED\r
+\r
+[Protocols]\r
+  gEfiArpServiceBindingProtocolGuid                # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiArpProtocolGuid                              # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiMtftp4ServiceBindingProtocolGuid             # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiMtftp4ProtocolGuid                           # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiUdp4ServiceBindingProtocolGuid               # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiDhcp4ServiceBindingProtocolGuid              # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiPxeBaseCodeCallbackProtocolGuid              # PROTOCOL ALWAYS_PRODUCED\r
+  gEfiPxeBaseCodeProtocolGuid                      # PROTOCOL ALWAYS_PRODUCED\r
+  gEfiLoadFileProtocolGuid                         # PROTOCOL ALWAYS_PRODUCED\r
+  gEfiDhcp4ProtocolGuid                            # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiUdp4ProtocolGuid                             # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiNetworkInterfaceIdentifierProtocolGuid_31    ## SOMETIMES_CONSUMES\r
+  gEfiIp4ServiceBindingProtocolGuid                # PROTOCOL ALWAYS_CONSUMED\r
+  gEfiIp4ProtocolGuid                              # PROTOCOL ALWAYS_CONSUMED\r
index efd87e91e74bbac9d4e17a199f0781e9948b6a88..90dbe3f22cf48fdd438e1212398771ff82f8aa8b 100644 (file)
@@ -62,7 +62,7 @@ EFIAPI
 FreeMappingDatabase (\r
   IN  OUT  LIST_ENTRY            *MappingDataBase\r
   )\r
-;
+;\r
 \r
 /**\r
   Read the NV environment variable(s) that contain the override mappings from Controller Device Path to\r
@@ -81,7 +81,7 @@ EFIAPI
 InitOverridesMapping (\r
   OUT  LIST_ENTRY            *MappingDataBase\r
   )\r
-;
+;\r
 \r
 /**\r
   Save the memory mapping database into NV environment variable(s).\r
@@ -98,7 +98,7 @@ EFIAPI
 SaveOverridesMapping (\r
   IN  LIST_ENTRY              *MappingDataBase\r
   )\r
-;
+;\r
 \r
 /**\r
   Retrieves the image handle of the platform override driver for a controller in the system from the memory mapping database.\r
@@ -132,7 +132,7 @@ GetDriverFromMapping (
   IN     LIST_ENTRY                                     *MappingDataBase,\r
   IN     EFI_HANDLE                                     CallerImageHandle\r
   )\r
-;
+;\r
 \r
 /**\r
   Check mapping database whether already has the mapping info which\r
@@ -160,7 +160,7 @@ CheckMapping (
   OUT    UINT32                                         *DriverInfoNum  OPTIONAL,\r
   OUT    UINT32                                         *DriverImageNO  OPTIONAL\r
   )\r
-;
+;\r
 \r
 /**\r
   Insert a driver image as a controller's override driver into the mapping database.\r
@@ -189,7 +189,7 @@ InsertDriverImage (
   IN     LIST_ENTRY                                     *MappingDataBase,\r
   IN     UINT32                                         DriverImageNO\r
   )\r
-;
+;\r
 \r
 /**\r
   Delete a controller's override driver from the mapping database.\r
@@ -213,6 +213,6 @@ DeleteDriverImage (
   IN     EFI_DEVICE_PATH_PROTOCOL                       *DriverImageDevicePath,\r
   IN     LIST_ENTRY                                     *MappingDataBase\r
   )\r
-;
+;\r
 \r
 #endif\r