1 | /** @file
|
---|
2 | Debug Agent library implementition with empty functions.
|
---|
3 |
|
---|
4 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #include <Library/DebugAgentLib.h>
|
---|
10 |
|
---|
11 | /**
|
---|
12 | Initialize debug agent.
|
---|
13 |
|
---|
14 | This function is used to set up debug environment to support source level debugging.
|
---|
15 | If certain Debug Agent Library instance has to save some private data in the stack,
|
---|
16 | this function must work on the mode that doesn't return to the caller, then
|
---|
17 | the caller needs to wrap up all rest of logic after InitializeDebugAgent() into one
|
---|
18 | function and pass it into InitializeDebugAgent(). InitializeDebugAgent() is
|
---|
19 | responsible to invoke the passing-in function at the end of InitializeDebugAgent().
|
---|
20 |
|
---|
21 | If the parameter Function is not NULL, Debug Agent Library instance will invoke it by
|
---|
22 | passing in the Context to be its parameter.
|
---|
23 |
|
---|
24 | If Function() is NULL, Debug Agent Library instance will return after setup debug
|
---|
25 | environment.
|
---|
26 |
|
---|
27 | If InitFlag is DEBUG_AGENT_INIT_SMM, Context must point to a BOOLEAN if it's not
|
---|
28 | NULL, which indicates SMM Debug Agent supported or not.
|
---|
29 |
|
---|
30 | @param[in] InitFlag Init flag is used to decide the initialize process.
|
---|
31 | @param[in] Context Context needed according to InitFlag; it was optional.
|
---|
32 | @param[in] Function Continue function called by debug agent library; it was
|
---|
33 | optional.
|
---|
34 |
|
---|
35 | **/
|
---|
36 | VOID
|
---|
37 | EFIAPI
|
---|
38 | InitializeDebugAgent (
|
---|
39 | IN UINT32 InitFlag,
|
---|
40 | IN VOID *Context OPTIONAL,
|
---|
41 | IN DEBUG_AGENT_CONTINUE Function OPTIONAL
|
---|
42 | )
|
---|
43 | {
|
---|
44 | switch (InitFlag) {
|
---|
45 | case DEBUG_AGENT_INIT_SMM:
|
---|
46 | if (Context != NULL) {
|
---|
47 | *(BOOLEAN *)Context = FALSE;
|
---|
48 | }
|
---|
49 |
|
---|
50 | return;
|
---|
51 | }
|
---|
52 |
|
---|
53 | if (Function != NULL) {
|
---|
54 | Function (Context);
|
---|
55 | }
|
---|
56 | }
|
---|
57 |
|
---|
58 | /**
|
---|
59 | Enable/Disable the interrupt of debug timer and return the interrupt state
|
---|
60 | prior to the operation.
|
---|
61 |
|
---|
62 | If EnableStatus is TRUE, enable the interrupt of debug timer.
|
---|
63 | If EnableStatus is FALSE, disable the interrupt of debug timer.
|
---|
64 |
|
---|
65 | @param[in] EnableStatus Enable/Disable.
|
---|
66 |
|
---|
67 | @return FALSE always.
|
---|
68 |
|
---|
69 | **/
|
---|
70 | BOOLEAN
|
---|
71 | EFIAPI
|
---|
72 | SaveAndSetDebugTimerInterrupt (
|
---|
73 | IN BOOLEAN EnableStatus
|
---|
74 | )
|
---|
75 | {
|
---|
76 | return FALSE;
|
---|
77 | }
|
---|