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