]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c
Fix MASM build break
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ipf / CpuBreakpoint.c
1 /** @file
2 Base Library CPU functions for Itanium
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 //void __mfa (void);
16
17 #pragma intrinsic (_enable)
18 #pragma intrinsic (_disable)
19 #pragma intrinsic (__break)
20 #pragma intrinsic (__mfa)
21
22 /**
23 Generates a breakpoint on the CPU.
24
25 Generates a breakpoint on the CPU. The breakpoint must be implemented such
26 that code can resume normal execution after the breakpoint.
27
28 **/
29 VOID
30 EFIAPI
31 CpuBreakpoint (
32 VOID
33 )
34 {
35 __break (0);
36 }
37
38 /**
39 Used to serialize load and store operations.
40
41 All loads and stores that proceed calls to this function are guaranteed to be
42 globally visible when this function returns.
43
44 **/
45 VOID
46 EFIAPI
47 MemoryFence (
48 VOID
49 )
50 {
51 __mfa ();
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 _disable ();
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 _enable ();
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 return FALSE;
101 }