]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Library/BaseLib/Ebc/CpuBreakpoint.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ebc / CpuBreakpoint.c
... / ...
CommitLineData
1/** @file\r
2 Base Library CPU Functions for EBC\r
3\r
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
6\r
7**/\r
8\r
9#include "BaseLibInternals.h"\r
10\r
11extern\r
12UINT64\r
13_break (\r
14 CHAR8 BreakCode\r
15 );\r
16\r
17/**\r
18 Generates a breakpoint on the CPU.\r
19\r
20 Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
21 that code can resume normal execution after the breakpoint.\r
22\r
23**/\r
24VOID\r
25EFIAPI\r
26CpuBreakpoint (\r
27 VOID\r
28 )\r
29{\r
30 _break (3);\r
31}\r
32\r
33/**\r
34 Used to serialize load and store operations.\r
35\r
36 All loads and stores that proceed calls to this function are guaranteed to be\r
37 globally visible when this function returns.\r
38\r
39**/\r
40VOID\r
41EFIAPI\r
42MemoryFence (\r
43 VOID\r
44 )\r
45{\r
46}\r
47\r
48/**\r
49 Disables CPU interrupts.\r
50\r
51**/\r
52VOID\r
53EFIAPI\r
54DisableInterrupts (\r
55 VOID\r
56 )\r
57{\r
58 ASSERT (FALSE);\r
59}\r
60\r
61/**\r
62 Enables CPU interrupts.\r
63\r
64**/\r
65VOID\r
66EFIAPI\r
67EnableInterrupts (\r
68 VOID\r
69 )\r
70{\r
71 ASSERT (FALSE);\r
72}\r
73\r
74/**\r
75 Retrieves the current CPU interrupt state.\r
76\r
77 Returns TRUE means interrupts are currently enabled. Otherwise,\r
78 returns FALSE.\r
79\r
80 @retval TRUE CPU interrupts are enabled.\r
81 @retval FALSE CPU interrupts are disabled.\r
82\r
83**/\r
84BOOLEAN\r
85EFIAPI\r
86GetInterruptState (\r
87 VOID\r
88 )\r
89{\r
90 ASSERT (FALSE);\r
91 return FALSE;\r
92}\r
93\r
94/**\r
95 Enables CPU interrupts for the smallest window required to capture any\r
96 pending interrupts.\r
97\r
98**/\r
99VOID\r
100EFIAPI\r
101EnableDisableInterrupts (\r
102 VOID\r
103 )\r
104{\r
105 EnableInterrupts ();\r
106 DisableInterrupts ();\r
107}\r
108\r
109/**\r
110 Requests CPU to pause for a short period of time.\r
111\r
112 Requests CPU to pause for a short period of time. Typically used in MP\r
113 systems to prevent memory starvation while waiting for a spin lock.\r
114\r
115**/\r
116VOID\r
117EFIAPI\r
118CpuPause (\r
119 VOID\r
120 )\r
121{\r
122}\r