]>
Commit | Line | Data |
---|---|---|
f1baef62 | 1 | /** @file\r |
2 | Base Library CPU Functions for EBC\r | |
3 | \r | |
4 | Copyright (c) 2006, Intel Corporation<BR>\r | |
5 | All rights reserved. This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
1efcc4ae | 14 | \r |
c6aa36b6 | 15 | #include <BaseLibInternals.h>\r |
f1baef62 | 16 | \r |
17 | extern\r | |
18 | UINT64\r | |
19 | _break (\r | |
20 | CHAR8 BreakCode\r | |
21 | );\r | |
22 | \r | |
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 | |
30 | VOID\r | |
31 | EFIAPI\r | |
32 | CpuBreakpoint (\r | |
33 | VOID\r | |
34 | )\r | |
35 | {\r | |
36 | _break (3);\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 | |
46 | VOID\r | |
47 | EFIAPI\r | |
48 | MemoryFence (\r | |
49 | VOID\r | |
50 | )\r | |
51 | {\r | |
52 | }\r | |
53 | \r | |
54 | /**\r | |
55 | Disables CPU interrupts.\r | |
56 | \r | |
57 | Disables CPU interrupts.\r | |
58 | \r | |
59 | **/\r | |
60 | VOID\r | |
61 | EFIAPI\r | |
62 | DisableInterrupts (\r | |
63 | VOID\r | |
64 | )\r | |
65 | {\r | |
66 | ASSERT (FALSE);\r | |
67 | }\r | |
68 | \r | |
69 | /**\r | |
70 | Enables CPU interrupts.\r | |
71 | \r | |
72 | Enables CPU interrupts.\r | |
73 | \r | |
74 | **/\r | |
75 | VOID\r | |
76 | EFIAPI\r | |
77 | EnableInterrupts (\r | |
78 | VOID\r | |
79 | )\r | |
80 | {\r | |
81 | ASSERT (FALSE);\r | |
82 | }\r | |
83 | \r | |
84 | /**\r | |
85 | Retrieves the current CPU interrupt state.\r | |
86 | \r | |
87 | Retrieves the current CPU interrupt state. Returns TRUE is interrupts are\r | |
88 | currently enabled. Otherwise returns FALSE.\r | |
89 | \r | |
90 | @retval TRUE CPU interrupts are enabled.\r | |
91 | @retval FALSE CPU interrupts are disabled.\r | |
92 | \r | |
93 | **/\r | |
94 | BOOLEAN\r | |
95 | EFIAPI\r | |
96 | GetInterruptState (\r | |
97 | VOID\r | |
98 | )\r | |
99 | {\r | |
100 | ASSERT (FALSE);\r | |
101 | return FALSE;\r | |
102 | }\r | |
103 | \r | |
104 | /**\r | |
105 | Enables CPU interrupts for the smallest window required to capture any\r | |
106 | pending interrupts.\r | |
107 | \r | |
108 | Enables CPU interrupts for the smallest window required to capture any\r | |
109 | pending interrupts.\r | |
110 | \r | |
111 | **/\r | |
112 | VOID\r | |
113 | EFIAPI\r | |
114 | EnableDisableInterrupts (\r | |
115 | VOID\r | |
116 | )\r | |
117 | {\r | |
118 | EnableInterrupts ();\r | |
119 | DisableInterrupts ();\r | |
120 | }\r | |
121 | \r | |
122 | /**\r | |
123 | Requests CPU to pause for a short period of time.\r | |
124 | \r | |
125 | Requests CPU to pause for a short period of time. Typically used in MP\r | |
126 | systems to prevent memory starvation while waiting for a spin lock.\r | |
127 | \r | |
128 | **/\r | |
129 | VOID\r | |
130 | EFIAPI\r | |
131 | CpuPause (\r | |
132 | VOID\r | |
133 | )\r | |
134 | {\r | |
135 | }\r | |
136 | \r |