]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: remove PlatformIntelBdsLib
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 4 Dec 2017 16:15:35 +0000 (16:15 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 4 Dec 2017 17:17:15 +0000 (17:17 +0000)
Now that the last user has switched to the generic BDS, the
PlatformIntelBdsLib code in ArmPlatformPkg is no longer used, so
remove it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c [deleted file]
ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h [deleted file]
ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf [deleted file]

diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
deleted file mode 100644 (file)
index 5632b5d..0000000
+++ /dev/null
@@ -1,406 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-Copyright (c) 2014, ARM Ltd. All rights reserved.<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
-**/\r
-\r
-#include "IntelBdsPlatform.h"\r
-\r
-///\r
-/// Predefined platform default time out value\r
-///\r
-UINT16                      gPlatformBootTimeOutDefault;\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PlatformIntelBdsConstructor (\r
-  IN EFI_HANDLE        ImageHandle,\r
-  IN EFI_SYSTEM_TABLE  *SystemTable\r
-  )\r
-{\r
-  gPlatformBootTimeOutDefault = (UINT16)PcdGet16 (PcdPlatformBootTimeOut);\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-//\r
-// BDS Platform Functions\r
-//\r
-/**\r
-  Platform Bds init. Include the platform firmware vendor, revision\r
-  and so crc check.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBdsInit (\r
-  VOID\r
-  )\r
-{\r
-  //\r
-  // Signal EndOfDxe PI Event\r
-  //\r
-  EfiEventGroupSignal (&gEfiEndOfDxeEventGroupGuid);\r
-}\r
-\r
-STATIC\r
-EFI_STATUS\r
-GetConsoleDevicePathFromVariable (\r
-  IN  CHAR16*             ConsoleVarName,\r
-  IN  CHAR16*             DefaultConsolePaths,\r
-  OUT EFI_DEVICE_PATH**   DevicePaths\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  UINTN                     Size;\r
-  EFI_DEVICE_PATH_PROTOCOL* DevicePathInstances;\r
-  EFI_DEVICE_PATH_PROTOCOL* DevicePathInstance;\r
-  CHAR16*                   DevicePathStr;\r
-  CHAR16*                   NextDevicePathStr;\r
-  EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL  *EfiDevicePathFromTextProtocol;\r
-\r
-  Status = EFI_SUCCESS;\r
-  Size = 0;\r
-\r
-  DevicePathInstances = BdsLibGetVariableAndSize (ConsoleVarName, &gEfiGlobalVariableGuid, &Size);\r
-  if (DevicePathInstances == NULL) {\r
-    // In case no default console device path has been defined we assume a driver handles the console (eg: SimpleTextInOutSerial)\r
-    if ((DefaultConsolePaths == NULL) || (DefaultConsolePaths[0] == L'\0')) {\r
-      *DevicePaths = NULL;\r
-      return EFI_SUCCESS;\r
-    }\r
-\r
-    Status = gBS->LocateProtocol (&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID **)&EfiDevicePathFromTextProtocol);\r
-    ASSERT_EFI_ERROR(Status);\r
-\r
-    // Extract the Device Path instances from the multi-device path string\r
-    while ((DefaultConsolePaths != NULL) && (DefaultConsolePaths[0] != L'\0')) {\r
-      NextDevicePathStr = StrStr (DefaultConsolePaths, L";");\r
-      if (NextDevicePathStr == NULL) {\r
-        DevicePathStr = DefaultConsolePaths;\r
-        DefaultConsolePaths = NULL;\r
-      } else {\r
-        DevicePathStr = (CHAR16*)AllocateCopyPool ((NextDevicePathStr - DefaultConsolePaths + 1) * sizeof(CHAR16), DefaultConsolePaths);\r
-        *(DevicePathStr + (NextDevicePathStr - DefaultConsolePaths)) = L'\0';\r
-        DefaultConsolePaths = NextDevicePathStr;\r
-        if (DefaultConsolePaths[0] == L';') {\r
-          DefaultConsolePaths++;\r
-        }\r
-      }\r
-\r
-      DevicePathInstance = EfiDevicePathFromTextProtocol->ConvertTextToDevicePath (DevicePathStr);\r
-      ASSERT(DevicePathInstance != NULL);\r
-      DevicePathInstances = AppendDevicePathInstance (DevicePathInstances, DevicePathInstance);\r
-\r
-      if (NextDevicePathStr != NULL) {\r
-        FreePool (DevicePathStr);\r
-      }\r
-      FreePool (DevicePathInstance);\r
-    }\r
-\r
-    // Set the environment variable with this device path multi-instances\r
-    Size = GetDevicePathSize (DevicePathInstances);\r
-    if (Size > 0) {\r
-      gRT->SetVariable (\r
-          ConsoleVarName,\r
-          &gEfiGlobalVariableGuid,\r
-          EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
-          Size,\r
-          DevicePathInstances\r
-          );\r
-    } else {\r
-      Status = EFI_INVALID_PARAMETER;\r
-    }\r
-  }\r
-\r
-  if (!EFI_ERROR(Status)) {\r
-    *DevicePaths = DevicePathInstances;\r
-  }\r
-  return Status;\r
-}\r
-\r
-STATIC\r
-EFI_STATUS\r
-InitializeConsolePipe (\r
-  IN EFI_DEVICE_PATH    *ConsoleDevicePaths,\r
-  IN EFI_GUID           *Protocol,\r
-  OUT EFI_HANDLE        *Handle,\r
-  OUT VOID*             *Interface\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  UINTN                     Size;\r
-  UINTN                     NoHandles;\r
-  EFI_HANDLE                *Buffer;\r
-  EFI_DEVICE_PATH_PROTOCOL* DevicePath;\r
-\r
-  // Connect all the Device Path Consoles\r
-  while (ConsoleDevicePaths != NULL) {\r
-    DevicePath = GetNextDevicePathInstance (&ConsoleDevicePaths, &Size);\r
-\r
-    Status = BdsLibConnectDevicePath (DevicePath);\r
-    if (!EFI_ERROR (Status)) {\r
-\r
-      //\r
-      // We connect all supplied console device paths, but only return the first\r
-      // one that connects successfully via *Handle/*Interface. Note that this\r
-      // may imply that *Handle/*Interface are not updated at all if they have\r
-      // been connected already, e.g., by the console splitter driver.\r
-      //\r
-      if (*Interface == NULL) {\r
-        //\r
-        // If BdsLibConnectDevicePath () succeeded, *Handle must have a non-NULL\r
-        // value. So ASSERT that this is the case.\r
-        //\r
-        gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &DevicePath, Handle);\r
-        ASSERT (*Handle != NULL);\r
-\r
-        gBS->HandleProtocol (*Handle, Protocol, Interface);\r
-      }\r
-    }\r
-    DEBUG_CODE_BEGIN();\r
-      if (EFI_ERROR(Status)) {\r
-        // We convert back to the text representation of the device Path\r
-        EFI_DEVICE_PATH_TO_TEXT_PROTOCOL  *DevicePathToTextProtocol;\r
-        CHAR16                            *DevicePathTxt;\r
-\r
-        DevicePathToTextProtocol = NULL;\r
-        gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID **) &DevicePathToTextProtocol);\r
-        if (DevicePathToTextProtocol != NULL) {\r
-          DevicePathTxt = DevicePathToTextProtocol->ConvertDevicePathToText (DevicePath, TRUE, TRUE);\r
-\r
-          DEBUG((EFI_D_ERROR,"Fail to start the console with the Device Path '%s'. (Error '%r')\n", DevicePathTxt, Status));\r
-\r
-          FreePool (DevicePathTxt);\r
-        }\r
-      }\r
-    DEBUG_CODE_END();\r
-  }\r
-\r
-  // No Device Path has been defined for this console interface. We take the first protocol implementation\r
-  if (*Interface == NULL) {\r
-    Status = gBS->LocateHandleBuffer (ByProtocol, Protocol, NULL, &NoHandles, &Buffer);\r
-    if (EFI_ERROR (Status)) {\r
-      BdsLibConnectAll ();\r
-      Status = gBS->LocateHandleBuffer (ByProtocol, Protocol, NULL, &NoHandles, &Buffer);\r
-    }\r
-\r
-    if (!EFI_ERROR(Status)) {\r
-      *Handle = Buffer[0];\r
-      Status = gBS->HandleProtocol (*Handle, Protocol, Interface);\r
-      ASSERT_EFI_ERROR (Status);\r
-      FreePool (Buffer);\r
-    }\r
-  } else {\r
-    Status = EFI_SUCCESS;\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Connect the predefined platform default console device. Always try to find\r
-  and enable the vga device if have.\r
-\r
-  @param PlatformConsole          Predefined platform default console device array.\r
-\r
-  @retval EFI_SUCCESS             Success connect at least one ConIn and ConOut\r
-                                  device, there must have one ConOut device is\r
-                                  active vga device.\r
-  @return Return the status of BdsLibConnectAllDefaultConsoles ()\r
-\r
-**/\r
-EFI_STATUS\r
-PlatformBdsConnectConsole (\r
-  VOID\r
-  )\r
-{\r
-  EFI_STATUS                Status;\r
-  EFI_DEVICE_PATH*          ConOutDevicePaths;\r
-  EFI_DEVICE_PATH*          ConInDevicePaths;\r
-  EFI_DEVICE_PATH*          ConErrDevicePaths;\r
-\r
-  // By getting the Console Device Paths from the environment variables before initializing the console pipe, we\r
-  // create the 3 environment variables (ConIn, ConOut, ConErr) that allows to initialize all the console interface\r
-  // of newly installed console drivers\r
-  Status = GetConsoleDevicePathFromVariable (L"ConOut", (CHAR16*)PcdGetPtr(PcdDefaultConOutPaths), &ConOutDevicePaths);\r
-  ASSERT_EFI_ERROR (Status);\r
-  Status = GetConsoleDevicePathFromVariable (L"ConIn", (CHAR16*)PcdGetPtr(PcdDefaultConInPaths), &ConInDevicePaths);\r
-  ASSERT_EFI_ERROR (Status);\r
-  Status = GetConsoleDevicePathFromVariable (L"ErrOut", (CHAR16*)PcdGetPtr(PcdDefaultConOutPaths), &ConErrDevicePaths);\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  // Initialize the Consoles\r
-  Status = InitializeConsolePipe (ConOutDevicePaths, &gEfiSimpleTextOutProtocolGuid, &gST->ConsoleOutHandle, (VOID **)&gST->ConOut);\r
-  ASSERT_EFI_ERROR (Status);\r
-  Status = InitializeConsolePipe (ConInDevicePaths, &gEfiSimpleTextInProtocolGuid, &gST->ConsoleInHandle, (VOID **)&gST->ConIn);\r
-  ASSERT_EFI_ERROR (Status);\r
-  Status = InitializeConsolePipe (ConErrDevicePaths, &gEfiSimpleTextOutProtocolGuid, &gST->StandardErrorHandle, (VOID **)&gST->StdErr);\r
-  if (EFI_ERROR(Status)) {\r
-    // In case of error, we reuse the console output for the error output\r
-    gST->StandardErrorHandle = gST->ConsoleOutHandle;\r
-    gST->StdErr = gST->ConOut;\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-/**\r
-  Connect with predefined platform connect sequence,\r
-  the OEM/IBV can customize with their own connect sequence.\r
-**/\r
-VOID\r
-PlatformBdsConnectSequence (\r
-  VOID\r
-  )\r
-{\r
-}\r
-\r
-/**\r
-  Load the predefined driver option, OEM/IBV can customize this\r
-  to load their own drivers\r
-\r
-  @param BdsDriverLists  - The header of the driver option link list.\r
-\r
-**/\r
-VOID\r
-PlatformBdsGetDriverOption (\r
-  IN OUT LIST_ENTRY              *BdsDriverLists\r
-  )\r
-{\r
-}\r
-\r
-/**\r
-  Perform the platform diagnostic, such like test memory. OEM/IBV also\r
-  can customize this function to support specific platform diagnostic.\r
-\r
-  @param MemoryTestLevel  The memory test intensive level\r
-  @param QuietBoot        Indicate if need to enable the quiet boot\r
-  @param BaseMemoryTest   A pointer to BdsMemoryTest()\r
-\r
-**/\r
-VOID\r
-PlatformBdsDiagnostics (\r
-  IN EXTENDMEM_COVERAGE_LEVEL    MemoryTestLevel,\r
-  IN BOOLEAN                     QuietBoot,\r
-  IN BASEM_MEMORY_TEST           BaseMemoryTest\r
-  )\r
-{\r
-}\r
-\r
-/**\r
-  The function will execute with as the platform policy, current policy\r
-  is driven by boot mode. IBV/OEM can customize this code for their specific\r
-  policy action.\r
-\r
-  @param  DriverOptionList        The header of the driver option link list\r
-  @param  BootOptionList          The header of the boot option link list\r
-  @param  ProcessCapsules         A pointer to ProcessCapsules()\r
-  @param  BaseMemoryTest          A pointer to BaseMemoryTest()\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBdsPolicyBehavior (\r
-  IN LIST_ENTRY                      *DriverOptionList,\r
-  IN LIST_ENTRY                      *BootOptionList,\r
-  IN PROCESS_CAPSULES                ProcessCapsules,\r
-  IN BASEM_MEMORY_TEST               BaseMemoryTest\r
-  )\r
-{\r
-  EFI_STATUS Status;\r
-\r
-  Status = PlatformBdsConnectConsole ();\r
-  ASSERT_EFI_ERROR (Status);\r
-\r
-  //\r
-  // Show the splash screen.\r
-  //\r
-  EnableQuietBoot (PcdGetPtr (PcdLogoFile));\r
-\r
-  //\r
-  // Connect _all_ devices, to pick up plug-in and removable devices\r
-  // TODO: do this more cleanly, permitting faster boot times when boot config\r
-  //       is known\r
-  //\r
-  BdsLibConnectAll ();\r
-}\r
-\r
-/**\r
-  Hook point after a boot attempt succeeds. We don't expect a boot option to\r
-  return, so the UEFI 2.0 specification defines that you will default to an\r
-  interactive mode and stop processing the BootOrder list in this case. This\r
-  is also a platform implementation and can be customized by IBV/OEM.\r
-\r
-  @param  Option                  Pointer to Boot Option that succeeded to boot.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBdsBootSuccess (\r
-  IN  BDS_COMMON_OPTION *Option\r
-  )\r
-{\r
-}\r
-\r
-/**\r
-  Hook point after a boot attempt fails.\r
-\r
-  @param  Option                  Pointer to Boot Option that failed to boot.\r
-  @param  Status                  Status returned from failed boot.\r
-  @param  ExitData                Exit data returned from failed boot.\r
-  @param  ExitDataSize            Exit data size returned from failed boot.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBdsBootFail (\r
-  IN  BDS_COMMON_OPTION  *Option,\r
-  IN  EFI_STATUS         Status,\r
-  IN  CHAR16             *ExitData,\r
-  IN  UINTN              ExitDataSize\r
-  )\r
-{\r
-}\r
-\r
-/**\r
-  This function locks platform flash that is not allowed to be updated during normal boot path.\r
-  The flash layout is platform specific.\r
-**/\r
-VOID\r
-EFIAPI\r
-PlatformBdsLockNonUpdatableFlash (\r
-  VOID\r
-  )\r
-{\r
-  return;\r
-}\r
-\r
-\r
-/**\r
-  Lock the ConsoleIn device in system table. All key\r
-  presses will be ignored until the Password is typed in. The only way to\r
-  disable the password is to type it in to a ConIn device.\r
-\r
-  @param  Password        Password used to lock ConIn device.\r
-\r
-  @retval EFI_SUCCESS     lock the Console In Spliter virtual handle successfully.\r
-  @retval EFI_UNSUPPORTED Password not found\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-LockKeyboards (\r
-  IN  CHAR16    *Password\r
-  )\r
-{\r
-    return EFI_UNSUPPORTED;\r
-}\r
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h
deleted file mode 100644 (file)
index 1329c54..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/** @file\r
-  Head file for BDS Platform specific code\r
-\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\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
-**/\r
-\r
-#ifndef _INTEL_BDS_PLATFORM_H_\r
-#define _INTEL_BDS_PLATFORM_H_\r
-\r
-#include <Protocol/DevicePathFromText.h>\r
-#include <Protocol/DevicePathToText.h>\r
-\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/DebugLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/GenericBdsLib.h>\r
-#include <Library/PlatformBdsLib.h>\r
-#include <Library/UefiLib.h>\r
-\r
-#include <Guid/GlobalVariable.h>\r
-#include <Guid/EventGroup.h>\r
-\r
-#endif // _INTEL_BDS_PLATFORM_H\r
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
deleted file mode 100644 (file)
index a27adac..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-## @file\r
-#  Implementation for PlatformBdsLib library class interfaces.\r
-#  using ARM Platform framework.\r
-#\r
-#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
-#  Copyright (c) 2014, ARM Ltd. All rights reserved.<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
-##\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = PlatformIntelBdsLib\r
-  FILE_GUID                      = 67780d14-60eb-4894-ab7c-eed6af427f9f\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  LIBRARY_CLASS                  = PlatformBdsLib|DXE_DRIVER\r
-  CONSTRUCTOR                    = PlatformIntelBdsConstructor\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = ARM AARCH64\r
-#\r
-\r
-[Sources]\r
-  IntelBdsPlatform.c\r
-  IntelBdsPlatform.h\r
-\r
-[Packages]\r
-  ArmPkg/ArmPkg.dec\r
-  ArmPlatformPkg/ArmPlatformPkg.dec\r
-  MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
-  IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec\r
-\r
-[LibraryClasses]\r
-  BaseLib\r
-  BaseMemoryLib\r
-  DebugLib\r
-  DevicePathLib\r
-  MemoryAllocationLib\r
-  UefiBootServicesTableLib\r
-  PcdLib\r
-  GenericBdsLib\r
-  UefiLib\r
-\r
-[Guids]\r
-  gEfiEndOfDxeEventGroupGuid\r
-\r
-[Pcd]\r
-  gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths\r
-  gArmPlatformTokenSpaceGuid.PcdDefaultConOutPaths\r
-  gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut\r
-  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile\r
-\r
-[Protocols]\r
-  gEfiDevicePathFromTextProtocolGuid\r
-  gEfiDevicePathToTextProtocolGuid\r