diff options
author | Guo Mang <mang.guo@intel.com> | 2016-12-22 18:17:10 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2016-12-26 19:14:56 +0800 |
commit | d0deab742dccc1c658956123d0f105042de3ea1b (patch) | |
tree | e143632835ef900af7b1d2f75186030720ce86ec /DuetPkg/DxeIpl | |
parent | 8feaa8cc72bcae5637f088d16fcd40b7fed89e24 (diff) | |
download | edk2-platforms-d0deab742dccc1c658956123d0f105042de3ea1b.tar.xz |
DuetPkg: Remove unused Package
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'DuetPkg/DxeIpl')
-rw-r--r-- | DuetPkg/DxeIpl/Debug.c | 82 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/Debug.h | 40 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/DxeInit.c | 278 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/DxeIpl.h | 49 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/DxeIpl.inf | 70 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/HobGeneration.c | 1000 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/HobGeneration.h | 171 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/Ia32/EnterDxeCore.c | 31 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/Ia32/Paging.c | 172 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/Ia32/VirtualMemory.h | 88 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/LegacyTable.c | 357 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/LegacyTable.h | 31 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/PpisNeededByDxeCore.c | 59 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/PpisNeededByDxeCore.h | 64 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/SerialStatusCode.c | 760 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/SerialStatusCode.h | 39 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/X64/EnterDxeCore.c | 32 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/X64/Paging.c | 238 | ||||
-rw-r--r-- | DuetPkg/DxeIpl/X64/VirtualMemory.h | 117 |
19 files changed, 0 insertions, 3678 deletions
diff --git a/DuetPkg/DxeIpl/Debug.c b/DuetPkg/DxeIpl/Debug.c deleted file mode 100644 index 1cb7e39c80..0000000000 --- a/DuetPkg/DxeIpl/Debug.c +++ /dev/null @@ -1,82 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- Debug.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "DxeIpl.h"
-#include <Library/SerialPortLib.h>
-#include "SerialStatusCode.h"
-#include "Debug.h"
-
-UINT8 *mCursor;
-UINT8 mHeaderIndex = 10;
-
-
-VOID
-PrintHeader (
- CHAR8 Char
- )
-{
- *(UINT8 *)(UINTN)(0x000b8000 + mHeaderIndex) = Char;
- mHeaderIndex += 2;
-}
-
-VOID
-ClearScreen (
- VOID
- )
-{
- UINT32 Index;
-
- mCursor = (UINT8 *)(UINTN)(0x000b8000 + 160);
- for (Index = 0; Index < 80 * 49; Index++) {
- *mCursor = ' ';
- mCursor += 2;
- }
- mCursor = (UINT8 *)(UINTN)(0x000b8000 + 160);
-}
-
-VOID
-PrintString (
- IN CONST CHAR8 *FormatString,
- ...
- )
-{
- UINTN Index;
- CHAR8 PrintBuffer[1000];
- VA_LIST Marker;
-
- VA_START (Marker, FormatString);
- AsciiVSPrint (PrintBuffer, sizeof (PrintBuffer), FormatString, Marker);
- VA_END (Marker);
-
- for (Index = 0; PrintBuffer[Index] != 0; Index++) {
- if (PrintBuffer[Index] == '\n') {
- mCursor = (UINT8 *) (UINTN) (0xb8000 + (((((UINTN)mCursor - 0xb8000) + 160) / 160) * 160));
- } else {
- *mCursor = (UINT8) PrintBuffer[Index];
- mCursor += 2;
- }
- }
-
- //
- // All information also output to serial port.
- //
- SerialPortWrite ((UINT8 *) PrintBuffer, Index);
-}
-
diff --git a/DuetPkg/DxeIpl/Debug.h b/DuetPkg/DxeIpl/Debug.h deleted file mode 100644 index 7fcad268ee..0000000000 --- a/DuetPkg/DxeIpl/Debug.h +++ /dev/null @@ -1,40 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- Debug.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _EFILDR_DEBUG_H_
-#define _EFILDR_DEBUG_H_
-
-VOID
-PrintHeader (
- CHAR8 Char
- );
-
-VOID
-PrintString (
- IN CONST CHAR8 *FormatString,
- ...
- );
-
-VOID
-ClearScreen (
- VOID
- );
-
-#endif
diff --git a/DuetPkg/DxeIpl/DxeInit.c b/DuetPkg/DxeIpl/DxeInit.c deleted file mode 100644 index b9a40a8209..0000000000 --- a/DuetPkg/DxeIpl/DxeInit.c +++ /dev/null @@ -1,278 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- DxeInit.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "DxeIpl.h"
-
-#include "LegacyTable.h"
-#include "HobGeneration.h"
-#include "PpisNeededByDxeCore.h"
-#include "Debug.h"
-
-/*
---------------------------------------------------------
- Memory Map: (XX=32,64)
---------------------------------------------------------
-0x0
- IVT
-0x400
- BDA
-0x500
-
-0x7C00
- BootSector
-0x10000
- EfiLdr (relocate by efiXX.COM)
-0x15000
- Efivar.bin (Load by StartXX.COM)
-0x20000
- StartXX.COM (E820 table, Temporary GDT, Temporary IDT)
-0x21000
- EfiXX.COM (Temporary Interrupt Handler)
-0x22000
- EfiLdr.efi + DxeIpl.Z + DxeMain.Z + BFV.Z
-0x86000
- MemoryFreeUnder1M (For legacy driver DMA)
-0x90000
- Temporary 4G PageTable for X64 (6 page)
-0x9F800
- EBDA
-0xA0000
- VGA
-0xC0000
- OPROM
-0xE0000
- FIRMEWARE
-0x100000 (1M)
- Temporary Stack (1M)
-0x200000
-
-MemoryAbove1MB.PhysicalStart <-----------------------------------------------------+
- ... |
- ... |
- <- Phit.EfiMemoryBottom -------------------+ |
- HOB | |
- <- Phit.EfiFreeMemoryBottom | |
- | MemoryFreeAbove1MB.ResourceLength
- <- Phit.EfiFreeMemoryTop ------+ | |
- MemoryDescriptor (For ACPINVS, ACPIReclaim) | 4M = CONSUMED_MEMORY |
- | | |
- Permament 4G PageTable for IA32 or MemoryAllocation | |
- Permament 64G PageTable for X64 | | |
- <------------------------------+ | |
- Permament Stack (0x20 Pages = 128K) | |
- <- Phit.EfiMemoryTop ----------+-----------+---------------+
- NvFV (64K) |
- MMIO
- FtwFV (128K) |
- <----------------------------------------------------------+<---------+
- DxeCore | |
- DxeCore |
- DxeIpl | Allocated in EfiLdr
- <----------------------------------------------------------+ |
- BFV MMIO |
- <- Top of Free Memory reported by E820 --------------------+<---------+
- ACPINVS or
- ACPIReclaim or
- Reserved
- <- Memory Top on RealMemory
-
-0x100000000 (4G)
-
-MemoryFreeAbove4G.Physicalstart <--------------------------------------------------+
- |
- |
- MemoryFreeAbove4GB.ResourceLength
- |
- |
- <--------------------------------------------------+
-*/
-
-VOID
-EnterDxeMain (
- IN VOID *StackTop,
- IN VOID *DxeCoreEntryPoint,
- IN VOID *Hob,
- IN VOID *PageTable
- );
-
-VOID
-DxeInit (
- IN EFILDRHANDOFF *Handoff
- )
-/*++
-
- Routine Description:
-
- This is the entry point after this code has been loaded into memory.
-
-Arguments:
-
-
-Returns:
-
- Calls into EFI Firmware
-
---*/
-{
- VOID *StackTop;
- VOID *StackBottom;
- VOID *PageTableBase;
- VOID *MemoryTopOnDescriptor;
- VOID *MemoryDescriptor;
- VOID *NvStorageBase;
- EFILDRHANDOFF HandoffCopy;
-
- CopyMem ((VOID*) &HandoffCopy, (VOID*) Handoff, sizeof (EFILDRHANDOFF));
- Handoff = &HandoffCopy;
-
- ClearScreen();
-
- PrintString (
- "Enter DxeIpl ...\n"
- "Handoff:\n"
- "Handoff.BfvBase = %p, BfvLength = %x\n"
- "Handoff.DxeIplImageBase = %p, DxeIplImageSize = %x\n"
- "Handoff.DxeCoreImageBase = %p, DxeCoreImageSize = %x\n",
- Handoff->BfvBase, Handoff->BfvSize,
- Handoff->DxeIplImageBase, Handoff->DxeIplImageSize,
- Handoff->DxeCoreImageBase, Handoff->DxeCoreImageSize
- );
-
- //
- // Hob Generation Guild line:
- // * Don't report FV as physical memory
- // * MemoryAllocation Hob should only cover physical memory
- // * Use ResourceDescriptor Hob to report physical memory or Firmware Device and they shouldn't be overlapped
- PrintString ("Prepare Cpu HOB information ...\n");
- PrepareHobCpu ();
-
- //
- // 1. BFV
- //
- PrintString ("Prepare BFV HOB information ...\n");
- PrepareHobBfv (Handoff->BfvBase, Handoff->BfvSize);
-
- //
- // 2. Updates Memory information, and get the top free address under 4GB
- //
- PrintString ("Prepare Memory HOB information ...\n");
- MemoryTopOnDescriptor = PrepareHobMemory (Handoff->MemDescCount, Handoff->MemDesc);
-
- //
- // 3. Put [NV], [Stack], [PageTable], [MemDesc], [HOB] just below the [top free address under 4GB]
- //
-
- // 3.1 NV data
- PrintString ("Prepare NV Storage information ...\n");
- NvStorageBase = PrepareHobNvStorage (MemoryTopOnDescriptor);
- PrintString ("NV Storage Base = %p\n", NvStorageBase);
- // 3.2 Stack
- StackTop = NvStorageBase;
- StackBottom = PrepareHobStack (StackTop);
- PrintString ("Stack Top=0x%x, Stack Bottom=0x%x\n", StackTop, StackBottom);
- // 3.3 Page Table
- PageTableBase = PreparePageTable (StackBottom, gHob->Cpu.SizeOfMemorySpace);
- // 3.4 MemDesc (will be used in PlatformBds)
- MemoryDescriptor = PrepareHobMemoryDescriptor (PageTableBase, Handoff->MemDescCount, Handoff->MemDesc);
- // 3.5 Copy the Hob itself to EfiMemoryBottom, and update the PHIT Hob
- PrepareHobPhit (StackTop, MemoryDescriptor);
-
- //
- // 4. Register the memory occupied by DxeCore and DxeIpl together as DxeCore
- //
- PrintString ("Prepare DxeCore memory Hob ...\n");
- PrepareHobDxeCore (
- Handoff->DxeCoreEntryPoint,
- (EFI_PHYSICAL_ADDRESS)(UINTN)Handoff->DxeCoreImageBase,
- (UINTN)Handoff->DxeIplImageBase + (UINTN)Handoff->DxeIplImageSize - (UINTN)Handoff->DxeCoreImageBase
- );
-
- PrepareHobLegacyTable (gHob);
-
- PreparePpisNeededByDxeCore (gHob);
-
- CompleteHobGeneration ();
-
- //
- // Print Hob Info
- //
- ClearScreen();
- PrintString (
- "HobStart = %p\n"
- "Memory Top = %lx, Bottom = %lx\n"
- "Free Memory Top = %lx, Bottom = %lx\n"
- "NvStorageFvb = %lx, Length = %lx\n"
- "BfvResource = %lx, Length = %lx\n"
- "NvStorageFvResource = %lx, Length = %lx\n"
- "NvStorage = %lx, Length = %lx\n"
- "NvFtwFvResource = %lx, Length = %lx\n"
- "NvFtwWorking = %lx, Length = %lx\n"
- "NvFtwSpare = %lx, Length = %lx\n"
- "Stack = %lx, StackLength = %lx\n"
- "PageTable = %p\n"
- "MemoryFreeUnder1MB = %lx, MemoryFreeUnder1MBLength = %lx\n"
- "MemoryAbove1MB = %lx, MemoryAbove1MBLength = %lx\n"
- "MemoryAbove4GB = %lx, MemoryAbove4GBLength = %lx\n"
- "DxeCore = %lx, DxeCoreLength = %lx\n"
- "MemoryAllocation = %lx, MemoryLength = %lx\n"
- "$",
- gHob,
- gHob->Phit.EfiMemoryTop, gHob->Phit.EfiMemoryBottom,
- gHob->Phit.EfiFreeMemoryTop, gHob->Phit.EfiFreeMemoryBottom,
- gHob->NvStorageFvb.FvbInfo.Entries[0].Base, gHob->NvFtwFvb.FvbInfo.Entries[0].Length,
- gHob->BfvResource.PhysicalStart, gHob->BfvResource.ResourceLength,
- gHob->NvStorageFvResource.PhysicalStart, gHob->NvStorageFvResource.ResourceLength,
- gHob->NvStorage.FvbInfo.Entries[0].Base, gHob->NvStorage.FvbInfo.Entries[0].Length,
- gHob->NvFtwFvResource.PhysicalStart, gHob->NvFtwFvResource.ResourceLength,
- gHob->NvFtwWorking.FvbInfo.Entries[0].Base, gHob->NvFtwWorking.FvbInfo.Entries[0].Length,
- gHob->NvFtwSpare.FvbInfo.Entries[0].Base, gHob->NvFtwSpare.FvbInfo.Entries[0].Length,
- gHob->Stack.AllocDescriptor.MemoryBaseAddress, gHob->Stack.AllocDescriptor.MemoryLength,
- PageTableBase,
- gHob->MemoryFreeUnder1MB.PhysicalStart, gHob->MemoryFreeUnder1MB.ResourceLength,
- gHob->MemoryAbove1MB.PhysicalStart, gHob->MemoryAbove1MB.ResourceLength,
- gHob->MemoryAbove4GB.PhysicalStart, gHob->MemoryAbove4GB.ResourceLength,
- gHob->DxeCore.MemoryAllocationHeader.MemoryBaseAddress, gHob->DxeCore.MemoryAllocationHeader.MemoryLength,
- gHob->MemoryAllocation.AllocDescriptor.MemoryBaseAddress, gHob->MemoryAllocation.AllocDescriptor.MemoryLength
- );
-
- ClearScreen();
- PrintString (
- "\n\n\n\n\n\n\n\n\n\n"
- " WELCOME TO EFI WORLD!\n"
- );
-
- EnterDxeMain (StackTop, Handoff->DxeCoreEntryPoint, gHob, PageTableBase);
- PrintString ("Fail to enter DXE main!\n");
-
- //
- // Should never get here
- //
- CpuDeadLoop ();
-}
-
-EFI_STATUS
-EFIAPI
-_ModuleEntryPoint (
- IN EFILDRHANDOFF *Handoff
- )
-{
- DxeInit(Handoff);
- return EFI_SUCCESS;
-}
diff --git a/DuetPkg/DxeIpl/DxeIpl.h b/DuetPkg/DxeIpl/DxeIpl.h deleted file mode 100644 index 581c2e6f69..0000000000 --- a/DuetPkg/DxeIpl/DxeIpl.h +++ /dev/null @@ -1,49 +0,0 @@ -/** @file
- Internal header file for DxeIpl module.
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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 _DUET_DXEIPL_H_
-#define _DUET_DXEIPL_H_
-
-#include <FrameworkPei.h>
-
-#include "EfiLdrHandoff.h"
-#include "EfiFlashMap.h"
-
-#include <Guid/MemoryTypeInformation.h>
-#include <Guid/PciExpressBaseAddress.h>
-#include <Guid/AcpiDescription.h>
-
-#include <Guid/MemoryAllocationHob.h>
-#include <Guid/Acpi.h>
-#include <Guid/SmBios.h>
-#include <Guid/Mps.h>
-#include <Guid/FlashMapHob.h>
-#include <Guid/SystemNvDataGuid.h>
-#include <Guid/VariableFormat.h>
-#include <Guid/StatusCodeDataTypeDebug.h>
-#include <Guid/DxeCoreFileName.h>
-#include <Guid/LdrMemoryDescriptor.h>
-
-#include <Protocol/Decompress.h>
-#include <Protocol/StatusCode.h>
-#include <Protocol/FirmwareVolumeBlock.h>
-
-#include <Library/BaseLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/ReportStatusCodeLib.h>
-#include <Library/PrintLib.h>
-#include <Library/IoLib.h>
-
-#endif // _DUET_DXEIPL_H_
-
diff --git a/DuetPkg/DxeIpl/DxeIpl.inf b/DuetPkg/DxeIpl/DxeIpl.inf deleted file mode 100644 index ba7a2c2d32..0000000000 --- a/DuetPkg/DxeIpl/DxeIpl.inf +++ /dev/null @@ -1,70 +0,0 @@ -## @file
-#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-# 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.
-#
-# Module Name:
-# DxeIpl.inf
-#
-# Abstract:
-#
-##
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = DxeIpl
- FILE_GUID = 2119BBD7-9432-4f47-B5E2-5C4EA31B6BDC
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
-
-[Packages]
- MdePkg/MdePkg.dec
- DuetPkg/DuetPkg.dec
- MdeModulePkg/MdeModulePkg.dec
- IntelFrameworkPkg/IntelFrameworkPkg.dec
-
-[LibraryClasses]
- BaseLib
- BaseMemoryLib
- PrintLib
- SerialPortLib
- ReportStatusCodeLib
- IoLib
-
-[Guids]
- gEfiVariableGuid
- gDxeCoreFileNameGuid
- gLdrMemoryDescriptorGuid
-
-[Sources]
- DxeIpl.h
- DxeInit.c
- LegacyTable.c
- LegacyTable.h
- PpisNeededByDxeCore.c
- PpisNeededByDxeCore.h
- HobGeneration.c
- HobGeneration.h
- SerialStatusCode.c
- SerialStatusCode.h
- Debug.c
- Debug.h
-
-[Sources.x64]
- X64/EnterDxeCore.c
- X64/Paging.c
- X64/VirtualMemory.h
-
-[Sources.Ia32]
- Ia32/EnterDxeCore.c
- Ia32/Paging.c
- Ia32/VirtualMemory.h
-
-[Depex]
- TRUE
diff --git a/DuetPkg/DxeIpl/HobGeneration.c b/DuetPkg/DxeIpl/HobGeneration.c deleted file mode 100644 index fac74b08fd..0000000000 --- a/DuetPkg/DxeIpl/HobGeneration.c +++ /dev/null @@ -1,1000 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- HobGeneration.c
-
-Abstract:
-
-Revision History:
-
-**/
-#include "DxeIpl.h"
-#include "HobGeneration.h"
-#include "PpisNeededByDxeCore.h"
-#include "FlashLayout.h"
-#include "Debug.h"
-
-#define EFI_CPUID_EXTENDED_FUNCTION 0x80000000
-#define CPUID_EXTENDED_ADD_SIZE 0x80000008
-#define EBDA_VALUE_ADDRESS 0x40E
-
-HOB_TEMPLATE gHobTemplate = {
- { // Phit
- { // Header
- EFI_HOB_TYPE_HANDOFF, // HobType
- sizeof (EFI_HOB_HANDOFF_INFO_TABLE), // HobLength
- 0 // Reserved
- },
- EFI_HOB_HANDOFF_TABLE_VERSION, // Version
- BOOT_WITH_FULL_CONFIGURATION, // BootMode
- 0, // EfiMemoryTop
- 0, // EfiMemoryBottom
- 0, // EfiFreeMemoryTop
- 0, // EfiFreeMemoryBottom
- 0 // EfiEndOfHobList
- },
- { // Bfv
- {
- EFI_HOB_TYPE_FV, // HobType
- sizeof (EFI_HOB_FIRMWARE_VOLUME), // HobLength
- 0 // Reserved
- },
- 0, // BaseAddress
- 0 // Length
- },
- { // BfvResource
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_FIRMWARE_DEVICE, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_TESTED |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE), // ResourceAttribute
- 0, // PhysicalStart
- 0 // ResourceLength
- },
- { // Cpu
- { // Header
- EFI_HOB_TYPE_CPU, // HobType
- sizeof (EFI_HOB_CPU), // HobLength
- 0 // Reserved
- },
- 52, // SizeOfMemorySpace - Architecture Max
- 16, // SizeOfIoSpace,
- {
- 0, 0, 0, 0, 0, 0 // Reserved[6]
- }
- },
- { // Stack HOB
- { // header
- EFI_HOB_TYPE_MEMORY_ALLOCATION, // Hob type
- sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK), // Hob size
- 0 // reserved
- },
- {
- EFI_HOB_MEMORY_ALLOC_STACK_GUID,
- 0x0, // EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
- 0x0, // UINT64 MemoryLength;
- EfiBootServicesData, // EFI_MEMORY_TYPE MemoryType;
- {0, 0, 0, 0} // Reserved Reserved[4];
- }
- },
- { // MemoryAllocation for HOB's & Images
- {
- EFI_HOB_TYPE_MEMORY_ALLOCATION, // HobType
- sizeof (EFI_HOB_MEMORY_ALLOCATION), // HobLength
- 0 // Reserved
- },
- {
- {
- 0, //EFI_HOB_MEMORY_ALLOC_MODULE_GUID // Name
- },
- 0x0, // EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
- 0x0, // UINT64 MemoryLength;
- EfiBootServicesData, // EFI_MEMORY_TYPE MemoryType;
- {
- 0, 0, 0, 0 // Reserved Reserved[4];
- }
- }
- },
- { // MemoryFreeUnder1MB for unused memory that DXE core will claim
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_SYSTEM_MEMORY, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_TESTED |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE),
- 0x0, // PhysicalStart
- 0 // ResourceLength
- },
- { // MemoryFreeAbove1MB for unused memory that DXE core will claim
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_SYSTEM_MEMORY, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_TESTED |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE),
- 0x0, // PhysicalStart
- 0 // ResourceLength
- },
- { // MemoryFreeAbove4GB for unused memory that DXE core will claim
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_SYSTEM_MEMORY, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE),
- 0x0, // PhysicalStart
- 0 // ResourceLength
- },
- { // Memory Allocation Module for DxeCore
- { // header
- EFI_HOB_TYPE_MEMORY_ALLOCATION, // Hob type
- sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE), // Hob size
- 0 // reserved
- },
- {
- EFI_HOB_MEMORY_ALLOC_MODULE_GUID,
- 0x0, // EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
- 0x0, // UINT64 MemoryLength;
- EfiBootServicesCode, // EFI_MEMORY_TYPE MemoryType;
- {
- 0, 0, 0, 0 // UINT8 Reserved[4];
- },
- },
- DXE_CORE_FILE_NAME_GUID,
- 0x0 // EFI_PHYSICAL_ADDRESS of EntryPoint;
- },
- { // MemoryDxeCore
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_SYSTEM_MEMORY, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
-// EFI_RESOURCE_ATTRIBUTE_TESTED | // Do not mark as TESTED, or DxeCore will find it and use it before check Allocation
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE),
- 0x0, // PhysicalStart
- 0 // ResourceLength
- },
- { // Memory Map Hints to reduce fragmentation in the memory map
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (MEMORY_TYPE_INFORMATION_HOB), // Hob size
- 0, // reserved
- },
- EFI_MEMORY_TYPE_INFORMATION_GUID
- },
- {
- {
- EfiACPIReclaimMemory,
- 0x80
- }, // 0x80 pages = 512k for ASL
- {
- EfiACPIMemoryNVS,
- 0x100
- }, // 0x100 pages = 1024k for S3, SMM, etc
- {
- EfiReservedMemoryType,
- 0x04
- }, // 16k for BIOS Reserved
- {
- EfiRuntimeServicesData,
- 0x100
- },
- {
- EfiRuntimeServicesCode,
- 0x100
- },
- {
- EfiBootServicesCode,
- 0x200
- },
- {
- EfiBootServicesData,
- 0x200
- },
- {
- EfiLoaderCode,
- 0x100
- },
- {
- EfiLoaderData,
- 0x100
- },
- {
- EfiMaxMemoryType,
- 0
- }
- }
- },
- { // Pointer to ACPI Table
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (TABLE_HOB), // Hob size
- 0 // reserved
- },
- EFI_ACPI_TABLE_GUID
- },
- 0
- },
- { // Pointer to ACPI20 Table
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (TABLE_HOB), // Hob size
- 0 // reserved
- },
- EFI_ACPI_20_TABLE_GUID
- },
- 0
- },
- { // Pointer to SMBIOS Table
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (TABLE_HOB), // Hob size
- 0 // reserved
- },
- SMBIOS_TABLE_GUID
- },
- 0
- },
- { // Pointer to MPS Table
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (TABLE_HOB), // Hob size
- 0, // reserved
- },
- EFI_MPS_TABLE_GUID
- },
- 0
- },
- /**
- { // Pointer to FlushInstructionCache
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0, // reserved
- EFI_PEI_FLUSH_INSTRUCTION_CACHE_GUID,
- NULL
- },
- { // Pointer to TransferControl
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0, // reserved
- EFI_PEI_TRANSFER_CONTROL_GUID,
- NULL
- },
- { // Pointer to PeCoffLoader
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0, // reserved
- EFI_PEI_PE_COFF_LOADER_GUID,
- NULL
- },
- { // Pointer to EfiDecompress
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0, // reserved
- EFI_DECOMPRESS_PROTOCOL_GUID,
- NULL
- },
- { // Pointer to TianoDecompress
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0, // reserved
- EFI_TIANO_DECOMPRESS_PROTOCOL_GUID,
- NULL
- },
- **/
- { // Pointer to ReportStatusCode
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PROTOCOL_HOB), // Hob size
- 0 // reserved
- },
- EFI_STATUS_CODE_RUNTIME_PROTOCOL_GUID
- },
- 0
- },
- { // EFILDR Memory Descriptor
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (MEMORY_DESC_HOB), // Hob size
- 0 // reserved
- },
- LDR_MEMORY_DESCRIPTOR_GUID
- },
- 0,
- NULL
- },
- { // Pci Express Base Address Hob
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (PCI_EXPRESS_BASE_HOB), // Hob size
- 0 // reserved
- },
- EFI_PCI_EXPRESS_BASE_ADDRESS_GUID
- },
- {
- 0,
- 0,
- 0,
- }
- },
- { // Acpi Description Hob
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (ACPI_DESCRIPTION_HOB), // Hob size
- 0 // reserved
- },
- EFI_ACPI_DESCRIPTION_GUID
- },
- {
- {
- 0,
- },
- }
- },
- { // NV Storage FV Resource
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_FIRMWARE_DEVICE, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_TESTED |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE), // ResourceAttribute
- 0, // PhysicalStart (Fixed later)
- NV_STORAGE_FVB_SIZE // ResourceLength
- },
- { // FVB holding NV Storage
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (FVB_HOB),
- 0
- },
- EFI_FLASH_MAP_HOB_GUID
- },
- {
- {0, 0, 0}, // Reserved[3]
- EFI_FLASH_AREA_GUID_DEFINED, // AreaType
- EFI_SYSTEM_NV_DATA_FV_GUID , // AreaTypeGuid
- 1,
- {
- {
- EFI_FLASH_AREA_FV | EFI_FLASH_AREA_MEMMAPPED_FV, // SubAreaData.Attributes
- 0, // SubAreaData.Reserved
- 0, // SubAreaData.Base (Fixed later)
- NV_STORAGE_FVB_SIZE, // SubAreaData.Length
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID // SubAreaData.FileSystem
- }
- },
- 0, // VolumeSignature (Fixed later)
- NV_STORAGE_FILE_PATH, // Mapped file without padding
- // TotalFVBSize = FileSize + PaddingSize = multiple of BLOCK_SIZE
- NV_STORAGE_SIZE + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH,
- // ActuralSize
- EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH
- }
- },
- { // NV Storage Hob
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (FVB_HOB), // Hob size
- 0 // reserved
- },
- EFI_FLASH_MAP_HOB_GUID
- },
- {
- {0, 0, 0}, // Reserved[3]
- EFI_FLASH_AREA_EFI_VARIABLES, // AreaType
- { 0 }, // AreaTypeGuid
- 1,
- {
- {
- EFI_FLASH_AREA_SUBFV | EFI_FLASH_AREA_MEMMAPPED_FV, // SubAreaData.Attributes
- 0, // SubAreaData.Reserved
- 0, // SubAreaData.Base (Fixed later)
- NV_STORAGE_SIZE, // SubAreaData.Length
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID // SubAreaData.FileSystem
- }
- },
- 0,
- NV_STORAGE_FILE_PATH,
- NV_STORAGE_SIZE,
- 0
- }
- },
- { // NV Ftw FV Resource
- {
- EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, // HobType
- sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), // HobLength
- 0 // Reserved
- },
- {
- 0 // Owner Guid
- },
- EFI_RESOURCE_FIRMWARE_DEVICE, // ResourceType
- (EFI_RESOURCE_ATTRIBUTE_PRESENT |
- EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
- EFI_RESOURCE_ATTRIBUTE_TESTED |
- EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE), // ResourceAttribute
- 0, // PhysicalStart (Fixed later)
- NV_FTW_FVB_SIZE // ResourceLength
- },
- { // FVB holding FTW spaces including Working & Spare space
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (FVB_HOB),
- 0
- },
- EFI_FLASH_MAP_HOB_GUID
- },
- {
- {0, 0, 0}, // Reserved[3]
- EFI_FLASH_AREA_GUID_DEFINED, // AreaType
- EFI_SYSTEM_NV_DATA_FV_GUID, // AreaTypeGuid
- 1,
- {
- {
- EFI_FLASH_AREA_FV | EFI_FLASH_AREA_MEMMAPPED_FV, // SubAreaData.Attributes
- 0, // SubAreaData.Reserved
- 0, // SubAreaData.Base (Fixed later)
- NV_FTW_FVB_SIZE, // SubAreaData.Length
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID // SubAreaData.FileSystem
- }
- },
- 0,
- L"", // Empty String indicates using memory
- 0,
- 0
- }
- },
- { // NV Ftw working Hob
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (FVB_HOB), // Hob size
- 0 // reserved
- },
- EFI_FLASH_MAP_HOB_GUID
- },
- {
- {0, 0, 0}, // Reserved[3]
- EFI_FLASH_AREA_FTW_STATE, // AreaType
- { 0 }, // AreaTypeGuid
- 1,
- {
- {
- EFI_FLASH_AREA_SUBFV | EFI_FLASH_AREA_MEMMAPPED_FV, // SubAreaData.Attributes
- 0, // SubAreaData.Reserved
- 0, // SubAreaData.Base (Fixed later)
- NV_FTW_WORKING_SIZE, // SubAreaData.Length
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID // SubAreaData.FileSystem
- }
- },
- 0, // VolumeSignature
- L"",
- 0,
- 0
- }
- },
- { // NV Ftw spare Hob
- {
- {
- EFI_HOB_TYPE_GUID_EXTENSION, // Hob type
- sizeof (FVB_HOB), // Hob size
- 0 // reserved
- },
- EFI_FLASH_MAP_HOB_GUID
- },
- {
- {0, 0, 0}, // Reserved[3]
- EFI_FLASH_AREA_FTW_BACKUP, // AreaType
- { 0 }, // AreaTypeGuid
- 1,
- {
- {
- EFI_FLASH_AREA_SUBFV | EFI_FLASH_AREA_MEMMAPPED_FV, // SubAreaData.Attributes
- 0, // SubAreaData.Reserved
- 0, // SubAreaData.Base (Fixed later)
- NV_FTW_SPARE_SIZE, // SubAreaData.Length
- EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL_GUID // SubAreaData.FileSystem
- }
- },
- 0,
- L"",
- 0,
- 0
- }
- },
- { // EndOfHobList
- EFI_HOB_TYPE_END_OF_HOB_LIST, // HobType
- sizeof (EFI_HOB_GENERIC_HEADER), // HobLength
- 0 // Reserved
- }
-};
-
-HOB_TEMPLATE *gHob = &gHobTemplate;
-
-VOID *
-PrepareHobMemory (
- IN UINTN NumberOfMemoryMapEntries,
- IN EFI_MEMORY_DESCRIPTOR *EfiMemoryDescriptor
- )
-/*++
-Description:
- Update the Hob filling MemoryFreeUnder1MB, MemoryAbove1MB, MemoryAbove4GB
-
-Arguments:
- NumberOfMemoryMapEntries - Count of Memory Descriptors
- EfiMemoryDescriptor - Point to the buffer containing NumberOfMemoryMapEntries Memory Descriptors
-
-Return:
- VOID * : The end address of MemoryAbove1MB (or the top free memory under 4GB)
---*/
-{
- UINTN Index;
- UINT64 EbdaAddress;
-
- //
- // Prepare Low Memory
- // 0x18 pages is 72 KB.
- //
- EbdaAddress = ((UINT64)(*(UINT16 *)(UINTN)(EBDA_VALUE_ADDRESS))) << 4;
- if (EbdaAddress < 0x9A000 || EbdaAddress > EFI_MEMORY_BELOW_1MB_END) {
- //
- // EBDA should not go below 0x9A000 in any implementation,
- // so add check here to make sure EBDA_VALUE_ADDRESS has a valid value.
- //
- EbdaAddress = EFI_MEMORY_BELOW_1MB_END;
- }
- gHob->MemoryFreeUnder1MB.ResourceLength = EbdaAddress - EFI_MEMORY_BELOW_1MB_START;
- gHob->MemoryFreeUnder1MB.PhysicalStart = EFI_MEMORY_BELOW_1MB_START;
-
- //
- // Prepare High Memory
- // Assume Memory Map is ordered from low to high
- //
- gHob->MemoryAbove1MB.PhysicalStart = 0;
- gHob->MemoryAbove1MB.ResourceLength = 0;
- gHob->MemoryAbove4GB.PhysicalStart = 0;
- gHob->MemoryAbove4GB.ResourceLength = 0;
-
- for (Index = 0; Index < NumberOfMemoryMapEntries; Index++) {
- //
- // Skip regions below 1MB
- //
- if (EfiMemoryDescriptor[Index].PhysicalStart < 0x100000) {
- continue;
- }
- //
- // Process regions above 1MB
- //
- if (EfiMemoryDescriptor[Index].PhysicalStart >= 0x100000) {
- if (EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) {
- if (gHob->MemoryAbove1MB.PhysicalStart == 0) {
- gHob->MemoryAbove1MB.PhysicalStart = EfiMemoryDescriptor[Index].PhysicalStart;
- gHob->MemoryAbove1MB.ResourceLength = LShiftU64 (EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT);
- } else if (gHob->MemoryAbove1MB.PhysicalStart + gHob->MemoryAbove1MB.ResourceLength == EfiMemoryDescriptor[Index].PhysicalStart) {
- gHob->MemoryAbove1MB.ResourceLength += LShiftU64 (EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT);
- }
- }
- if ((EfiMemoryDescriptor[Index].Type == EfiReservedMemoryType) ||
- (EfiMemoryDescriptor[Index].Type >= EfiACPIReclaimMemory) ) {
- continue;
- }
- if ((EfiMemoryDescriptor[Index].Type == EfiRuntimeServicesCode) ||
- (EfiMemoryDescriptor[Index].Type == EfiRuntimeServicesData)) {
- break;
- }
- }
- //
- // Process region above 4GB
- //
- if (EfiMemoryDescriptor[Index].PhysicalStart >= 0x100000000LL) {
- if (EfiMemoryDescriptor[Index].Type == EfiConventionalMemory) {
- if (gHob->MemoryAbove4GB.PhysicalStart == 0) {
- gHob->MemoryAbove4GB.PhysicalStart = EfiMemoryDescriptor[Index].PhysicalStart;
- gHob->MemoryAbove4GB.ResourceLength = LShiftU64 (EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT);
- }
- if (gHob->MemoryAbove4GB.PhysicalStart + gHob->MemoryAbove4GB.ResourceLength ==
- EfiMemoryDescriptor[Index].PhysicalStart) {
- gHob->MemoryAbove4GB.ResourceLength += LShiftU64 (EfiMemoryDescriptor[Index].NumberOfPages, EFI_PAGE_SHIFT);
- }
- }
- }
- }
-
- if (gHob->MemoryAbove4GB.ResourceLength == 0) {
- //
- // If there is no memory above 4GB then change the resource descriptor HOB
- // into another type. I'm doing this as it's unclear if a resource
- // descriptor HOB of length zero is valid. Spec does not say it's illegal,
- // but code in EDK does not seem to handle this case.
- //
- gHob->MemoryAbove4GB.Header.HobType = EFI_HOB_TYPE_UNUSED;
- }
-
- return (VOID *)(UINTN)(gHob->MemoryAbove1MB.PhysicalStart + gHob->MemoryAbove1MB.ResourceLength);
-}
-
-VOID *
-PrepareHobStack (
- IN VOID *StackTop
- )
-{
- gHob->Stack.AllocDescriptor.MemoryLength = EFI_MEMORY_STACK_PAGE_NUM * EFI_PAGE_SIZE;
- gHob->Stack.AllocDescriptor.MemoryBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)StackTop - gHob->Stack.AllocDescriptor.MemoryLength;
-
- return (VOID *)(UINTN)gHob->Stack.AllocDescriptor.MemoryBaseAddress;
-}
-
-VOID *
-PrepareHobMemoryDescriptor (
- VOID *MemoryDescriptorTop,
- UINTN MemDescCount,
- EFI_MEMORY_DESCRIPTOR *MemDesc
- )
-{
- gHob->MemoryDescriptor.MemDescCount = MemDescCount;
- gHob->MemoryDescriptor.MemDesc = (EFI_MEMORY_DESCRIPTOR *)((UINTN)MemoryDescriptorTop - MemDescCount * sizeof(EFI_MEMORY_DESCRIPTOR));
- //
- // Make MemoryDescriptor.MemDesc page aligned
- //
- gHob->MemoryDescriptor.MemDesc = (EFI_MEMORY_DESCRIPTOR *)((UINTN) gHob->MemoryDescriptor.MemDesc & ~EFI_PAGE_MASK);
-
- CopyMem (gHob->MemoryDescriptor.MemDesc, MemDesc, MemDescCount * sizeof(EFI_MEMORY_DESCRIPTOR));
-
- return gHob->MemoryDescriptor.MemDesc;
-}
-
-VOID
-PrepareHobBfv (
- VOID *Bfv,
- UINTN BfvLength
- )
-{
- //UINTN BfvLengthPageSize;
-
- //
- // Calculate BFV location at top of the memory region.
- // This is like a RAM Disk. Align to page boundry.
- //
- //BfvLengthPageSize = EFI_PAGES_TO_SIZE (EFI_SIZE_TO_PAGES (BfvLength));
-
- gHob->Bfv.BaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)Bfv;
- gHob->Bfv.Length = BfvLength;
-
- //
- // Resource descriptor for the FV
- //
- gHob->BfvResource.PhysicalStart = gHob->Bfv.BaseAddress;
- gHob->BfvResource.ResourceLength = gHob->Bfv.Length;
-}
-
-VOID
-PrepareHobDxeCore (
- VOID *DxeCoreEntryPoint,
- EFI_PHYSICAL_ADDRESS DxeCoreImageBase,
- UINT64 DxeCoreLength
- )
-{
- gHob->DxeCore.MemoryAllocationHeader.MemoryBaseAddress = DxeCoreImageBase;
- gHob->DxeCore.MemoryAllocationHeader.MemoryLength = DxeCoreLength;
- gHob->DxeCore.EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)DxeCoreEntryPoint;
-
-
- gHob->MemoryDxeCore.PhysicalStart = DxeCoreImageBase;
- gHob->MemoryDxeCore.ResourceLength = DxeCoreLength;
-}
-
-VOID *
-PrepareHobNvStorage (
- VOID *NvStorageTop
- )
-/*
- Initialize Block-Aligned Firmware Block.
-
- Variable:
- +-------------------+
- | FV_Header |
- +-------------------+
- | |
- |VAR_STORAGE(0x4000)|
- | |
- +-------------------+
- FTW:
- +-------------------+
- | FV_Header |
- +-------------------+
- | |
- | Working(0x2000) |
- | |
- +-------------------+
- | |
- | Spare(0x10000) |
- | |
- +-------------------+
-*/
-{
- STATIC VARIABLE_STORE_HEADER VarStoreHeader = {
- VARIABLE_STORE_SIGNATURE,
- 0xffffffff, // will be fixed in Variable driver
- VARIABLE_STORE_FORMATTED,
- VARIABLE_STORE_HEALTHY,
- 0,
- 0
- };
-
- STATIC EFI_FIRMWARE_VOLUME_HEADER NvStorageFvbHeader = {
- {
- 0,
- }, // ZeroVector[16]
- EFI_SYSTEM_NV_DATA_FV_GUID,
- NV_STORAGE_FVB_SIZE,
- EFI_FVH_SIGNATURE,
- EFI_FVB_READ_ENABLED_CAP |
- EFI_FVB_READ_STATUS |
- EFI_FVB_WRITE_ENABLED_CAP |
- EFI_FVB_WRITE_STATUS |
- EFI_FVB_ERASE_POLARITY,
- EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH,
- 0, // CheckSum
- 0, // ExtHeaderOffset
- {
- 0,
- }, // Reserved[1]
- 1, // Revision
- {
- {
- NV_STORAGE_FVB_BLOCK_NUM,
- FV_BLOCK_SIZE,
- }
- }
- };
-
- STATIC EFI_FV_BLOCK_MAP_ENTRY BlockMapEntryEnd = {0, 0};
-
- EFI_PHYSICAL_ADDRESS StorageFvbBase;
- EFI_PHYSICAL_ADDRESS FtwFvbBase;
-
- UINT16 *Ptr;
- UINT16 Checksum;
-
-
- //
- // Use first 16-byte Reset Vector of FVB to store extra information
- // UINT32 Offset 0 stores the volume signature
- // UINT8 Offset 4 : should init the Variable Store Header if non-zero
- //
- gHob->NvStorageFvb.FvbInfo.VolumeId = *(UINT32 *) (UINTN) (NV_STORAGE_STATE);
- gHob->NvStorage. FvbInfo.VolumeId = *(UINT32 *) (UINTN) (NV_STORAGE_STATE);
-
- //
- // *(NV_STORAGE_STATE + 4):
- // 2 - Size error
- // 1 - File not exist
- // 0 - File exist with correct size
- //
- if (*(UINT8 *) (UINTN) (NV_STORAGE_STATE + 4) == 2) {
- ClearScreen ();
- PrintString ("Error: Size of Efivar.bin should be 16k!\n");
- CpuDeadLoop();
- }
-
- if (*(UINT8 *) (UINTN) (NV_STORAGE_STATE + 4) != 0) {
- //
- // Efivar.bin doesn't exist
- // 1. Init variable storage header to valid header
- //
- CopyMem (
- (VOID *) (UINTN) NV_STORAGE_START,
- &VarStoreHeader,
- sizeof (VARIABLE_STORE_HEADER)
- );
- //
- // 2. set all bits in variable storage body to 1
- //
- SetMem (
- (VOID *) (UINTN) (NV_STORAGE_START + sizeof (VARIABLE_STORE_HEADER)),
- NV_STORAGE_SIZE - sizeof (VARIABLE_STORE_HEADER),
- 0xff
- );
- }
-
- //
- // Relocate variable storage
- //
- // 1. Init FVB Header to valid header: First 0x48 bytes
- // In real platform, these fields are fixed by tools
- //
- //
- Checksum = 0;
- for (
- Ptr = (UINT16 *) &NvStorageFvbHeader;
- Ptr < (UINT16 *) ((UINTN) (UINT8 *) &NvStorageFvbHeader + sizeof (EFI_FIRMWARE_VOLUME_HEADER));
- ++Ptr
- ) {
- Checksum = (UINT16) (Checksum + (*Ptr));
- }
- NvStorageFvbHeader.Checksum = (UINT16) (0x10000 - Checksum);
- StorageFvbBase = (EFI_PHYSICAL_ADDRESS)(((UINTN)NvStorageTop - NV_STORAGE_FVB_SIZE - NV_FTW_FVB_SIZE) & ~EFI_PAGE_MASK);
- CopyMem ((VOID *) (UINTN) StorageFvbBase, &NvStorageFvbHeader, sizeof (EFI_FIRMWARE_VOLUME_HEADER));
- CopyMem (
- (VOID *) (UINTN) (StorageFvbBase + sizeof (EFI_FIRMWARE_VOLUME_HEADER)),
- &BlockMapEntryEnd,
- sizeof (EFI_FV_BLOCK_MAP_ENTRY)
- );
-
- //
- // 2. Relocate variable data
- //
- CopyMem (
- (VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH),
- (VOID *) (UINTN) NV_STORAGE_START,
- NV_STORAGE_SIZE
- );
-
- //
- // 3. Set the remaining memory to 0xff
- //
- SetMem (
- (VOID *) (UINTN) (StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH + NV_STORAGE_SIZE),
- NV_STORAGE_FVB_SIZE - NV_STORAGE_SIZE - EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH,
- 0xff
- );
-
- //
- // Create the FVB holding NV Storage in memory
- //
- gHob->NvStorageFvResource.PhysicalStart =
- gHob->NvStorageFvb.FvbInfo.Entries[0].Base = StorageFvbBase;
- //
- // Create the NV Storage Hob
- //
- gHob->NvStorage.FvbInfo.Entries[0].Base = StorageFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH;
-
- //
- // Create the FVB holding FTW spaces
- //
- FtwFvbBase = (EFI_PHYSICAL_ADDRESS)((UINTN) StorageFvbBase + NV_STORAGE_FVB_SIZE);
- gHob->NvFtwFvResource.PhysicalStart =
- gHob->NvFtwFvb.FvbInfo.Entries[0].Base = FtwFvbBase;
- //
- // Put FTW Working in front
- //
- gHob->NvFtwWorking.FvbInfo.Entries[0].Base = FtwFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH;
-
- //
- // Put FTW Spare area after FTW Working area
- //
- gHob->NvFtwSpare.FvbInfo.Entries[0].Base =
- (EFI_PHYSICAL_ADDRESS)((UINTN) FtwFvbBase + EFI_RUNTIME_UPDATABLE_FV_HEADER_LENGTH + NV_FTW_WORKING_SIZE);
-
- return (VOID *)(UINTN)StorageFvbBase;
-}
-
-VOID
-PrepareHobPhit (
- VOID *MemoryTop,
- VOID *FreeMemoryTop
- )
-{
- gHob->Phit.EfiMemoryTop = (EFI_PHYSICAL_ADDRESS)(UINTN)MemoryTop;
- gHob->Phit.EfiMemoryBottom = gHob->Phit.EfiMemoryTop - CONSUMED_MEMORY;
- gHob->Phit.EfiFreeMemoryTop = (EFI_PHYSICAL_ADDRESS)(UINTN)FreeMemoryTop;
- gHob->Phit.EfiFreeMemoryBottom = gHob->Phit.EfiMemoryBottom + sizeof(HOB_TEMPLATE);
-
- CopyMem ((VOID *)(UINTN)gHob->Phit.EfiMemoryBottom, gHob, sizeof(HOB_TEMPLATE));
- gHob = (HOB_TEMPLATE *)(UINTN)gHob->Phit.EfiMemoryBottom;
-
- gHob->Phit.EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS)(UINTN)&gHob->EndOfHobList;
-}
-
-VOID
-PrepareHobCpu (
- VOID
- )
-{
- UINT32 CpuidEax;
-
- //
- // Create a CPU hand-off information
- //
- gHob->Cpu.SizeOfMemorySpace = 36;
-
- AsmCpuid (EFI_CPUID_EXTENDED_FUNCTION, &CpuidEax, NULL, NULL, NULL);
- if (CpuidEax >= CPUID_EXTENDED_ADD_SIZE) {
- AsmCpuid (CPUID_EXTENDED_ADD_SIZE, &CpuidEax, NULL, NULL, NULL);
- gHob->Cpu.SizeOfMemorySpace = (UINT8)(CpuidEax & 0xFF);
- }
-}
-
-VOID
-CompleteHobGeneration (
- VOID
- )
-{
- gHob->MemoryAllocation.AllocDescriptor.MemoryBaseAddress = gHob->Phit.EfiFreeMemoryTop;
- //
- // Reserve all the memory under Stack above FreeMemoryTop as allocated
- //
- gHob->MemoryAllocation.AllocDescriptor.MemoryLength = gHob->Stack.AllocDescriptor.MemoryBaseAddress - gHob->Phit.EfiFreeMemoryTop;
-
- //
- // adjust Above1MB ResourceLength
- //
- if (gHob->MemoryAbove1MB.PhysicalStart + gHob->MemoryAbove1MB.ResourceLength > gHob->Phit.EfiMemoryTop) {
- gHob->MemoryAbove1MB.ResourceLength = gHob->Phit.EfiMemoryTop - gHob->MemoryAbove1MB.PhysicalStart;
- }
-}
-
diff --git a/DuetPkg/DxeIpl/HobGeneration.h b/DuetPkg/DxeIpl/HobGeneration.h deleted file mode 100644 index f9f8f315ab..0000000000 --- a/DuetPkg/DxeIpl/HobGeneration.h +++ /dev/null @@ -1,171 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- HobGeneration.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _DXELDR_HOB_GENERATION_H_
-#define _DXELDR_HOB_GENERATION_H_
-
-#include "DxeIpl.h"
-
-#define EFI_MEMORY_BELOW_1MB_START 0x86000
-#define EFI_MEMORY_BELOW_1MB_END 0x9F800
-#define EFI_MEMORY_STACK_PAGE_NUM 0x20
-#define CONSUMED_MEMORY 0x100000 * 80
-
-#define NV_STORAGE_START 0x15000
-#define NV_STORAGE_STATE 0x19000
-
-#pragma pack(1)
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- EFI_MEMORY_TYPE_INFORMATION Info[10];
-} MEMORY_TYPE_INFORMATION_HOB;
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- EFI_PHYSICAL_ADDRESS Table;
-} TABLE_HOB;
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- EFI_PHYSICAL_ADDRESS Interface;
-} PROTOCOL_HOB;
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- // Note: we get only one PCI Segment now.
- EFI_PCI_EXPRESS_BASE_ADDRESS_INFORMATION PciExpressBaseAddressInfo;
-} PCI_EXPRESS_BASE_HOB;
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- EFI_ACPI_DESCRIPTION AcpiDescription;
-} ACPI_DESCRIPTION_HOB;
-
-typedef struct {
- EFI_HOB_GUID_TYPE Hob;
- EFI_FLASH_MAP_FS_ENTRY_DATA FvbInfo;
-} FVB_HOB;
-
-typedef struct {
- EFI_HOB_HANDOFF_INFO_TABLE Phit;
- EFI_HOB_FIRMWARE_VOLUME Bfv;
- EFI_HOB_RESOURCE_DESCRIPTOR BfvResource;
- EFI_HOB_CPU Cpu;
- EFI_HOB_MEMORY_ALLOCATION_STACK Stack;
- EFI_HOB_MEMORY_ALLOCATION MemoryAllocation;
- EFI_HOB_RESOURCE_DESCRIPTOR MemoryFreeUnder1MB;
- EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove1MB;
- EFI_HOB_RESOURCE_DESCRIPTOR MemoryAbove4GB;
- EFI_HOB_MEMORY_ALLOCATION_MODULE DxeCore;
- EFI_HOB_RESOURCE_DESCRIPTOR MemoryDxeCore;
- MEMORY_TYPE_INFORMATION_HOB MemoryTypeInfo;
- TABLE_HOB Acpi;
- TABLE_HOB Acpi20;
- TABLE_HOB Smbios;
- TABLE_HOB Mps;
- /**
- PROTOCOL_HOB FlushInstructionCache;
- PROTOCOL_HOB TransferControl;
- PROTOCOL_HOB PeCoffLoader;
- PROTOCOL_HOB EfiDecompress;
- PROTOCOL_HOB TianoDecompress;
- **/
- PROTOCOL_HOB SerialStatusCode;
- MEMORY_DESC_HOB MemoryDescriptor;
- PCI_EXPRESS_BASE_HOB PciExpress;
- ACPI_DESCRIPTION_HOB AcpiInfo;
-
- EFI_HOB_RESOURCE_DESCRIPTOR NvStorageFvResource;
-
- FVB_HOB NvStorageFvb;
- FVB_HOB NvStorage;
-
- EFI_HOB_RESOURCE_DESCRIPTOR NvFtwFvResource;
- FVB_HOB NvFtwFvb;
- FVB_HOB NvFtwWorking;
- FVB_HOB NvFtwSpare;
-
- EFI_HOB_GENERIC_HEADER EndOfHobList;
-} HOB_TEMPLATE;
-
-#pragma pack()
-
-extern HOB_TEMPLATE *gHob;
-
-VOID *
-PrepareHobStack (
- IN VOID *StackTop
- );
-
-VOID
-PrepareHobBfv (
- VOID *Bfv,
- UINTN BfvLength
- );
-
-VOID *
-PrepareHobMemory (
- IN UINTN NumberOfMemoryMapEntries,
- IN EFI_MEMORY_DESCRIPTOR *EfiMemoryDescriptor
- );
-
-VOID
-PrepareHobDxeCore (
- VOID *DxeCoreEntryPoint,
- EFI_PHYSICAL_ADDRESS DxeCoreImageBase,
- UINT64 DxeCoreLength
- );
-
-VOID *
-PreparePageTable (
- VOID *PageNumberTop,
- UINT8 SizeOfMemorySpace
- );
-
-VOID *
-PrepareHobMemoryDescriptor (
- VOID *MemoryDescriptorTop,
- UINTN MemDescCount,
- EFI_MEMORY_DESCRIPTOR *MemDesc
- );
-
-VOID
-PrepareHobPhit (
- VOID *MemoryTop,
- VOID *FreeMemoryTop
- );
-
-VOID *
-PrepareHobNvStorage (
- VOID *NvStorageTop
- );
-
-VOID
-PrepareHobCpu (
- VOID
- );
-
-VOID
-CompleteHobGeneration (
- VOID
- );
-
-#endif
diff --git a/DuetPkg/DxeIpl/Ia32/EnterDxeCore.c b/DuetPkg/DxeIpl/Ia32/EnterDxeCore.c deleted file mode 100644 index aff0ac67c4..0000000000 --- a/DuetPkg/DxeIpl/Ia32/EnterDxeCore.c +++ /dev/null @@ -1,31 +0,0 @@ -/** @file
- IA32 specific code to enter DxeCore
-
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
-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"
-
-VOID
-EnterDxeMain (
- IN VOID *StackTop,
- IN VOID *DxeCoreEntryPoint,
- IN VOID *Hob,
- IN VOID *PageTable
- )
-{
- SwitchStack (
- (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
- Hob,
- NULL,
- StackTop
- );
-}
diff --git a/DuetPkg/DxeIpl/Ia32/Paging.c b/DuetPkg/DxeIpl/Ia32/Paging.c deleted file mode 100644 index eb44042c4e..0000000000 --- a/DuetPkg/DxeIpl/Ia32/Paging.c +++ /dev/null @@ -1,172 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- Paging.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "DxeIpl.h"
-#include "HobGeneration.h"
-#include "VirtualMemory.h"
-#include "Debug.h"
-
-#define EFI_PAGE_SIZE_4K 0x1000
-#define EFI_PAGE_SIZE_4M 0x400000
-
-//
-// Create 4G 4M-page table
-// PDE (31:22) : 1024 entries
-//
-#define EFI_MAX_ENTRY_NUM 1024
-
-#define EFI_PDE_ENTRY_NUM EFI_MAX_ENTRY_NUM
-
-#define EFI_PDE_PAGE_NUM 1
-
-#define EFI_PAGE_NUMBER_4M (EFI_PDE_PAGE_NUM)
-
-//
-// Create 4M 4K-page table
-// PTE (21:12) : 1024 entries
-//
-#define EFI_PTE_ENTRY_NUM EFI_MAX_ENTRY_NUM
-#define EFI_PTE_PAGE_NUM 1
-
-#define EFI_PAGE_NUMBER_4K (EFI_PTE_PAGE_NUM)
-
-#define EFI_PAGE_NUMBER (EFI_PAGE_NUMBER_4M + EFI_PAGE_NUMBER_4K)
-
-VOID
-EnableNullPointerProtection (
- UINT8 *PageTable
- )
-{
- IA32_PAGE_TABLE_ENTRY_4K *PageTableEntry4KB;
-
- PageTableEntry4KB = (IA32_PAGE_TABLE_ENTRY_4K *)((UINTN)PageTable + EFI_PAGE_NUMBER_4M * EFI_PAGE_SIZE_4K);
-
- //
- // Fill in the Page Table entries
- // Mark 0~4K as not present
- //
- PageTableEntry4KB->Bits.Present = 0;
-
- return ;
-}
-
-VOID
-Ia32Create4KPageTables (
- UINT8 *PageTable
- )
-{
- UINT64 PageAddress;
- UINTN PTEIndex;
- IA32_PAGE_DIRECTORY_ENTRY_4K *PageDirectoryEntry4KB;
- IA32_PAGE_TABLE_ENTRY_4K *PageTableEntry4KB;
-
- PageAddress = 0;
-
- //
- // Page Table structure 2 level 4K.
- //
- // Page Table 4K : PageDirectoryEntry4K : bits 31-22
- // PageTableEntry : bits 21-12
- //
-
- PageTableEntry4KB = (IA32_PAGE_TABLE_ENTRY_4K *)((UINTN)PageTable + EFI_PAGE_NUMBER_4M * EFI_PAGE_SIZE_4K);
- PageDirectoryEntry4KB = (IA32_PAGE_DIRECTORY_ENTRY_4K *)((UINTN)PageTable);
-
- PageDirectoryEntry4KB->Uint32 = (UINT32)(UINTN)PageTableEntry4KB;
- PageDirectoryEntry4KB->Bits.ReadWrite = 0;
- PageDirectoryEntry4KB->Bits.Present = 1;
- PageDirectoryEntry4KB->Bits.MustBeZero = 1;
-
- for (PTEIndex = 0; PTEIndex < EFI_PTE_ENTRY_NUM; PTEIndex++, PageTableEntry4KB++) {
- //
- // Fill in the Page Table entries
- //
- PageTableEntry4KB->Uint32 = (UINT32)PageAddress;
- PageTableEntry4KB->Bits.ReadWrite = 1;
- PageTableEntry4KB->Bits.Present = 1;
-
- PageAddress += EFI_PAGE_SIZE_4K;
- }
-
- return ;
-}
-
-VOID
-Ia32Create4MPageTables (
- UINT8 *PageTable
- )
-{
- UINT32 PageAddress;
- UINT8 *TempPageTable;
- UINTN PDEIndex;
- IA32_PAGE_TABLE_ENTRY_4M *PageDirectoryEntry4MB;
-
- TempPageTable = PageTable;
-
- PageAddress = 0;
-
- //
- // Page Table structure 1 level 4MB.
- //
- // Page Table 4MB : PageDirectoryEntry4M : bits 31-22
- //
-
- PageDirectoryEntry4MB = (IA32_PAGE_TABLE_ENTRY_4M *)TempPageTable;
-
- for (PDEIndex = 0; PDEIndex < EFI_PDE_ENTRY_NUM; PDEIndex++, PageDirectoryEntry4MB++) {
- //
- // Fill in the Page Directory entries
- //
- PageDirectoryEntry4MB->Uint32 = (UINT32)PageAddress;
- PageDirectoryEntry4MB->Bits.ReadWrite = 1;
- PageDirectoryEntry4MB->Bits.Present = 1;
- PageDirectoryEntry4MB->Bits.MustBe1 = 1;
-
- PageAddress += EFI_PAGE_SIZE_4M;
- }
-
- return ;
-}
-
-VOID *
-PreparePageTable (
- VOID *PageNumberTop,
- UINT8 SizeOfMemorySpace
- )
-/*++
-Description:
- Generate pagetable below PageNumberTop,
- and return the bottom address of pagetable for putting other things later.
---*/
-{
- VOID *PageNumberBase;
-
- PageNumberBase = (VOID *)((UINTN)PageNumberTop - EFI_PAGE_NUMBER * EFI_PAGE_SIZE_4K);
- ZeroMem (PageNumberBase, EFI_PAGE_NUMBER * EFI_PAGE_SIZE_4K);
-
- Ia32Create4MPageTables (PageNumberBase);
- Ia32Create4KPageTables (PageNumberBase);
- //
- // Not enable NULL Pointer Protection if using INTX call
- //
-// EnableNullPointerProtection (PageNumberBase);
-
- return PageNumberBase;
-}
diff --git a/DuetPkg/DxeIpl/Ia32/VirtualMemory.h b/DuetPkg/DxeIpl/Ia32/VirtualMemory.h deleted file mode 100644 index 0b5fc0ef26..0000000000 --- a/DuetPkg/DxeIpl/Ia32/VirtualMemory.h +++ /dev/null @@ -1,88 +0,0 @@ -/** @file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- VirtualMemory.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _VIRTUAL_MEMORY_H_
-#define _VIRTUAL_MEMORY_H_
-
-#pragma pack(1)
-
-//
-// Page Directory Entry 4K
-//
-typedef union {
- struct {
- UINT32 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT32 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT32 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT32 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT32 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT32 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT32 MustBeZero:3; // Must Be Zero
- UINT32 Available:3; // Available for use by system software
- UINT32 PageTableBaseAddress:20; // Page Table Base Address
- } Bits;
- UINT32 Uint32;
-} IA32_PAGE_DIRECTORY_ENTRY_4K;
-
-//
-// Page Table Entry 4K
-//
-typedef union {
- struct {
- UINT32 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT32 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT32 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT32 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT32 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT32 Accessed:1; // 0 = Not accessed (cleared by software), 1 = Accessed (set by CPU)
- UINT32 Dirty:1; // 0 = Not written to (cleared by software), 1 = Written to (set by CPU)
- UINT32 PAT:1; // 0 = Disable PAT, 1 = Enable PAT
- UINT32 Global:1; // Ignored
- UINT32 Available:3; // Available for use by system software
- UINT32 PageTableBaseAddress:20; // Page Table Base Address
- } Bits;
- UINT32 Uint32;
-} IA32_PAGE_TABLE_ENTRY_4K;
-
-//
-// Page Table Entry 4M
-//
-typedef union {
- struct {
- UINT32 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT32 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT32 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT32 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT32 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT32 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT32 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page
- UINT32 MustBe1:1; // Must be 1
- UINT32 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
- UINT32 Available:3; // Available for use by system software
- UINT32 PAT:1; //
- UINT32 MustBeZero:9; // Must be zero;
- UINT32 PageTableBaseAddress:10; // Page Table Base Address
- } Bits;
- UINT32 Uint32;
-} IA32_PAGE_TABLE_ENTRY_4M;
-
-#pragma pack()
-
-#endif
diff --git a/DuetPkg/DxeIpl/LegacyTable.c b/DuetPkg/DxeIpl/LegacyTable.c deleted file mode 100644 index 1c822f867d..0000000000 --- a/DuetPkg/DxeIpl/LegacyTable.c +++ /dev/null @@ -1,357 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- LegacyTable.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "DxeIpl.h"
-#include "HobGeneration.h"
-#include "Debug.h"
-
-#define MPS_PTR SIGNATURE_32('_','M','P','_')
-#define SMBIOS_PTR SIGNATURE_32('_','S','M','_')
-
-#define EBDA_BASE_ADDRESS 0x40E
-
-VOID *
-FindAcpiRsdPtr (
- VOID
- )
-{
- UINTN Address;
- UINTN Index;
-
- //
- // First Seach 0x0e0000 - 0x0fffff for RSD Ptr
- //
- for (Address = 0xe0000; Address < 0xfffff; Address += 0x10) {
- if (*(UINT64 *)(Address) == EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE) {
- return (VOID *)Address;
- }
- }
-
- //
- // Search EBDA
- //
-
- Address = (*(UINT16 *)(UINTN)(EBDA_BASE_ADDRESS)) << 4;
- for (Index = 0; Index < 0x400 ; Index += 16) {
- if (*(UINT64 *)(Address + Index) == EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE) {
- return (VOID *)Address;
- }
- }
- return NULL;
-}
-
-VOID *
-FindSMBIOSPtr (
- VOID
- )
-{
- UINTN Address;
-
- //
- // First Seach 0x0f0000 - 0x0fffff for SMBIOS Ptr
- //
- for (Address = 0xf0000; Address < 0xfffff; Address += 0x10) {
- if (*(UINT32 *)(Address) == SMBIOS_PTR) {
- return (VOID *)Address;
- }
- }
- return NULL;
-}
-
-VOID *
-FindMPSPtr (
- VOID
- )
-{
- UINTN Address;
- UINTN Index;
-
- //
- // First Seach 0x0e0000 - 0x0fffff for MPS Ptr
- //
- for (Address = 0xe0000; Address < 0xfffff; Address += 0x10) {
- if (*(UINT32 *)(Address) == MPS_PTR) {
- return (VOID *)Address;
- }
- }
-
- //
- // Search EBDA
- //
-
- Address = (*(UINT16 *)(UINTN)(EBDA_BASE_ADDRESS)) << 4;
- for (Index = 0; Index < 0x400 ; Index += 16) {
- if (*(UINT32 *)(Address + Index) == MPS_PTR) {
- return (VOID *)Address;
- }
- }
- return NULL;
-}
-
-#pragma pack(1)
-
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT32 Entry;
-} RSDT_TABLE;
-
-typedef struct {
- EFI_ACPI_DESCRIPTION_HEADER Header;
- UINT64 Entry;
-} XSDT_TABLE;
-
-#pragma pack()
-
-VOID
-ScanTableInRSDT (
- RSDT_TABLE *Rsdt,
- UINT32 Signature,
- EFI_ACPI_DESCRIPTION_HEADER **FoundTable
- )
-{
- UINTN Index;
- UINT32 EntryCount;
- UINT32 *EntryPtr;
- EFI_ACPI_DESCRIPTION_HEADER *Table;
-
- *FoundTable = NULL;
-
- EntryCount = (Rsdt->Header.Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT32);
-
- EntryPtr = &Rsdt->Entry;
- for (Index = 0; Index < EntryCount; Index ++, EntryPtr ++) {
- Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(*EntryPtr));
- if (Table->Signature == Signature) {
- *FoundTable = Table;
- break;
- }
- }
-
- return;
-}
-
-VOID
-ScanTableInXSDT (
- XSDT_TABLE *Xsdt,
- UINT32 Signature,
- EFI_ACPI_DESCRIPTION_HEADER **FoundTable
- )
-{
- UINTN Index;
- UINT32 EntryCount;
- UINT64 EntryPtr;
- UINTN BasePtr;
- EFI_ACPI_DESCRIPTION_HEADER *Table;
-
- *FoundTable = NULL;
-
- EntryCount = (Xsdt->Header.Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT64);
-
- BasePtr = (UINTN)(&(Xsdt->Entry));
- for (Index = 0; Index < EntryCount; Index ++) {
- CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
- Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(EntryPtr));
- if (Table->Signature == Signature) {
- *FoundTable = Table;
- break;
- }
- }
-
- return;
-}
-
-VOID *
-FindAcpiPtr (
- IN HOB_TEMPLATE *Hob,
- UINT32 Signature
- )
-{
- EFI_ACPI_DESCRIPTION_HEADER *AcpiTable;
- EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *Rsdp;
- RSDT_TABLE *Rsdt;
- XSDT_TABLE *Xsdt;
-
- AcpiTable = NULL;
-
- //
- // Check ACPI2.0 table
- //
- if ((int)Hob->Acpi20.Table != -1) {
- Rsdp = (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *)(UINTN)Hob->Acpi20.Table;
- Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
- Xsdt = NULL;
- if ((Rsdp->Revision >= 2) && (Rsdp->XsdtAddress < (UINT64)(UINTN)-1)) {
- Xsdt = (XSDT_TABLE *)(UINTN)Rsdp->XsdtAddress;
- }
- //
- // Check Xsdt
- //
- if (Xsdt != NULL) {
- ScanTableInXSDT (Xsdt, Signature, &AcpiTable);
- }
- //
- // Check Rsdt
- //
- if ((AcpiTable == NULL) && (Rsdt != NULL)) {
- ScanTableInRSDT (Rsdt, Signature, &AcpiTable);
- }
- }
-
- //
- // Check ACPI1.0 table
- //
- if ((AcpiTable == NULL) && ((int)Hob->Acpi.Table != -1)) {
- Rsdp = (EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_POINTER *)(UINTN)Hob->Acpi.Table;
- Rsdt = (RSDT_TABLE *)(UINTN)Rsdp->RsdtAddress;
- //
- // Check Rsdt
- //
- if (Rsdt != NULL) {
- ScanTableInRSDT (Rsdt, Signature, &AcpiTable);
- }
- }
-
- return AcpiTable;
-}
-
-#pragma pack(1)
-typedef struct {
- UINT64 BaseAddress;
- UINT16 PciSegmentGroupNumber;
- UINT8 StartBusNumber;
- UINT8 EndBusNumber;
- UINT32 Reserved;
-} MCFG_STRUCTURE;
-#pragma pack()
-
-VOID
-PrepareMcfgTable (
- IN HOB_TEMPLATE *Hob
- )
-{
- EFI_ACPI_DESCRIPTION_HEADER *McfgTable;
- MCFG_STRUCTURE *Mcfg;
- UINTN McfgCount;
- UINTN Index;
-
- McfgTable = FindAcpiPtr (Hob, EFI_ACPI_3_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE);
- if (McfgTable == NULL) {
- return ;
- }
-
- Mcfg = (MCFG_STRUCTURE *)((UINTN)McfgTable + sizeof(EFI_ACPI_DESCRIPTION_HEADER) + sizeof(UINT64));
- McfgCount = (McfgTable->Length - sizeof(EFI_ACPI_DESCRIPTION_HEADER) - sizeof(UINT64)) / sizeof(MCFG_STRUCTURE);
-
- //
- // Fill PciExpress info on Hob
- // Note: Only for 1st segment
- //
- for (Index = 0; Index < McfgCount; Index++) {
- if (Mcfg[Index].PciSegmentGroupNumber == 0) {
- Hob->PciExpress.PciExpressBaseAddressInfo.PciExpressBaseAddress = Mcfg[Index].BaseAddress;
- break;
- }
- }
-
- return ;
-}
-
-VOID
-PrepareFadtTable (
- IN HOB_TEMPLATE *Hob
- )
-{
- EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE *Fadt;
- EFI_ACPI_DESCRIPTION *AcpiDescription;
-
- Fadt = FindAcpiPtr (Hob, EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE);
- if (Fadt == NULL) {
- return ;
- }
-
- AcpiDescription = &Hob->AcpiInfo.AcpiDescription;
- //
- // Fill AcpiDescription according to FADT
- // Currently, only for PM_TMR
- //
- AcpiDescription->PM_TMR_LEN = Fadt->PmTmrLen;
- AcpiDescription->TMR_VAL_EXT = (UINT8)((Fadt->Flags & 0x100) != 0);
-
- //
- // For fields not included in ACPI 1.0 spec, we get the value based on table length
- //
- if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, XPmTmrBlk) + sizeof (Fadt->XPmTmrBlk)) {
- CopyMem (
- &AcpiDescription->PM_TMR_BLK,
- &Fadt->XPmTmrBlk,
- sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
- );
- }
- if (Fadt->Header.Length >= OFFSET_OF (EFI_ACPI_3_0_FIXED_ACPI_DESCRIPTION_TABLE, ResetValue) + sizeof (Fadt->ResetValue)) {
- CopyMem (
- &AcpiDescription->RESET_REG,
- &Fadt->ResetReg,
- sizeof(EFI_ACPI_3_0_GENERIC_ADDRESS_STRUCTURE)
- );
- AcpiDescription->RESET_VALUE = Fadt->ResetValue;
- }
-
- if (AcpiDescription->PM_TMR_BLK.Address == 0) {
- AcpiDescription->PM_TMR_BLK.Address = Fadt->PmTmrBlk;
- AcpiDescription->PM_TMR_BLK.AddressSpaceId = EFI_ACPI_3_0_SYSTEM_IO;
- }
-
- //
- // It's possible that the PM_TMR_BLK.RegisterBitWidth is always 32,
- // we need to set the correct RegisterBitWidth value according to the TMR_VAL_EXT
- // A zero indicates TMR_VAL is implemented as a 24-bit value.
- // A one indicates TMR_VAL is implemented as a 32-bit value
- //
- AcpiDescription->PM_TMR_BLK.RegisterBitWidth = (UINT8) ((AcpiDescription->TMR_VAL_EXT == 0) ? 24 : 32);
-
-
- return ;
-}
-
-VOID
-PrepareHobLegacyTable (
- IN HOB_TEMPLATE *Hob
- )
-{
- CHAR8 PrintBuffer[256];
-
- Hob->Acpi.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr ();
- AsciiSPrint (PrintBuffer, 256, "\nAcpiTable=0x%x ", (UINT32)(UINTN)Hob->Acpi.Table);
- PrintString (PrintBuffer);
- Hob->Acpi20.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindAcpiRsdPtr ();
- Hob->Smbios.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindSMBIOSPtr ();
- AsciiSPrint (PrintBuffer, 256, "SMBIOS Table=0x%x ", (UINT32)(UINTN)Hob->Smbios.Table);
- PrintString (PrintBuffer);
- Hob->Mps.Table = (EFI_PHYSICAL_ADDRESS)(UINTN)FindMPSPtr ();
- AsciiSPrint (PrintBuffer, 256, "MPS Table=0x%x\n", (UINT32)(UINTN)Hob->Mps.Table);
- PrintString (PrintBuffer);
-
- PrepareMcfgTable (Hob);
-
- PrepareFadtTable (Hob);
-
- return ;
-}
-
diff --git a/DuetPkg/DxeIpl/LegacyTable.h b/DuetPkg/DxeIpl/LegacyTable.h deleted file mode 100644 index 755ce25cf6..0000000000 --- a/DuetPkg/DxeIpl/LegacyTable.h +++ /dev/null @@ -1,31 +0,0 @@ -/** @file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- LegacyTable.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _DXELDR_LEGACY_TABLE_H_
-#define _DXELDR_LEGACY_TABLE_H_
-
-#include "HobGeneration.h"
-
-VOID
-PrepareHobLegacyTable (
- IN HOB_TEMPLATE *Hob
- );
-
-#endif
diff --git a/DuetPkg/DxeIpl/PpisNeededByDxeCore.c b/DuetPkg/DxeIpl/PpisNeededByDxeCore.c deleted file mode 100644 index e08a148543..0000000000 --- a/DuetPkg/DxeIpl/PpisNeededByDxeCore.c +++ /dev/null @@ -1,59 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- PpisNeededByDxeCore.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "PpisNeededByDxeCore.h"
-#include "HobGeneration.h"
-#include "SerialStatusCode.h"
-
-EFI_STATUS
-EFIAPI
-PreparePpisNeededByDxeCore (
- IN HOB_TEMPLATE *Hob
- )
-/*++
-
-Routine Description:
-
- This routine adds the PPI/Protocol Hobs that are consumed by the DXE Core.
- Normally these come from PEI, but since our PEI was 32-bit we need an
- alternate source. That is this driver.
-
- This driver does not consume PEI or DXE services and thus updates the
- Phit (HOB list) directly
-
-Arguments:
-
- HobStart - Pointer to the beginning of the HOB List from PEI
-
-Returns:
-
- This function should after it has add it's HOBs
-
---*/
-{
- EFI_REPORT_STATUS_CODE ReportStatusCode;
-
- InstallSerialStatusCode (&ReportStatusCode);
- Hob->SerialStatusCode.Interface = (EFI_PHYSICAL_ADDRESS) (UINTN) ReportStatusCode;
-
- return EFI_SUCCESS;
-}
-
-
diff --git a/DuetPkg/DxeIpl/PpisNeededByDxeCore.h b/DuetPkg/DxeIpl/PpisNeededByDxeCore.h deleted file mode 100644 index c7bd0137e7..0000000000 --- a/DuetPkg/DxeIpl/PpisNeededByDxeCore.h +++ /dev/null @@ -1,64 +0,0 @@ -/** @file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- PpisNeededByDxeCore.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _DXELDR_PPIS_NEEDED_BY_DXE_CORE_H_
-#define _DXELDR_PPIS_NEEDED_BY_DXE_CORE_H_
-
-#include "DxeIpl.h"
-#include "HobGeneration.h"
-
-//EFI_STATUS
-//InstallEfiPeiTransferControl (
-// IN OUT EFI_PEI_TRANSFER_CONTROL_PROTOCOL **This
-// );
-
-//EFI_STATUS
-//InstallEfiPeiFlushInstructionCache (
-// IN OUT EFI_PEI_FLUSH_INSTRUCTION_CACHE_PROTOCOL **This
-// );
-
-EFI_STATUS
-EFIAPI
-PreparePpisNeededByDxeCore (
- IN HOB_TEMPLATE *HobStart
- )
-/*++
-
-Routine Description:
-
- This routine adds the PPI/Protocol Hobs that are consumed by the DXE Core.
- Normally these come from PEI, but since our PEI was 32-bit we need an
- alternate source. That is this driver.
-
- This driver does not consume PEI or DXE services and thus updates the
- Phit (HOB list) directly
-
-Arguments:
-
- HobStart - Pointer to the beginning of the HOB List from PEI
-
-Returns:
-
- This function should after it has add it's HOBs
-
---*/
-;
-
-#endif
diff --git a/DuetPkg/DxeIpl/SerialStatusCode.c b/DuetPkg/DxeIpl/SerialStatusCode.c deleted file mode 100644 index 1595932383..0000000000 --- a/DuetPkg/DxeIpl/SerialStatusCode.c +++ /dev/null @@ -1,760 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- SerialStatusCode.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include <Library/SerialPortLib.h>
-#include "SerialStatusCode.h"
-
-//
-// All of the lookup tables are only needed in debug.
-//
-
-typedef struct {
- UINT32 Value;
- CHAR8 *Token;
-} STATUS_CODE_LOOKUP_TABLE;
-
-STATUS_CODE_LOOKUP_TABLE mSeverityToken[] = {
- { EFI_ERROR_MINOR, "ERROR_MINOR" },
- { EFI_ERROR_MAJOR, "ERROR_MAJOR" },
- { EFI_ERROR_UNRECOVERED, "ERROR_UNRECOVERED" },
- { EFI_ERROR_UNCONTAINED, "ERROR_UNCONTAINED" },
- { 0xFFFFFFFF, "ERROR_UNRECOGNIZED" }
- };
-
-STATUS_CODE_LOOKUP_TABLE mClassSubClassToken[] = {
- { EFI_COMPUTING_UNIT_UNSPECIFIED, "COMPUTING_UNIT_UNSPECIFIED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR, "COMPUTING_UNIT_HOST_PROCESSOR" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR, "COMPUTING_UNIT_FIRMWARE_PROCESSOR" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR, "COMPUTING_UNIT_IO_PROCESSOR" },
- { EFI_COMPUTING_UNIT_CACHE, "COMPUTING_UNIT_CACHE" },
- { EFI_COMPUTING_UNIT_MEMORY, "COMPUTING_UNIT_MEMORY" },
- { EFI_COMPUTING_UNIT_CHIPSET, "COMPUTING_UNIT_CHIPSET" },
- { EFI_PERIPHERAL_UNSPECIFIED, "PERIPHERAL_UNSPECIFIED" },
- { EFI_PERIPHERAL_KEYBOARD, "PERIPHERAL_KEYBOARD" },
- { EFI_PERIPHERAL_MOUSE, "PERIPHERAL_MOUSE" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE, "PERIPHERAL_LOCAL_CONSOLE" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE, "PERIPHERAL_REMOTE_CONSOLE" },
- { EFI_PERIPHERAL_SERIAL_PORT, "PERIPHERAL_SERIAL_PORT" },
- { EFI_PERIPHERAL_PARALLEL_PORT, "PERIPHERAL_PARALLEL_PORT" },
- { EFI_PERIPHERAL_FIXED_MEDIA, "PERIPHERAL_FIXED_MEDIA" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA, "PERIPHERAL_REMOVABLE_MEDIA" },
- { EFI_PERIPHERAL_AUDIO_INPUT, "PERIPHERAL_AUDIO_INPUT" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT, "PERIPHERAL_AUDIO_OUTPUT" },
- { EFI_PERIPHERAL_LCD_DEVICE, "PERIPHERAL_LCD_DEVICE" },
- { EFI_IO_BUS_UNSPECIFIED, "IO_BUS_UNSPECIFIED" },
- { EFI_IO_BUS_PCI, "IO_BUS_PCI" },
- { EFI_IO_BUS_USB, "IO_BUS_USB" },
- { EFI_IO_BUS_IBA, "IO_BUS_IBA" },
- { EFI_IO_BUS_AGP, "IO_BUS_AGP" },
- { EFI_IO_BUS_PC_CARD, "IO_BUS_PC_CARD" },
- { EFI_IO_BUS_LPC, "IO_BUS_LPC" },
- { EFI_IO_BUS_SCSI, "IO_BUS_SCSI" },
- { EFI_IO_BUS_ATA_ATAPI, "IO_BUS_ATA_ATAPI" },
- { EFI_IO_BUS_FC, "IO_BUS_FC" },
- { EFI_IO_BUS_IP_NETWORK, "IO_BUS_IP_NETWORK" },
- { EFI_IO_BUS_SMBUS, "IO_BUS_SMBUS" },
- { EFI_IO_BUS_I2C, "IO_BUS_I2C" },
- { EFI_SOFTWARE_UNSPECIFIED, "SOFTWARE_UNSPECIFIED" },
- { EFI_SOFTWARE_SEC, "SOFTWARE_SEC" },
- { EFI_SOFTWARE_PEI_CORE, "SOFTWARE_PEI_CORE" },
- { EFI_SOFTWARE_PEI_MODULE, "SOFTWARE_PEI_MODULE" },
- { EFI_SOFTWARE_DXE_CORE, "SOFTWARE_DXE_CORE" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE, "SOFTWARE_EFI_BOOT_SERVICE" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE, "SOFTWARE_EFI_RUNTIME_SERVICE" },
- { EFI_SOFTWARE_DXE_BS_DRIVER, "SOFTWARE_DXE_BS_DRIVER" },
- { EFI_SOFTWARE_DXE_RT_DRIVER, "SOFTWARE_DXE_RT_DRIVER" },
- { EFI_SOFTWARE_SMM_DRIVER, "SOFTWARE_SMM_DRIVER" },
- { EFI_SOFTWARE_RT, "SOFTWARE_EFI_RT" },
- { EFI_SOFTWARE_AL, "SOFTWARE_EFI_AL" },
- { EFI_SOFTWARE_EFI_APPLICATION, "SOFTWARE_EFI_APPLICATION" },
- { EFI_SOFTWARE_EFI_OS_LOADER, "SOFTWARE_EFI_OS_LOADER" },
- { 0xFFFFFFFF, "ERROR_UNRECOGNIZED" }
- };
-
-STATUS_CODE_LOOKUP_TABLE mOperationToken[] = {
- { EFI_COMPUTING_UNIT_UNSPECIFIED | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_UNSPECIFIED | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_UNSPECIFIED | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_UNSPECIFIED | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_UNSPECIFIED | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_INVALID_TYPE, "INVALID_TYPE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_INVALID_SPEED, "INVALID_SPEED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_MISMATCH, "MISMATCH" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_TIMER_EXPIRED, "TIMER_EXPIRED" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST, "SELF_TEST" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_INTERNAL, "INTERNAL" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_THERMAL, "THERMAL" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_LOW_VOLTAGE, "LOW_VOLTAGE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_HIGH_VOLTAGE, "HIGH_VOLTAGE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_CACHE, "CACHE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_MICROCODE_UPDATE, "MICROCODE_UPDATE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_NO_MICROCODE_UPDATE, "NO_MICROCODE_UPDATE" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_CORRECTABLE, "1XECC" },
- { EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_UNCORRECTABLE, "2XECC" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_FIRMWARE_PROCESSOR | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_IO_PROCESSOR | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_CACHE_EC_INVALID_TYPE, "INVALID_TYPE" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_CACHE_EC_INVALID_SPEED, "INVALID_SPEED" },
- { EFI_COMPUTING_UNIT_CACHE | EFI_CU_CACHE_EC_INVALID_SIZE, "INVALID_SIZE" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_INVALID_TYPE, "INVALID_TYPE" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_INVALID_SPEED, "INVALID_SPEED" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_CORRECTABLE, "1XECC" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UNCORRECTABLE, "2XECC" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_SPD_FAIL, "SPD_FAIL" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_INVALID_SIZE, "INVALID_SIZE" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_MISMATCH, "MISMATCH" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_S3_RESUME_FAIL, "S3_RESUME_FAIL" },
- { EFI_COMPUTING_UNIT_MEMORY | EFI_CU_MEMORY_EC_UPDATE_FAIL, "UPDATE_FAIL" },
- { EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_EC_DISABLED, "DISABLED" },
- { EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_COMPUTING_UNIT_CHIPSET | EFI_CU_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_UNSPECIFIED | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_EC_LOCKED, "LOCKED" },
- { EFI_PERIPHERAL_KEYBOARD | EFI_P_KEYBOARD_EC_STUCK_KEY, "STUCK_KEY" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_MOUSE | EFI_P_MOUSE_EC_LOCKED, "LOCKED" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_LOCAL_CONSOLE | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_REMOTE_CONSOLE | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_SERIAL_PORT | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_PARALLEL_PORT | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_REMOVABLE_MEDIA | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_AUDIO_INPUT | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_AUDIO_OUTPUT | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_DISABLED, "DISABLED" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_INPUT_ERROR, "INPUT_ERROR" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_OUTPUT_ERROR, "OUTPUT_ERROR" },
- { EFI_PERIPHERAL_LCD_DEVICE | EFI_P_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_UNSPECIFIED | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_PCI | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_PCI | EFI_IOB_PCI_EC_PERR, "PERR" },
- { EFI_IO_BUS_PCI | EFI_IOB_PCI_EC_SERR, "SERR" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_USB | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_IBA | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_AGP | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_PC_CARD | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_LPC | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_SCSI | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_ATA_ATAPI | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_FC | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_IP_NETWORK | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_SMBUS | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_DISABLED, "DISABLED" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_NOT_SUPPORTED, "NOT_SUPPORTED" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_NOT_DETECTED, "NOT_DETECTED" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_NOT_CONFIGURED, "NOT_CONFIGURED" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_INTERFACE_ERROR, "INTERFACE_ERROR" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_CONTROLLER_ERROR, "CONTROLLER_ERROR" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_READ_ERROR, "READ_ERROR" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_WRITE_ERROR, "WRITE_ERROR" },
- { EFI_IO_BUS_I2C | EFI_IOB_EC_RESOURCE_CONFLICT, "RESOURCE_CONFLICT" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_UNSPECIFIED | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_SEC | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_PEI_CORE | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_PEI_MODULE | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_DXE_CORE | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_EFI_BOOT_SERVICE | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_EFI_RUNTIME_SERVICE | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_DXE_BS_DRIVER | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_DXE_RT_DRIVER | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_SMM_DRIVER | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_RT | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_AL | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_EFI_APPLICATION | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_NON_SPECIFIC, "NON_SPECIFIC" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_LOAD_ERROR, "LOAD_ERROR" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_INVALID_PARAMETER, "INVALID_PARAMETER" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_UNSUPPORTED, "NOT_SUPPORTED" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_INVALID_BUFFER, "INVALID_BUFFER" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_OUT_OF_RESOURCES, "OUT_OF_RESOURCES" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_ABORTED, "ABORTED" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_ILLEGAL_SOFTWARE_STATE, "ILLEGAL_SOFTWARE_STATE" },
- { EFI_SOFTWARE_EFI_OS_LOADER | EFI_SW_EC_ILLEGAL_HARDWARE_STATE, "ILLEGAL_HARDWARE_STATE" },
- { 0xFFFFFFFF, "ERROR_UNRECOGNIZED" }
- };
-
-
-EFI_STATUS
-MatchString (
- IN STATUS_CODE_LOOKUP_TABLE *Table,
- IN UINT32 Value,
- OUT CHAR8 **Token
- );
-
-//
-// Function implemenations
-//
-
-//
-// Match is only needed for debug.
-//
-
-EFI_STATUS
-MatchString (
- IN STATUS_CODE_LOOKUP_TABLE *Table,
- IN UINT32 Value,
- OUT CHAR8 **Token
- )
-/*++
-
-Routine Description:
-
- Search the input table for a matching value and return the token associated
- with that value. Well formed tables will have the last value == 0 and will
- return a default token.
-
-Arguments:
-
- Table Pointer to first entry in an array of table entries.
- Value Value to look up.
- Token String to return.
-
-Returns:
-
- EFI_SUCCESS The function always returns success.
-
---*/
-{
- UINTN Current;
-
- Current = 0;
- *Token = 0;
-
- while (!*Token) {
- //
- // Found token if values match or current entry is the last entry.
- //
- if ((Table[Current].Value == (-1)) ||
- (Table[Current].Value == Value)) {
- *Token = Table[Current].Token;
- }
- Current++;
- }
- return EFI_SUCCESS;
-}
-
-
-EFI_STATUS
-EFIAPI
-SerialReportStatusCode (
- IN EFI_STATUS_CODE_TYPE CodeType,
- IN EFI_STATUS_CODE_VALUE Value,
- IN UINT32 Instance,
- IN EFI_GUID *CallerId,
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL
- )
-/*++
-
-Routine Description:
-
- Provide a serial port print
-
-Arguments:
-
- PeiServices - General purpose services available to every PEIM.
-
-Returns:
-
- Status - EFI_SUCCESS if the interface could be successfully
- installed
-
---*/
-{
- CHAR8 Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];
- UINT32 LineNumber;
- CHAR8 *Filename;
- CHAR8 *Description;
- CHAR8 *Format;
- BASE_LIST Marker;
- UINT32 ErrorLevel;
- UINTN CharCount = 0;
-
- Buffer[0] = '\0';
-
- if (Data != NULL &&
- ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {
- //
- // Processes PEI_ASSERT ()
- //
- CharCount = AsciiSPrint (
- Buffer,
- sizeof (Buffer),
- "\nPEI_ASSERT!: %a (%d): %a\n",
- Filename,
- LineNumber,
- Description
- );
-
- } else if (Data != NULL &&
- ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {
- //
- // Process PEI_DEBUG () macro to Serial
- //
- CharCount = AsciiBSPrint (Buffer, sizeof (Buffer), Format, Marker);
-
- } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
- //
- // Process Errors
- //
- CharCount = AsciiSPrint (Buffer, sizeof (Buffer), "ERROR: C%x:V%x I%x", CodeType, Value, Instance);
- //
- // Make sure we don't try to print values that weren't intended to be printed, especially NULL GUID pointers.
- //
- if (CallerId) {
- CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), " %g", CallerId);
- }
- if (Data) {
- CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), " %x", Data);
- }
- CharCount += AsciiSPrint (&Buffer[CharCount - 1], (sizeof (Buffer) - (sizeof(Buffer[0]) * CharCount)), "\n");
-
- }
-
- if (Buffer[0] != '\0') {
- //
- // Callout to platform Lib function to do print.
- //
- SerialPortWrite ((UINT8 *) Buffer, CharCount);
- }
-
- //
- // Debug code to display human readable code information.
- //
- {
- CHAR8 *SeverityToken;
- CHAR8 *SubClassToken;
- CHAR8 *OperationToken;
-
- if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {
- //
- // Get the severity token
- //
- MatchString (
- mSeverityToken,
- (CodeType & EFI_STATUS_CODE_SEVERITY_MASK),
- &SeverityToken
- );
-
- //
- // Get the Class/SubClass token
- //
- MatchString (
- mClassSubClassToken,
- (Value & (EFI_STATUS_CODE_CLASS_MASK | EFI_STATUS_CODE_SUBCLASS_MASK)),
- &SubClassToken
- );
-
- //
- // Get the operation token
- //
- MatchString (
- mOperationToken,
- (Value & (EFI_STATUS_CODE_CLASS_MASK | EFI_STATUS_CODE_SUBCLASS_MASK | EFI_STATUS_CODE_OPERATION_MASK)),
- &OperationToken
- );
-
- //
- // Concatenate the instance
- //
- CharCount = AsciiSPrint (
- Buffer,
- sizeof (Buffer),
- "%a:%a:%a:%d\n",
- SeverityToken,
- SubClassToken,
- OperationToken,
- Instance
- );
-
- SerialPortWrite ((UINT8 *) Buffer, CharCount);
- }
- }
-
- return EFI_SUCCESS;
-}
-
-
-VOID
-InstallSerialStatusCode (
- IN EFI_REPORT_STATUS_CODE *ReportStatusCode
- )
-/*++
-
-Routine Description:
-
- Initialize Serial Port and Status Code Handler
-
-Arguments:
-
- ReportStatusCode - A pointer to the handler
-
-Returns:
-
- None
-
---*/
-{
- SerialPortInitialize();
- *ReportStatusCode = SerialReportStatusCode;
-}
diff --git a/DuetPkg/DxeIpl/SerialStatusCode.h b/DuetPkg/DxeIpl/SerialStatusCode.h deleted file mode 100644 index 7146927011..0000000000 --- a/DuetPkg/DxeIpl/SerialStatusCode.h +++ /dev/null @@ -1,39 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- SerialStatusCode.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _DXELDR_SERIAL_STATUS_CODE_H_
-#define _DXELDR_SERIAL_STATUS_CODE_H_
-
-//
-// Statements that include other files
-//
-#include "DxeIpl.h"
-
-//
-// GUID consumed
-//
-
-
-VOID
-InstallSerialStatusCode (
- IN EFI_REPORT_STATUS_CODE *ReportStatusCode
- );
-
-#endif
diff --git a/DuetPkg/DxeIpl/X64/EnterDxeCore.c b/DuetPkg/DxeIpl/X64/EnterDxeCore.c deleted file mode 100644 index 10376b5c26..0000000000 --- a/DuetPkg/DxeIpl/X64/EnterDxeCore.c +++ /dev/null @@ -1,32 +0,0 @@ -/** @file
- x64 specific code to enter DxeCore
-
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
-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"
-
-VOID
-EnterDxeMain (
- IN VOID *StackTop,
- IN VOID *DxeCoreEntryPoint,
- IN VOID *Hob,
- IN VOID *PageTable
- )
-{
- AsmWriteCr3 ((UINTN) PageTable);
- SwitchStack (
- (SWITCH_STACK_ENTRY_POINT)(UINTN)DxeCoreEntryPoint,
- Hob,
- NULL,
- StackTop
- );
-}
diff --git a/DuetPkg/DxeIpl/X64/Paging.c b/DuetPkg/DxeIpl/X64/Paging.c deleted file mode 100644 index 3b4de18a2e..0000000000 --- a/DuetPkg/DxeIpl/X64/Paging.c +++ /dev/null @@ -1,238 +0,0 @@ -/** @file
-
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- Paging.c
-
-Abstract:
-
-Revision History:
-
-**/
-
-#include "HobGeneration.h"
-#include "VirtualMemory.h"
-
-//
-// Create 2M-page table
-// PML4 (47:39)
-// PDPTE (38:30)
-// PDE (29:21)
-//
-
-#define EFI_2M_PAGE_BITS_NUM 21
-#define EFI_MAX_ENTRY_BITS_NUM 9
-
-#define EFI_PAGE_SIZE_4K 0x1000
-#define EFI_PAGE_SIZE_2M (1 << EFI_2M_PAGE_BITS_NUM)
-
-#ifndef MIN
- #define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#define ENTRY_NUM(x) ((UINTN)1 << (x))
-
-UINT8 gPML4BitsNum;
-UINT8 gPDPTEBitsNum;
-UINT8 gPDEBitsNum;
-
-UINTN gPageNum2M;
-UINTN gPageNum4K;
-
-VOID
-EnableNullPointerProtection (
- UINT8 *PageTable
- )
-{
- X64_PAGE_TABLE_ENTRY_4K *PageTableEntry4KB;
-
- PageTableEntry4KB = (X64_PAGE_TABLE_ENTRY_4K *) (PageTable + gPageNum2M * EFI_PAGE_SIZE_4K);
- //
- // Fill in the Page Table entries
- // Mark 0~4K as not present
- //
- PageTableEntry4KB->Bits.Present = 0;
-
- return ;
-}
-
-VOID
-X64Create4KPageTables (
- UINT8 *PageTable
- )
-/*++
-Routine Description:
- Create 4K-Page-Table for the low 2M memory.
- This will change the previously created 2M-Page-Table-Entry.
---*/
-{
- UINT64 PageAddress;
- UINTN PTEIndex;
- X64_PAGE_DIRECTORY_ENTRY_4K *PageDirectoryEntry4KB;
- X64_PAGE_TABLE_ENTRY_4K *PageTableEntry4KB;
-
- //
- // Page Table structure 4 level 4K.
- //
- // PageMapLevel4Entry : bits 47-39
- // PageDirectoryPointerEntry : bits 38-30
- // Page Table 4K : PageDirectoryEntry4K : bits 29-21
- // PageTableEntry : bits 20-12
- //
-
- PageTableEntry4KB = (X64_PAGE_TABLE_ENTRY_4K *)(PageTable + gPageNum2M * EFI_PAGE_SIZE_4K);
-
- PageDirectoryEntry4KB = (X64_PAGE_DIRECTORY_ENTRY_4K *) (PageTable + 2 * EFI_PAGE_SIZE_4K);
- PageDirectoryEntry4KB->Uint64 = (UINT64)(UINTN)PageTableEntry4KB;
- PageDirectoryEntry4KB->Bits.ReadWrite = 1;
- PageDirectoryEntry4KB->Bits.Present = 1;
- PageDirectoryEntry4KB->Bits.MustBeZero = 0;
-
- for (PTEIndex = 0, PageAddress = 0;
- PTEIndex < ENTRY_NUM (EFI_MAX_ENTRY_BITS_NUM);
- PTEIndex++, PageTableEntry4KB++, PageAddress += EFI_PAGE_SIZE_4K
- ) {
- //
- // Fill in the Page Table entries
- //
- PageTableEntry4KB->Uint64 = (UINT64)PageAddress;
- PageTableEntry4KB->Bits.ReadWrite = 1;
- PageTableEntry4KB->Bits.Present = 1;
- }
-
- return ;
-}
-
-VOID
-X64Create2MPageTables (
- UINT8 *PageTable
- )
-{
- UINT64 PageAddress;
- UINT8 *TempPageTable;
- UINTN PML4Index;
- UINTN PDPTEIndex;
- UINTN PDEIndex;
- X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *PageMapLevel4Entry;
- X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *PageDirectoryPointerEntry;
- X64_PAGE_TABLE_ENTRY_2M *PageDirectoryEntry2MB;
-
- TempPageTable = PageTable;
- PageAddress = 0;
-
- //
- // Page Table structure 3 level 2MB.
- //
- // PageMapLevel4Entry : bits 47-39
- // PageDirectoryPointerEntry : bits 38-30
- // Page Table 2MB : PageDirectoryEntry2M : bits 29-21
- //
-
- PageMapLevel4Entry = (X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *)TempPageTable;
-
- for (PML4Index = 0; PML4Index < ENTRY_NUM (gPML4BitsNum); PML4Index++, PageMapLevel4Entry++) {
- //
- // Each PML4 entry points to a page of Page Directory Pointer entires.
- //
- TempPageTable += EFI_PAGE_SIZE_4K;
- PageDirectoryPointerEntry = (X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K *)TempPageTable;
-
- //
- // Make a PML4 Entry
- //
- PageMapLevel4Entry->Uint64 = (UINT64)(UINTN)(TempPageTable);
- PageMapLevel4Entry->Bits.ReadWrite = 1;
- PageMapLevel4Entry->Bits.Present = 1;
-
- for (PDPTEIndex = 0; PDPTEIndex < ENTRY_NUM (gPDPTEBitsNum); PDPTEIndex++, PageDirectoryPointerEntry++) {
- //
- // Each Directory Pointer entries points to a page of Page Directory entires.
- //
- TempPageTable += EFI_PAGE_SIZE_4K;
- PageDirectoryEntry2MB = (X64_PAGE_TABLE_ENTRY_2M *)TempPageTable;
-
- //
- // Fill in a Page Directory Pointer Entries
- //
- PageDirectoryPointerEntry->Uint64 = (UINT64)(UINTN)(TempPageTable);
- PageDirectoryPointerEntry->Bits.ReadWrite = 1;
- PageDirectoryPointerEntry->Bits.Present = 1;
-
- for (PDEIndex = 0; PDEIndex < ENTRY_NUM (gPDEBitsNum); PDEIndex++, PageDirectoryEntry2MB++) {
- //
- // Fill in the Page Directory entries
- //
- PageDirectoryEntry2MB->Uint64 = (UINT64)PageAddress;
- PageDirectoryEntry2MB->Bits.ReadWrite = 1;
- PageDirectoryEntry2MB->Bits.Present = 1;
- PageDirectoryEntry2MB->Bits.MustBe1 = 1;
-
- PageAddress += EFI_PAGE_SIZE_2M;
- }
- }
- }
-
- return ;
-}
-
-VOID *
-PreparePageTable (
- VOID *PageNumberTop,
- UINT8 SizeOfMemorySpace
- )
-/*++
-Description:
- Generate pagetable below PageNumberTop,
- and return the bottom address of pagetable for putting other things later.
---*/
-{
- VOID *PageNumberBase;
-
- SizeOfMemorySpace -= EFI_2M_PAGE_BITS_NUM;
- gPDEBitsNum = (UINT8) MIN (SizeOfMemorySpace, EFI_MAX_ENTRY_BITS_NUM);
- SizeOfMemorySpace = (UINT8) (SizeOfMemorySpace - gPDEBitsNum);
- gPDPTEBitsNum = (UINT8) MIN (SizeOfMemorySpace, EFI_MAX_ENTRY_BITS_NUM);
- SizeOfMemorySpace = (UINT8) (SizeOfMemorySpace - gPDPTEBitsNum);
- gPML4BitsNum = SizeOfMemorySpace;
- if (gPML4BitsNum > EFI_MAX_ENTRY_BITS_NUM) {
- return NULL;
- }
-
- //
- // Suppose we have:
- // 2MPage:
- // Entry: PML4 -> PDPTE -> PDE -> Page
- // EntryNum: a b c
- // then
- // Occupy4KPage: 1 a a*b
- //
- // 2M 4KPage:
- // Entry: PTE -> Page
- // EntryNum: 512
- // then
- // Occupy4KPage: 1
- //
-
- gPageNum2M = 1 + ENTRY_NUM (gPML4BitsNum) + ENTRY_NUM (gPML4BitsNum + gPDPTEBitsNum);
- gPageNum4K = 1;
-
-
- PageNumberBase = (VOID *)((UINTN)PageNumberTop - (gPageNum2M + gPageNum4K) * EFI_PAGE_SIZE_4K);
- ZeroMem (PageNumberBase, (gPageNum2M + gPageNum4K) * EFI_PAGE_SIZE_4K);
-
- X64Create2MPageTables (PageNumberBase);
- X64Create4KPageTables (PageNumberBase);
- //
- // Not enable NULL Pointer Protection if using INTx call
- //
-// EnableNullPointerProtection (PageNumberBase);
-
- return PageNumberBase;
-}
diff --git a/DuetPkg/DxeIpl/X64/VirtualMemory.h b/DuetPkg/DxeIpl/X64/VirtualMemory.h deleted file mode 100644 index 204f04ec1d..0000000000 --- a/DuetPkg/DxeIpl/X64/VirtualMemory.h +++ /dev/null @@ -1,117 +0,0 @@ -/** @file
-
-Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
-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.
-
-Module Name:
- VirtualMemory.h
-
-Abstract:
-
-Revision History:
-
-**/
-
-#ifndef _VIRTUAL_MEMORY_H_
-#define _VIRTUAL_MEMORY_H_
-
-#pragma pack(1)
-
-//
-// Page Map Level 4 Offset (PML4) and
-// Page Directory Pointer Table (PDPE) entries 4K & 2M
-//
-
-typedef union {
- struct {
- UINT64 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT64 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT64 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT64 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT64 Reserved:1; // Reserved
- UINT64 MustBeZero:2; // Must Be Zero
- UINT64 Available:3; // Available for use by system software
- UINT64 PageTableBaseAddress:40; // Page Table Base Address
- UINT64 AvabilableHigh:11; // Available for use by system software
- UINT64 Nx:1; // No Execute bit
- } Bits;
- UINT64 Uint64;
-} X64_PAGE_MAP_AND_DIRECTORY_POINTER_2MB_4K;
-
-//
-// Page Directory Entry 4K
-//
-typedef union {
- struct {
- UINT64 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT64 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT64 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT64 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT64 MustBeZero:3; // Must Be Zero
- UINT64 Available:3; // Available for use by system software
- UINT64 PageTableBaseAddress:40; // Page Table Base Address
- UINT64 AvabilableHigh:11; // Available for use by system software
- UINT64 Nx:1; // No Execute bit
- } Bits;
- UINT64 Uint64;
-} X64_PAGE_DIRECTORY_ENTRY_4K;
-
-//
-// Page Table Entry 4K
-//
-typedef union {
- struct {
- UINT64 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT64 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT64 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT64 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page
- UINT64 PAT:1; // 0 = Ignore Page Attribute Table
- UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
- UINT64 Available:3; // Available for use by system software
- UINT64 PageTableBaseAddress:40; // Page Table Base Address
- UINT64 AvabilableHigh:11; // Available for use by system software
- UINT64 Nx:1; // 0 = Execute Code, 1 = No Code Execution
- } Bits;
- UINT64 Uint64;
-} X64_PAGE_TABLE_ENTRY_4K;
-
-//
-// Page Table Entry 2M
-//
-typedef union {
- struct {
- UINT64 Present:1; // 0 = Not present in memory, 1 = Present in memory
- UINT64 ReadWrite:1; // 0 = Read-Only, 1= Read/Write
- UINT64 UserSupervisor:1; // 0 = Supervisor, 1=User
- UINT64 WriteThrough:1; // 0 = Write-Back caching, 1=Write-Through caching
- UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached
- UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU)
- UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page
- UINT64 MustBe1:1; // Must be 1
- UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write
- UINT64 Available:3; // Available for use by system software
- UINT64 PAT:1; //
- UINT64 MustBeZero:8; // Must be zero;
- UINT64 PageTableBaseAddress:31; // Page Table Base Address
- UINT64 AvabilableHigh:11; // Available for use by system software
- UINT64 Nx:1; // 0 = Execute Code, 1 = No Code Execution
- } Bits;
- UINT64 Uint64;
-} X64_PAGE_TABLE_ENTRY_2M;
-
-#pragma pack()
-
-#endif
|