diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-25 15:32:05 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-26 09:19:40 +0100 |
commit | 1db0fcaa82d3611eac99e7530b7246b461029bf9 (patch) | |
tree | 3bd4c21087d8fa459b4aa0b8fe3cf4e1486dc3fa /BeagleBoardPkg/Library | |
parent | a125281d6aed47ed731f1950939400f7aa17863d (diff) | |
download | edk2-platforms-1db0fcaa82d3611eac99e7530b7246b461029bf9.tar.xz |
BeagleBoardPkg: remove unused modules
Commit 0bade1054db7 ("BeagleBoardPkg: Replaced the original DSC/FDF files
by their new versions that use the ARM Platform Framework"), which dates
back to 2011, modified BeagleBoardPkg to replace references to its Sec.inf,
Bds.inf and some of its library implementations to refer to versions under
ArmPlatformPkg instead. Since the original modules have been unused ever
since, we can safely remove them now.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'BeagleBoardPkg/Library')
-rw-r--r-- | BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c | 299 | ||||
-rw-r--r-- | BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.inf | 53 | ||||
-rw-r--r-- | BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.c | 103 | ||||
-rw-r--r-- | BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf | 41 |
4 files changed, 0 insertions, 496 deletions
diff --git a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c deleted file mode 100644 index 46204a4386..0000000000 --- a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.c +++ /dev/null @@ -1,299 +0,0 @@ -/** @file
- Add custom commands for BeagleBoard development.
-
- Copyright (c) 2008 - 2010, Apple Inc. 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 <PiDxe.h>
-#include <Library/ArmLib.h>
-#include <Library/CacheMaintenanceLib.h>
-#include <Library/EblCmdLib.h>
-#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Library/MemoryAllocationLib.h>
-#include <Library/UefiLib.h>
-#include <Library/PcdLib.h>
-#include <Library/EfiFileLib.h>
-#include <Library/ArmDisassemblerLib.h>
-#include <Library/PeCoffGetEntryPointLib.h>
-#include <Library/PerformanceLib.h>
-#include <Library/TimerLib.h>
-
-#include <Guid/DebugImageInfoTable.h>
-
-#include <Protocol/DebugSupport.h>
-#include <Protocol/LoadedImage.h>
-
-/**
- Simple arm disassembler via a library
-
- Argv[0] - symboltable
- Argv[1] - Optional quoted format string
- Argv[2] - Optional flag
-
- @param Argc Number of command arguments in Argv
- @param Argv Array of strings that represent the parsed command line.
- Argv[0] is the command name
-
- @return EFI_SUCCESS
-
-**/
-EFI_STATUS
-EblSymbolTable (
- IN UINTN Argc,
- IN CHAR8 **Argv
- )
-{
- EFI_STATUS Status;
- EFI_DEBUG_IMAGE_INFO_TABLE_HEADER *DebugImageTableHeader = NULL;
- EFI_DEBUG_IMAGE_INFO *DebugTable;
- UINTN Entry;
- CHAR8 *Format;
- CHAR8 *Pdb;
- UINT32 PeCoffSizeOfHeaders;
- UINT32 ImageBase;
- BOOLEAN Elf;
-
- // Need to add lots of error checking on the passed in string
- // Default string is for RealView debugger or gdb depending on toolchain used.
- if (Argc > 1) {
- Format = Argv[1];
- } else {
-#if __GNUC__
- // Assume gdb
- Format = "add-symbol-file %a 0x%x";
-#else
- // Default to RVCT
- Format = "load /a /ni /np %a &0x%x";
-#endif
- }
- Elf = (Argc > 2) ? FALSE : TRUE;
-
- Status = EfiGetSystemConfigurationTable (&gEfiDebugImageInfoTableGuid, (VOID **)&DebugImageTableHeader);
- if (EFI_ERROR (Status)) {
- return Status;
- }
-
- DebugTable = DebugImageTableHeader->EfiDebugImageInfoTable;
- if (DebugTable == NULL) {
- return EFI_SUCCESS;
- }
-
- for (Entry = 0; Entry < DebugImageTableHeader->TableSize; Entry++, DebugTable++) {
- if (DebugTable->NormalImage != NULL) {
- if ((DebugTable->NormalImage->ImageInfoType == EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL) && (DebugTable->NormalImage->LoadedImageProtocolInstance != NULL)) {
- ImageBase = (UINT32)DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase;
- PeCoffSizeOfHeaders = PeCoffGetSizeOfHeaders ((VOID *)(UINTN)ImageBase);
- Pdb = PeCoffLoaderGetPdbPointer (DebugTable->NormalImage->LoadedImageProtocolInstance->ImageBase);
- if (Pdb != NULL) {
- if (Elf) {
- // ELF and Mach-O images don't include the header so the linked address does not include header
- ImageBase += PeCoffSizeOfHeaders;
- }
- AsciiPrint (Format, Pdb, ImageBase);
- AsciiPrint ("\n");
- } else {
- }
- }
- }
- }
-
- return EFI_SUCCESS;
-}
-
-
-/**
- Simple arm disassembler via a library
-
- Argv[0] - disasm
- Argv[1] - Address to start disassembling from
- ARgv[2] - Number of instructions to disassembly (optional)
-
- @param Argc Number of command arguments in Argv
- @param Argv Array of strings that represent the parsed command line.
- Argv[0] is the command name
-
- @return EFI_SUCCESS
-
-**/
-EFI_STATUS
-EblDisassembler (
- IN UINTN Argc,
- IN CHAR8 **Argv
- )
-{
- UINT8 *Ptr, *CurrentAddress;
- UINT32 Address;
- UINT32 Count;
- CHAR8 Buffer[80];
- UINT32 ItBlock;
-
- if (Argc < 2) {
- return EFI_INVALID_PARAMETER;
- }
-
- Address = AsciiStrHexToUintn (Argv[1]);
- Count = (Argc > 2) ? (UINT32)AsciiStrHexToUintn (Argv[2]) : 20;
-
- Ptr = (UINT8 *)(UINTN)Address;
- ItBlock = 0;
- do {
- CurrentAddress = Ptr;
- DisassembleInstruction (&Ptr, TRUE, TRUE, &ItBlock, Buffer, sizeof (Buffer));
- AsciiPrint ("0x%08x: %a\n", CurrentAddress, Buffer);
- } while (Count-- > 0);
-
-
- return EFI_SUCCESS;
-}
-
-
-CHAR8 *
-ImageHandleToPdbFileName (
- IN EFI_HANDLE Handle
- )
-{
- EFI_STATUS Status;
- EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
- CHAR8 *Pdb;
- CHAR8 *StripLeading;
-
- Status = gBS->HandleProtocol (Handle, &gEfiLoadedImageProtocolGuid, (VOID **)&LoadedImage);
- if (EFI_ERROR (Status)) {
- return "";
- }
-
- Pdb = PeCoffLoaderGetPdbPointer (LoadedImage->ImageBase);
- StripLeading = AsciiStrStr (Pdb, "\\ARM\\");
- if (StripLeading == NULL) {
- StripLeading = AsciiStrStr (Pdb, "/ARM/");
- if (StripLeading == NULL) {
- return Pdb;
- }
- }
- // Hopefully we hacked off the unneeded part
- return (StripLeading + 5);
-}
-
-
-CHAR8 *mTokenList[] = {
- "SEC",
- "PEI",
- "DXE",
- "BDS",
- NULL
-};
-
-/**
- Simple arm disassembler via a library
-
- Argv[0] - disasm
- Argv[1] - Address to start disassembling from
- ARgv[2] - Number of instructions to disassembly (optional)
-
- @param Argc Number of command arguments in Argv
- @param Argv Array of strings that represent the parsed command line.
- Argv[0] is the command name
-
- @return EFI_SUCCESS
-
-**/
-EFI_STATUS
-EblPerformance (
- IN UINTN Argc,
- IN CHAR8 **Argv
- )
-{
- UINTN Key;
- CONST VOID *Handle;
- CONST CHAR8 *Token, *Module;
- UINT64 Start, Stop, TimeStamp;
- UINT64 Delta, TicksPerSecond, Milliseconds, Microseconds;
- UINTN Index;
-
- TicksPerSecond = GetPerformanceCounterProperties (NULL, NULL);
-
- Key = 0;
- do {
- Key = GetPerformanceMeasurement (Key, (CONST VOID **)&Handle, &Token, &Module, &Start, &Stop);
- if (Key != 0) {
- if (AsciiStriCmp ("StartImage:", Token) == 0) {
- if (Stop == 0) {
- // The entry for EBL is still running so the stop time will be zero. Skip it
- AsciiPrint (" running %a\n", ImageHandleToPdbFileName ((EFI_HANDLE)Handle));
- } else {
- Delta = Stop - Start;
- Microseconds = DivU64x64Remainder (MultU64x32 (Delta, 1000000), TicksPerSecond, NULL);
- AsciiPrint ("%10ld us %a\n", Microseconds, ImageHandleToPdbFileName ((EFI_HANDLE)Handle));
- }
- }
- }
- } while (Key != 0);
-
- AsciiPrint ("\n");
-
- TimeStamp = 0;
- Key = 0;
- do {
- Key = GetPerformanceMeasurement (Key, (CONST VOID **)&Handle, &Token, &Module, &Start, &Stop);
- if (Key != 0) {
- for (Index = 0; mTokenList[Index] != NULL; Index++) {
- if (AsciiStriCmp (mTokenList[Index], Token) == 0) {
- Delta = Stop - Start;
- TimeStamp += Delta;
- Milliseconds = DivU64x64Remainder (MultU64x32 (Delta, 1000), TicksPerSecond, NULL);
- AsciiPrint ("%6a %6ld ms\n", Token, Milliseconds);
- break;
- }
- }
- }
- } while (Key != 0);
-
- AsciiPrint ("Total Time = %ld ms\n\n", DivU64x64Remainder (MultU64x32 (TimeStamp, 1000), TicksPerSecond, NULL));
-
- return EFI_SUCCESS;
-}
-
-
-GLOBAL_REMOVE_IF_UNREFERENCED const EBL_COMMAND_TABLE mLibCmdTemplate[] =
-{
- {
- "disasm address [count]",
- " disassemble count instructions",
- NULL,
- EblDisassembler
- },
- {
- "performance",
- " Display boot performance info",
- NULL,
- EblPerformance
- },
- {
- "symboltable [\"format string\"] [PECOFF]",
- " show symbol table commands for debugger",
- NULL,
- EblSymbolTable
- }
-};
-
-
-VOID
-EblInitializeExternalCmd (
- VOID
- )
-{
- EblAddCommands (mLibCmdTemplate, sizeof (mLibCmdTemplate)/sizeof (EBL_COMMAND_TABLE));
- return;
-}
diff --git a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.inf b/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.inf deleted file mode 100644 index a79448c0e9..0000000000 --- a/BeagleBoardPkg/Library/EblCmdLib/EblCmdLib.inf +++ /dev/null @@ -1,53 +0,0 @@ -#/** @file
-# Component description file for the entry point to a EFIDXE Drivers
-#
-# Library to abstract Framework extensions that conflict with UEFI 2.0 Specification
-# Copyright (c) 2007 - 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.
-#
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = BeagleBoardEblCmdLib
- FILE_GUID = ea62bdc3-1063-425f-8851-98cb47f213a8
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
- LIBRARY_CLASS = EblCmdLib|DXE_DRIVER UEFI_APPLICATION UEFI_DRIVER
-
-
-#
-# The following information is for reference only and not required by the build tools.
-#
-# VALID_ARCHITECTURES = IA32 X64 IPF EBC
-#
-
-[Sources.common]
- EblCmdLib.c
-
-[Packages]
- MdePkg/MdePkg.dec
- MdeModulePkg/MdeModulePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
- ArmPkg/ArmPkg.dec
-
-[LibraryClasses]
- BaseLib
- DebugLib
- ArmDisassemblerLib
- PerformanceLib
- TimerLib
-
-[Protocols]
- gEfiDebugSupportProtocolGuid
- gEfiLoadedImageProtocolGuid
-
-[Guids]
- gEfiDebugImageInfoTableGuid
diff --git a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.c b/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.c deleted file mode 100644 index 82a2957dc9..0000000000 --- a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.c +++ /dev/null @@ -1,103 +0,0 @@ -/** @file
- Basic serial IO abstaction for GDB
-
- Copyright (c) 2008 - 2009, Apple Inc. 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 <Uefi.h>
-#include <Library/GdbSerialLib.h>
-#include <Library/PcdLib.h>
-#include <Library/IoLib.h>
-#include <Library/DebugLib.h>
-#include <Library/OmapLib.h>
-#include <Omap3530/Omap3530.h>
-
-RETURN_STATUS
-EFIAPI
-GdbSerialLibConstructor (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- return RETURN_SUCCESS;
-}
-
-RETURN_STATUS
-EFIAPI
-GdbSerialInit (
- IN UINT64 BaudRate,
- IN UINT8 Parity,
- IN UINT8 DataBits,
- IN UINT8 StopBits
- )
-{
- return RETURN_SUCCESS;
-}
-
-BOOLEAN
-EFIAPI
-GdbIsCharAvailable (
- VOID
- )
-{
- UINT32 LSR = UartBase(PcdGet32(PcdOmap35xxConsoleUart)) + UART_LSR_REG;
-
- if ((MmioRead8(LSR) & UART_LSR_RX_FIFO_E_MASK) == UART_LSR_RX_FIFO_E_NOT_EMPTY) {
- return TRUE;
- } else {
- return FALSE;
- }
-}
-
-CHAR8
-EFIAPI
-GdbGetChar (
- VOID
- )
-{
- UINT32 LSR = UartBase(PcdGet32(PcdOmap35xxConsoleUart)) + UART_LSR_REG;
- UINT32 RBR = UartBase(PcdGet32(PcdOmap35xxConsoleUart)) + UART_RBR_REG;
- CHAR8 Char;
-
- while ((MmioRead8(LSR) & UART_LSR_RX_FIFO_E_MASK) == UART_LSR_RX_FIFO_E_EMPTY);
- Char = MmioRead8(RBR);
-
- return Char;
-}
-
-VOID
-EFIAPI
-GdbPutChar (
- IN CHAR8 Char
- )
-{
- UINT32 LSR = UartBase(PcdGet32(PcdOmap35xxConsoleUart)) + UART_LSR_REG;
- UINT32 THR = UartBase(PcdGet32(PcdOmap35xxConsoleUart)) + UART_THR_REG;
-
- while ((MmioRead8(LSR) & UART_LSR_TX_FIFO_E_MASK) == UART_LSR_TX_FIFO_E_NOT_EMPTY);
- MmioWrite8(THR, Char);
-}
-
-VOID
-GdbPutString (
- IN CHAR8 *String
- )
-{
- while (*String != '\0') {
- GdbPutChar (*String);
- String++;
- }
-}
-
-
-
-
diff --git a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf b/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf deleted file mode 100644 index a06acf14fb..0000000000 --- a/BeagleBoardPkg/Library/GdbSerialLib/GdbSerialLib.inf +++ /dev/null @@ -1,41 +0,0 @@ -#/** @file
-#
-# Copyright (c) 2008 - 2010, Apple Inc. 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.
-#
-#**/
-
-[Defines]
- INF_VERSION = 0x00010005
- BASE_NAME = GdbSerialLib
- FILE_GUID = E2423349-EF5D-439B-95F5-8B8D8E3B443F
- MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
- LIBRARY_CLASS = GdbSerialLib
-
- CONSTRUCTOR = GdbSerialLibConstructor
-
-
-[Sources.common]
- GdbSerialLib.c
-
-
-[Packages]
- MdePkg/MdePkg.dec
- EmbeddedPkg/EmbeddedPkg.dec
- Omap35xxPkg/Omap35xxPkg.dec
-
-[LibraryClasses]
- DebugLib
- IoLib
- OmapLib
-
-[FixedPcd]
- gOmap35xxTokenSpaceGuid.PcdOmap35xxConsoleUart
-
|