]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Hob.c
EmbeddedPkg Omap35xxPkg: remove EBL and associated libraries
[mirror_edk2.git] / EmbeddedPkg / Ebl / Hob.c
diff --git a/EmbeddedPkg/Ebl/Hob.c b/EmbeddedPkg/Ebl/Hob.c
deleted file mode 100644 (file)
index edc0a74..0000000
+++ /dev/null
@@ -1,234 +0,0 @@
-/** @file\r
-  Hob command for EBL (Embedded Boot Loader)\r
-\r
-  Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>\r
-  Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
-  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
-\r
-  This program and the accompanying materials\r
-  are licensed and made available under the terms and conditions of the BSD License\r
-  which accompanies this distribution.  The full text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-\r
-  Module Name:  Hob.c\r
-\r
-  Search/Replace Dir with the name of your new command\r
-\r
-  Boot Mode:\r
-  ==========\r
-  BOOT_WITH_FULL_CONFIGURATION                  0x00\r
-  BOOT_WITH_MINIMAL_CONFIGURATION               0x01\r
-  BOOT_ASSUMING_NO_CONFIGURATION_CHANGES        0x02\r
-  BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03\r
-  BOOT_WITH_DEFAULT_SETTINGS                    0x04\r
-  BOOT_ON_S4_RESUME                             0x05\r
-  BOOT_ON_S5_RESUME                             0x06\r
-  BOOT_ON_S2_RESUME                             0x10\r
-  BOOT_ON_S3_RESUME                             0x11\r
-  BOOT_ON_FLASH_UPDATE                          0x12\r
-  BOOT_IN_RECOVERY_MODE                         0x20\r
-  BOOT_IN_RECOVERY_MODE_MASK                    0x40\r
-  BOOT_SPECIAL_MASK                             0x80\r
-\r
-  Mem Alloc HOB Type:\r
-  ===================\r
-  typedef enum {\r
-    EfiReservedMemoryType       = 0x00\r
-    EfiLoaderCode               = 0x01\r
-    EfiLoaderData               = 0x02\r
-    EfiBootServicesCode         = 0x03\r
-    EfiBootServicesData         = 0x04\r
-    EfiRuntimeServicesCode      = 0x05\r
-    EfiRuntimeServicesData      = 0x06\r
-    EfiConventionalMemory       = 0x07\r
-    EfiUnusableMemory           = 0x08\r
-    EfiACPIReclaimMemory        = 0x09\r
-    EfiACPIMemoryNVS            = 0x0a\r
-    EfiMemoryMappedIO           = 0x0b\r
-    EfiMemoryMappedIOPortSpace  = 0x0c\r
-    EfiPalCode                  = 0x0d\r
-    EfiMaxMemoryType            = 0x0e\r
-  } EFI_MEMORY_TYPE;\r
-\r
-  Resource Hob Tye:\r
-  =================\r
-  EFI_RESOURCE_SYSTEM_MEMORY          0\r
-  EFI_RESOURCE_MEMORY_MAPPED_IO       1\r
-  EFI_RESOURCE_IO                     2\r
-  EFI_RESOURCE_FIRMWARE_DEVICE        3\r
-  EFI_RESOURCE_MEMORY_MAPPED_IO_PORT  4\r
-  EFI_RESOURCE_MEMORY_RESERVED        5\r
-  EFI_RESOURCE_IO_RESERVED            6\r
-  EFI_RESOURCE_MAX_MEMORY_TYPE        7\r
-\r
-  Resource Hob Attribute (last thing printed):\r
-  ============================================\r
-  EFI_RESOURCE_ATTRIBUTE_PRESENT                  0x00000001\r
-  EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002\r
-  EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004\r
-  EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC           0x00000008\r
-  EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC         0x00000010\r
-  EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1           0x00000020\r
-  EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2           0x00000040\r
-  EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080\r
-  EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100\r
-  EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200\r
-  EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE              0x00000400\r
-  EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE        0x00000800\r
-  EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE  0x00001000\r
-  EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE     0x00002000\r
-  EFI_RESOURCE_ATTRIBUTE_16_BIT_IO                0x00004000\r
-  EFI_RESOURCE_ATTRIBUTE_32_BIT_IO                0x00008000\r
-  EFI_RESOURCE_ATTRIBUTE_64_BIT_IO                0x00010000\r
-  EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED        0x00020000\r
-\r
-**/\r
-\r
-#include "Ebl.h"\r
-// BugBug: Autogen does not allow this to be included currently\r
-//#include <EdkModulePkg/Include/EdkDxe.h>\r
-\r
-GLOBAL_REMOVE_IF_UNREFERENCED char *mHobResourceType[] = {\r
-  "Memory     ",\r
-  "MMIO       ",\r
-  "IO         ",\r
-  "Firmware   ",\r
-  "MMIO Port  ",\r
-  "Reserved   ",\r
-  "IO Reserved",\r
-  "Illegal    "\r
-};\r
-\r
-\r
-/**\r
-  Dump out the HOBs in the system. HOBs are defined in the PI specification\r
-  and they are used to hand off information from PEI to DXE.\r
-\r
-  Argv[0] - "hob"\r
-\r
-  @param  Argc   Number of command arguments in Argv\r
-  @param  Argv   Array of strings that represent the parsed command line.\r
-                 Argv[0] is the command name\r
-\r
-  @return EFI_SUCCESS\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-EblHobCmd (\r
-  IN UINTN  Argc,\r
-  IN CHAR8  **Argv\r
-  )\r
-{\r
-  UINTN                         CurrentRow;\r
-  EFI_PEI_HOB_POINTERS          Hob;\r
-  EFI_MEMORY_TYPE_INFORMATION   *EfiMemoryTypeInformation;\r
-  UINTN                         Index;\r
-\r
-  CurrentRow = 0;\r
-  for (Hob.Raw = GetHobList (); !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) {\r
-    if (Hob.Header->HobType == EFI_HOB_TYPE_HANDOFF) {\r
-      AsciiPrint ("PHIT HOB Ver %x Boot Mode %02x Top %lx  Bottom %lx\n",\r
-        Hob.HandoffInformationTable->Version,\r
-        Hob.HandoffInformationTable->BootMode,\r
-        Hob.HandoffInformationTable->EfiMemoryTop,\r
-        Hob.HandoffInformationTable->EfiMemoryBottom\r
-        );\r
-\r
-      if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
-        return EFI_SUCCESS;\r
-      }\r
-\r
-      AsciiPrint ("    Free Top %lx Free Bottom %lx  End Of HOB %lx\n",\r
-        Hob.HandoffInformationTable->EfiFreeMemoryTop,\r
-        Hob.HandoffInformationTable->EfiFreeMemoryBottom,\r
-        Hob.HandoffInformationTable->EfiEndOfHobList\r
-        );\r
-\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_MEMORY_ALLOCATION) {\r
-      // mod(%) on array index is just to prevent buffer overrun\r
-      AsciiPrint ("Mem Alloc HOB %a %g %08lx:%lx\n",\r
-        (Hob.MemoryAllocation->AllocDescriptor.MemoryType < EfiMaxMemoryType) ? gMemMapType[Hob.MemoryAllocation->AllocDescriptor.MemoryType] : "ILLEGAL TYPE",\r
-        &Hob.MemoryAllocation->AllocDescriptor.Name,\r
-        Hob.MemoryAllocation->AllocDescriptor.MemoryBaseAddress,\r
-        Hob.MemoryAllocation->AllocDescriptor.MemoryLength\r
-        );\r
-      if (CompareGuid (&gEfiHobMemoryAllocModuleGuid, &Hob.MemoryAllocation->AllocDescriptor.Name)) {\r
-        if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
-          return EFI_SUCCESS;\r
-        }\r
-        AsciiPrint ("    Module Name %g EntryPoint %lx\n", &Hob.MemoryAllocationModule->ModuleName, Hob.MemoryAllocationModule->EntryPoint);\r
-      }\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) {\r
-      AsciiPrint ("Resource HOB %a %g %08lx:%lx\n    Attributes: %08x\n",\r
-        (Hob.ResourceDescriptor->ResourceType < EFI_RESOURCE_MAX_MEMORY_TYPE) ? mHobResourceType[Hob.ResourceDescriptor->ResourceType] : mHobResourceType[EFI_RESOURCE_MAX_MEMORY_TYPE],\r
-        &Hob.ResourceDescriptor->Owner,\r
-        Hob.ResourceDescriptor->PhysicalStart,\r
-        Hob.ResourceDescriptor->ResourceLength,\r
-        Hob.ResourceDescriptor->ResourceAttribute\r
-        );\r
-        if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
-          return EFI_SUCCESS;\r
-        }\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION) {\r
-      AsciiPrint ("GUID HOB %g\n", &Hob.Guid->Name);\r
-      if (CompareGuid (&gEfiMemoryTypeInformationGuid, &Hob.Guid->Name)) {\r
-        EfiMemoryTypeInformation = GET_GUID_HOB_DATA (Hob.Guid);\r
-        for (Index = 0; Index < (GET_GUID_HOB_DATA_SIZE (Hob.Guid)/sizeof (EFI_MEMORY_TYPE_INFORMATION)); Index++, EfiMemoryTypeInformation++) {\r
-          if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
-            return EFI_SUCCESS;\r
-          }\r
-          AsciiPrint ("    %a 0x%08x\n",\r
-            (EfiMemoryTypeInformation->Type < EfiMaxMemoryType) ? gMemMapType[EfiMemoryTypeInformation->Type] : "END       ",\r
-            EfiMemoryTypeInformation->NumberOfPages\r
-            );\r
-       }\r
-      }\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_FV) {\r
-      AsciiPrint ("FV HOB %08lx:%08lx\n", Hob.FirmwareVolume->BaseAddress, Hob.FirmwareVolume->Length);\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_CPU) {\r
-      AsciiPrint ("CPU HOB: Mem %x IO %x\n", Hob.Cpu->SizeOfMemorySpace, Hob.Cpu->SizeOfIoSpace);\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_MEMORY_POOL) {\r
-      AsciiPrint ("Mem Pool HOB:\n");\r
-/* Not in PI\r
-    } else if (Hob.Header->HobType == EFI_HOB_TYPE_CV) {\r
-      AsciiPrint ("CV HOB: %08lx:%08lx\n", Hob.CapsuleVolume->BaseAddress, Hob.CapsuleVolume->Length);\r
- */\r
-    }\r
-\r
-    if (EblAnyKeyToContinueQtoQuit (&CurrentRow, FALSE)) {\r
-      break;\r
-    }\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-GLOBAL_REMOVE_IF_UNREFERENCED const EBL_COMMAND_TABLE mCmdHobTemplate[] =\r
-{\r
-  {\r
-    "hob",\r
-    "; dump HOBs",\r
-    NULL,\r
-    EblHobCmd\r
-  }\r
-};\r
-\r
-\r
-/**\r
-  Initialize the commands in this in this file\r
-**/\r
-VOID\r
-EblInitializeHobCmd (\r
-  VOID\r
-  )\r
-{\r
-  if (FeaturePcdGet (PcdEmbeddedHobCmd)) {\r
-    EblAddCommands (mCmdHobTemplate, sizeof (mCmdHobTemplate)/sizeof (EBL_COMMAND_TABLE));\r
-  }\r
-}\r
-\r