]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c
remove unnecessary comments introduced by tools from MdePkg. The regular express...
[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 #include <BaseLibInternals.h>
16
17 extern
18 UINT64
19 _break (
20 CHAR8 BreakCode
21 );
22
23 /**
24 Generates a breakpoint on the CPU.
25
26 Generates a breakpoint on the CPU. The breakpoint must be implemented such
27 that code can resume normal execution after the breakpoint.
28
29 **/
30 VOID
31 EFIAPI
32 CpuBreakpoint (
33 VOID
34 )
35 {
36 _break (3);
37 }
38
39 /**
40 Used to serialize load and store operations.
41
42 All loads and stores that proceed calls to this function are guaranteed to be
43 globally visible when this function returns.
44
45 **/
46 VOID
47 EFIAPI
48 MemoryFence (
49 VOID
50 )
51 {
52 }
53
54 /**
55 Disables CPU interrupts.
56
57 Disables CPU interrupts.
58
59 **/
60 VOID
61 EFIAPI
62 DisableInterrupts (
63 VOID
64 )
65 {
66 ASSERT (FALSE);
67 }
68
69 /**
70 Enables CPU interrupts.
71
72 Enables CPU interrupts.
73
74 **/
75 VOID
76 EFIAPI
77 EnableInterrupts (
78 VOID
79 )
80 {
81 ASSERT (FALSE);
82 }
83
84 /**
85 Retrieves the current CPU interrupt state.
86
87 Retrieves the current CPU interrupt state. Returns TRUE is interrupts are
88 currently enabled. Otherwise returns FALSE.
89
90 @retval TRUE CPU interrupts are enabled.
91 @retval FALSE CPU interrupts are disabled.
92
93 **/
94 BOOLEAN
95 EFIAPI
96 GetInterruptState (
97 VOID
98 )
99 {
100 ASSERT (FALSE);
101 return FALSE;
102 }
103
104 /**
105 Enables CPU interrupts for the smallest window required to capture any
106 pending interrupts.
107
108 Enables CPU interrupts for the smallest window required to capture any
109 pending interrupts.
110
111 **/
112 VOID
113 EFIAPI
114 EnableDisableInterrupts (
115 VOID
116 )
117 {
118 EnableInterrupts ();
119 DisableInterrupts ();
120 }
121
122 /**
123 Requests CPU to pause for a short period of time.
124
125 Requests CPU to pause for a short period of time. Typically used in MP
126 systems to prevent memory starvation while waiting for a spin lock.
127
128 **/
129 VOID
130 EFIAPI
131 CpuPause (
132 VOID
133 )
134 {
135 }
136