]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c
Make MDE and EdkModule packages avoid all Intel IPF compiler warnings except waning...
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ebc / CpuBreakpoint.c
1 /** @file
2 Base Library CPU Functions for EBC
3
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 extern
16 UINT64
17 _break (
18 CHAR8 BreakCode
19 );
20
21 /**
22 Generates a breakpoint on the CPU.
23
24 Generates a breakpoint on the CPU. The breakpoint must be implemented such
25 that code can resume normal execution after the breakpoint.
26
27 **/
28 VOID
29 EFIAPI
30 CpuBreakpoint (
31 VOID
32 )
33 {
34 _break (3);
35 }
36
37 /**
38 Used to serialize load and store operations.
39
40 All loads and stores that proceed calls to this function are guaranteed to be
41 globally visible when this function returns.
42
43 **/
44 VOID
45 EFIAPI
46 MemoryFence (
47 VOID
48 )
49 {
50 }
51
52 /**
53 Disables CPU interrupts.
54
55 Disables CPU interrupts.
56
57 **/
58 VOID
59 EFIAPI
60 DisableInterrupts (
61 VOID
62 )
63 {
64 ASSERT (FALSE);
65 }
66
67 /**
68 Enables CPU interrupts.
69
70 Enables CPU interrupts.
71
72 **/
73 VOID
74 EFIAPI
75 EnableInterrupts (
76 VOID
77 )
78 {
79 ASSERT (FALSE);
80 }
81
82 /**
83 Retrieves the current CPU interrupt state.
84
85 Retrieves the current CPU interrupt state. Returns TRUE is interrupts are
86 currently enabled. Otherwise returns FALSE.
87
88 @retval TRUE CPU interrupts are enabled.
89 @retval FALSE CPU interrupts are disabled.
90
91 **/
92 BOOLEAN
93 EFIAPI
94 GetInterruptState (
95 VOID
96 )
97 {
98 ASSERT (FALSE);
99 return FALSE;
100 }
101
102 /**
103 Enables CPU interrupts for the smallest window required to capture any
104 pending interrupts.
105
106 Enables CPU interrupts for the smallest window required to capture any
107 pending interrupts.
108
109 **/
110 VOID
111 EFIAPI
112 EnableDisableInterrupts (
113 VOID
114 )
115 {
116 EnableInterrupts ();
117 DisableInterrupts ();
118 }
119
120 /**
121 Requests CPU to pause for a short period of time.
122
123 Requests CPU to pause for a short period of time. Typically used in MP
124 systems to prevent memory starvation while waiting for a spin lock.
125
126 **/
127 VOID
128 EFIAPI
129 CpuPause (
130 VOID
131 )
132 {
133 }
134
135 /**
136 Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
137
138 Flushes all the Translation Lookaside Buffers(TLB) entries in a CPU.
139
140 **/
141 VOID
142 EFIAPI
143 CpuFlushTlb (
144 VOID
145 )
146 {
147 ASSERT (FALSE);
148 }
149
150 /**
151 Places the CPU in a sleep state until an interrupt is received.
152
153 Places the CPU in a sleep state until an interrupt is received. If interrupts
154 are disabled prior to calling this function, then the CPU will be placed in a
155 sleep state indefinitely.
156
157 **/
158 VOID
159 EFIAPI
160 CpuSleep (
161 VOID
162 )
163 {
164 }