]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/ArmRealViewEbPkg/Library/DebugAgentTimerLib/DebugAgentTimerLib.c
06df8663c9f3c64f702350af2ff1a87d4eec0074
[mirror_edk2.git] / ArmPlatformPkg / ArmRealViewEbPkg / Library / DebugAgentTimerLib / DebugAgentTimerLib.c
1 /** @file
2 Template for ArmEb DebugAgentLib.
3
4 For ARM we reserve FIQ for the Debug Agent Timer. We don't care about
5 laytency as we only really need the timer to run a few times a second
6 (how fast can some one type a ctrl-c?), but it works much better if
7 the interrupt we are using to break into the debugger is not being
8 used, and masked, by the system.
9
10 Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
11
12 This program and the accompanying materials
13 are licensed and made available under the terms and conditions of the BSD License
14 which accompanies this distribution. The full text of the license may be found at
15 http://opensource.org/licenses/bsd-license.php
16
17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19
20 **/
21
22 #include <Base.h>
23
24 #include <Library/DebugAgentTimerLib.h>
25
26
27
28 /**
29 Setup all the hardware needed for the debug agents timer.
30
31 This function is used to set up debug enviroment.
32
33 **/
34 VOID
35 EFIAPI
36 DebugAgentTimerIntialize (
37 VOID
38 )
39 {
40 // Map Timer to FIQ
41 }
42
43
44 /**
45 Set the period for the debug agent timer. Zero means disable the timer.
46
47 @param[in] TimerPeriodMilliseconds Frequency of the debug agent timer.
48
49 **/
50 VOID
51 EFIAPI
52 DebugAgentTimerSetPeriod (
53 IN UINT32 TimerPeriodMilliseconds
54 )
55 {
56 if (TimerPeriodMilliseconds == 0) {
57 // Disable timer and Disable FIQ
58 return;
59 }
60
61 // Set timer period and unmask FIQ
62 }
63
64
65 /**
66 Perform End Of Interrupt for the debug agent timer. This is called in the
67 interrupt handler after the interrupt has been processed.
68
69 **/
70 VOID
71 EFIAPI
72 DebugAgentTimerEndOfInterrupt (
73 VOID
74 )
75 {
76 // EOI Timer interrupt for FIQ
77 }
78
79