]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ipf/CpuBreakpoint.c
Fix ICC11 build failure.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ipf / CpuBreakpoint.c
CommitLineData
3eb9473e 1/*++\r
2\r
9386c41d 3Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
2c7e5c2f 4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12\r
13Module Name:\r
14\r
15 CpuBreakpint.c\r
16 \r
17Abstract: \r
18\r
19--*/\r
20\r
c7f33ca4 21#include "BaseLibInternals.h"\r
3eb9473e 22\r
3eb9473e 23/**\r
24 Generates a breakpoint on the CPU.\r
25\r
26 Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
27 that code can resume normal execution after the breakpoint.\r
28\r
29**/\r
30VOID\r
31EFIAPI\r
32CpuBreakpoint (\r
33 VOID\r
34 )\r
35{\r
36 __break (0);\r
37}\r
38\r
39/**\r
40 Used to serialize load and store operations.\r
41\r
42 All loads and stores that proceed calls to this function are guaranteed to be\r
43 globally visible when this function returns.\r
44\r
45**/\r
46VOID\r
47EFIAPI\r
48MemoryFence (\r
49 VOID\r
50 )\r
51{\r
52 __mfa ();\r
53}\r
54\r
55/**\r
56 Disables CPU interrupts.\r
57\r
58 Disables CPU interrupts.\r
59\r
60**/\r
61VOID\r
62EFIAPI\r
63DisableInterrupts (\r
64 VOID\r
65 )\r
66{\r
67 _disable ();\r
68}\r
69\r
70/**\r
71 Enables CPU interrupts.\r
72\r
73 Enables CPU interrupts.\r
74\r
75**/\r
76VOID\r
77EFIAPI\r
78EnableInterrupts (\r
79 VOID\r
80 )\r
81{\r
82 _enable ();\r
83}\r
84\r
85/**\r
86 Enables CPU interrupts for the smallest window required to capture any\r
87 pending interrupts.\r
88\r
89 Enables CPU interrupts for the smallest window required to capture any\r
90 pending interrupts.\r
91\r
92**/\r
93VOID\r
94EFIAPI\r
95EnableDisableInterrupts (\r
96 VOID\r
97 )\r
98{\r
99 EnableInterrupts ();\r
100 DisableInterrupts ();\r
101}\r
102\r
103/**\r
104 Places the CPU in a sleep state until an interrupt is received.\r
105\r
106 Places the CPU in a sleep state until an interrupt is received. If interrupts\r
107 are disabled prior to calling this function, then the CPU will be placed in a\r
108 sleep state indefinitely.\r
109\r
110**/\r
111VOID\r
112EFIAPI\r
113CpuSleep (\r
114 VOID\r
115 )\r
116{\r
117 PalCallStatic (NULL, 29, 0, 0, 0);\r
118}\r