]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ipf/CpuBreakpoint.c
a72049b98a462fff059fc1fd6d3e7e1cdcebdfea
[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 //
16 // Include common header file for this module.
17 //
18 #include <BaseLibInternals.h>
19
20 /**
21 Generates a breakpoint on the CPU.
22
23 Generates a breakpoint on the CPU. The breakpoint must be implemented such
24 that code can resume normal execution after the breakpoint.
25
26 **/
27 VOID
28 EFIAPI
29 CpuBreakpoint (
30 VOID
31 )
32 {
33 __break (0);
34 }
35
36 /**
37 Used to serialize load and store operations.
38
39 All loads and stores that proceed calls to this function are guaranteed to be
40 globally visible when this function returns.
41
42 **/
43 VOID
44 EFIAPI
45 MemoryFence (
46 VOID
47 )
48 {
49 __mfa ();
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 _disable ();
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 _enable ();
80 }
81
82 /**
83 Enables CPU interrupts for the smallest window required to capture any
84 pending interrupts.
85
86 Enables CPU interrupts for the smallest window required to capture any
87 pending interrupts.
88
89 **/
90 VOID
91 EFIAPI
92 EnableDisableInterrupts (
93 VOID
94 )
95 {
96 EnableInterrupts ();
97 DisableInterrupts ();
98 }