summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ArmPkg/ArmPkg.dec1
-rw-r--r--ArmPkg/Include/Protocol/TimerDebugSupport.h59
-rw-r--r--EmbeddedPkg/DebugSupportDxe/DebugSupport.c119
-rw-r--r--EmbeddedPkg/DebugSupportDxe/DebugSupportDxe.inf40
-rw-r--r--Omap35xxPkg/TimerDxe/Timer.c53
-rw-r--r--Omap35xxPkg/TimerDxe/TimerDxe.inf1
6 files changed, 11 insertions, 262 deletions
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index cd672c427f..0b8c101c82 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -42,7 +42,6 @@
gArmTokenSpaceGuid = { 0xBB11ECFE, 0x820F, 0x4968, { 0xBB, 0xA6, 0xF7, 0x6A, 0xFE, 0x30, 0x25, 0x96 } }
[Protocols.common]
- gTimerDebugSupportProtocolGuid = { 0x68300561, 0x0197, 0x465d, { 0xb5, 0xa1, 0x28, 0xeb, 0xa1, 0x98, 0xdd, 0x0b } }
gVirtualUncachedPagesProtocolGuid = { 0xAD651C7D, 0x3C22, 0x4DBF, { 0x92, 0xe8, 0x38, 0xa7, 0xcd, 0xae, 0x87, 0xb2 } }
[PcdsFeatureFlag.common]
diff --git a/ArmPkg/Include/Protocol/TimerDebugSupport.h b/ArmPkg/Include/Protocol/TimerDebugSupport.h
deleted file mode 100644
index ca2601e798..0000000000
--- a/ArmPkg/Include/Protocol/TimerDebugSupport.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/** @file
-
- 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.
-
-**/
-
-#ifndef __TIMERDEBUGSUPPORTPROTOCOL_H__
-#define __TIMERDEBUGSUPPORTPROTOCOL_H__
-
-//
-// Protocol GUID
-//
-#define TIMER_DEBUG_PROTOCOL_GUID { 0x68300561, 0x0197, 0x465d, { 0xb5, 0xa1, 0x28, 0xeb, 0xa1, 0x98, 0xdd, 0x0b } }
-
-
-
-//
-// Protocol interface structure
-//
-typedef struct _TIMER_DEBUG_SUPPORT_PROTOCOL TIMER_DEBUG_SUPPORT_PROTOCOL;
-
-
-typedef
-EFI_STATUS
-(EFIAPI *TIMER_DEBUG_SUPPORT_REGISTER_PERIODIC_CALLBACK) (
- IN TIMER_DEBUG_SUPPORT_PROTOCOL *This,
- IN EFI_PERIODIC_CALLBACK PeriodicCallback
- )
-/*++
-
-Routine Description:
- Register a periodic callback for debug support.
-
-Arguments:
- This - pointer to protocol
- PeriodicCallback - callback to be registered
-
-Returns:
- EFI_SUCCESS - callback registered
-
---*/
-;
-
-struct _TIMER_DEBUG_SUPPORT_PROTOCOL {
- TIMER_DEBUG_SUPPORT_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;
-};
-
-extern EFI_GUID gTimerDebugSupportProtocolGuid;
-
-#endif // __TIMERDEBUGSUPPORTPROTOCOL_H__
-
diff --git a/EmbeddedPkg/DebugSupportDxe/DebugSupport.c b/EmbeddedPkg/DebugSupportDxe/DebugSupport.c
deleted file mode 100644
index 5498aabc75..0000000000
--- a/EmbeddedPkg/DebugSupportDxe/DebugSupport.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/** @file
-
- 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/CacheMaintenanceLib.h>
-#include <Library/DebugLib.h>
-#include <Library/UefiBootServicesTableLib.h>
-
-#include <Protocol/Cpu.h>
-#include <Protocol/DebugSupport.h>
-#include <Protocol/TimerDebugSupport.h>
-
-EFI_STATUS
-EFIAPI
-DebugSupportGetMaximumProcessorIndex (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- OUT UINTN *MaxProcessorIndex
- )
-{
- if (MaxProcessorIndex == NULL) {
- return EFI_INVALID_PARAMETER;
- }
-
- *MaxProcessorIndex = 0;
-
- return EFI_SUCCESS;
-}
-
-EFI_STATUS
-EFIAPI
-DebugSupportRegisterPeriodicCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_PERIODIC_CALLBACK PeriodicCallback
- )
-{
- TIMER_DEBUG_SUPPORT_PROTOCOL *Timer;
- EFI_STATUS Status;
-
- Status = gBS->LocateProtocol(&gTimerDebugSupportProtocolGuid, NULL, (VOID **)&Timer);
- if (EFI_ERROR(Status)) {
- return Status;
- }
-
- Status = Timer->RegisterPeriodicCallback(Timer, PeriodicCallback);
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-DebugSupportRegisterExceptionCallback (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
- IN EFI_EXCEPTION_TYPE ExceptionType
- )
-{
- EFI_CPU_ARCH_PROTOCOL *Cpu;
- EFI_STATUS Status;
-
- Status = gBS->LocateProtocol(&gEfiCpuArchProtocolGuid, NULL, (VOID **)&Cpu);
- if (EFI_ERROR(Status)) {
- return Status;
- }
-
- Status = Cpu->RegisterInterruptHandler(Cpu, ExceptionType, (EFI_CPU_INTERRUPT_HANDLER)ExceptionCallback);
-
- return Status;
-}
-
-EFI_STATUS
-EFIAPI
-DebugSupportInvalidateInstructionCache (
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
- IN UINTN ProcessorIndex,
- IN VOID *Start,
- IN UINT64 Length
- )
-{
- InvalidateInstructionCacheRange(Start, Length);
- return EFI_SUCCESS;
-}
-
-EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupport = {
- IsaArm,
- DebugSupportGetMaximumProcessorIndex,
- DebugSupportRegisterPeriodicCallback,
- DebugSupportRegisterExceptionCallback,
- DebugSupportInvalidateInstructionCache
-};
-
-EFI_STATUS
-DebugSupportDxeInitialize (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- )
-{
- EFI_STATUS Status;
- EFI_HANDLE Handle = NULL;
-
- ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiDebugSupportProtocolGuid);
- Status = gBS->InstallMultipleProtocolInterfaces(&Handle, &gEfiDebugSupportProtocolGuid, &mDebugSupport, NULL);
-
- return Status;
-}
-
diff --git a/EmbeddedPkg/DebugSupportDxe/DebugSupportDxe.inf b/EmbeddedPkg/DebugSupportDxe/DebugSupportDxe.inf
deleted file mode 100644
index dea40d9956..0000000000
--- a/EmbeddedPkg/DebugSupportDxe/DebugSupportDxe.inf
+++ /dev/null
@@ -1,40 +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 = ArmDebugSupportDxe
- FILE_GUID = 2e7c151b-cbd8-4df6-a0e3-cde660067c6a
- MODULE_TYPE = DXE_DRIVER
- VERSION_STRING = 1.0
-
- ENTRY_POINT = DebugSupportDxeInitialize
-
-[Sources.common]
- DebugSupport.c
-
-[Packages]
- MdePkg/MdePkg.dec
- EmbeddedePkg/EmbeddedePkg.dec
-
-[LibraryClasses]
- BaseMemoryLib
- CacheMaintenanceLib
- UefiDriverEntryPoint
- ArmLib
-
-[Protocols]
- gEfiCpuArchProtocolGuid
- gEfiDebugSupportProtocolGuid
- gTimerDebugSupportProtocolGuid
-
diff --git a/Omap35xxPkg/TimerDxe/Timer.c b/Omap35xxPkg/TimerDxe/Timer.c
index b5fc6e145a..1919618ef2 100644
--- a/Omap35xxPkg/TimerDxe/Timer.c
+++ b/Omap35xxPkg/TimerDxe/Timer.c
@@ -27,14 +27,12 @@
#include <Protocol/Timer.h>
#include <Protocol/HardwareInterrupt.h>
-#include <Protocol/TimerDebugSupport.h>
#include <Omap3530/Omap3530.h>
// The notification function to call on every timer interrupt.
volatile EFI_TIMER_NOTIFY mTimerNotifyFunction = (EFI_TIMER_NOTIFY)NULL;
-volatile EFI_PERIODIC_CALLBACK mTimerPeriodicCallback = (EFI_PERIODIC_CALLBACK)NULL;
// The current period of the timer interrupt
@@ -85,11 +83,6 @@ TimerInterruptHandler (
//
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
-
- if (mTimerPeriodicCallback) {
- mTimerPeriodicCallback(SystemContext);
- }
-
if (mTimerNotifyFunction) {
mTimerNotifyFunction(mTimerPeriod);
}
@@ -276,27 +269,6 @@ TimerDriverGenerateSoftInterrupt (
}
-EFI_STATUS
-EFIAPI
-TimerDriverRegisterPeriodicCallback (
- IN TIMER_DEBUG_SUPPORT_PROTOCOL *This,
- IN EFI_PERIODIC_CALLBACK PeriodicCallback
- )
-{
- if ((PeriodicCallback == NULL) && (mTimerPeriodicCallback == NULL)) {
- return EFI_INVALID_PARAMETER;
- }
-
- if ((PeriodicCallback != NULL) && (mTimerPeriodicCallback != NULL)) {
- return EFI_ALREADY_STARTED;
- }
-
- mTimerPeriodicCallback = PeriodicCallback;
-
- return EFI_SUCCESS;
-}
-
-
/**
Interface stucture for the Timer Architectural Protocol.
@@ -338,10 +310,6 @@ EFI_TIMER_ARCH_PROTOCOL gTimer = {
TimerDriverGenerateSoftInterrupt
};
-TIMER_DEBUG_SUPPORT_PROTOCOL gTimerDebugSupport = {
- TimerDriverRegisterPeriodicCallback
-};
-
/**
Initialize the state information for the Timer Architectural Protocol and
@@ -368,11 +336,11 @@ TimerInitialize (
UINT32 TimerBaseAddress;
// Find the interrupt controller protocol. ASSERT if not found.
- Status = gBS->LocateProtocol(&gHardwareInterruptProtocolGuid, NULL, (VOID **)&gInterrupt);
+ Status = gBS->LocateProtocol (&gHardwareInterruptProtocolGuid, NULL, (VOID **)&gInterrupt);
ASSERT_EFI_ERROR (Status);
// Set up the timer registers
- TimerBaseAddress = TimerBase(FixedPcdGet32(PcdOmap35xxArchTimer));
+ TimerBaseAddress = TimerBase (FixedPcdGet32(PcdOmap35xxArchTimer));
TISR = TimerBaseAddress + GPTIMER_TISR;
TCLR = TimerBaseAddress + GPTIMER_TCLR;
TLDR = TimerBaseAddress + GPTIMER_TLDR;
@@ -380,23 +348,24 @@ TimerInitialize (
TIER = TimerBaseAddress + GPTIMER_TIER;
// Disable the timer
- Status = TimerDriverSetTimerPeriod(&gTimer, 0);
+ Status = TimerDriverSetTimerPeriod (&gTimer, 0);
ASSERT_EFI_ERROR (Status);
// Install interrupt handler
- gVector = InterruptVectorForTimer(FixedPcdGet32(PcdOmap35xxArchTimer));
- Status = gInterrupt->RegisterInterruptSource(gInterrupt, gVector, TimerInterruptHandler);
+ gVector = InterruptVectorForTimer (FixedPcdGet32(PcdOmap35xxArchTimer));
+ Status = gInterrupt->RegisterInterruptSource (gInterrupt, gVector, TimerInterruptHandler);
ASSERT_EFI_ERROR (Status);
// Set up default timer
- Status = TimerDriverSetTimerPeriod(&gTimer, FixedPcdGet32(PcdTimerPeriod));
+ Status = TimerDriverSetTimerPeriod (&gTimer, FixedPcdGet32(PcdTimerPeriod));
ASSERT_EFI_ERROR (Status);
// Install the Timer Architectural Protocol onto a new handle
- Status = gBS->InstallMultipleProtocolInterfaces(&Handle,
- &gEfiTimerArchProtocolGuid, &gTimer,
- &gTimerDebugSupportProtocolGuid, &gTimerDebugSupport,
- NULL);
+ Status = gBS->InstallMultipleProtocolInterfaces (
+ &Handle,
+ &gEfiTimerArchProtocolGuid, &gTimer,
+ NULL
+ );
ASSERT_EFI_ERROR(Status);
return Status;
diff --git a/Omap35xxPkg/TimerDxe/TimerDxe.inf b/Omap35xxPkg/TimerDxe/TimerDxe.inf
index b2b6d75f05..eefcc49b17 100644
--- a/Omap35xxPkg/TimerDxe/TimerDxe.inf
+++ b/Omap35xxPkg/TimerDxe/TimerDxe.inf
@@ -47,7 +47,6 @@
[Protocols]
gEfiTimerArchProtocolGuid
gHardwareInterruptProtocolGuid
- gTimerDebugSupportProtocolGuid
[Pcd.common]
gEmbeddedTokenSpaceGuid.PcdTimerPeriod