1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
//! CPU Architectural Protocol
//!
//! Abstracts the processor services that are required to implement some of the DXE services.
//!
//! See <https://uefi.org/specs/PI/1.8A/V2_DXE_Architectural_Protocols.html#cpu-architectural-protocol>
//!
//! ## License
//!
//! Copyright (c) Microsoft Corporation.
//!
//! SPDX-License-Identifier: Apache-2.0
//!
use efi;
/// CPU Architectrural Protocol GUID
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.1
pub const PROTOCOL_GUID: crateBinaryGuid = cratefrom_string;
/// CPU cache flush types.
/// Flushes a range of the processor's data cache. If the processor does not contain a data cache or the data cache is
/// fully coherent, this function returns success.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.2
pub type FlushDataCache = extern "efiapi" fn ;
/// Enables interrupt processing by the processor.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.3
pub type EnableInterrupt = extern "efiapi" fn ;
/// Disables interrupt processing by the processor.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.4
pub type DisableInterrupt = extern "efiapi" fn ;
/// Retrieves the processor's current interrupt state. Returns `TRUE` if interrupts are enabled, `FALSE` if disabled.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.5
pub type GetInterruptState = extern "efiapi" fn ;
/// CPU initialization types.
/// Generates an INIT on the processor. If successful, the processor is reset and control does not return. Returns
/// unsupported if the processor cannot programmatically generate an INIT without external hardware.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.6
pub type Init = extern "efiapi" fn ;
/// Specifies which processor exception to hook.
///
/// # Documentation
/// UEFI Specification version 2.10, Section 18.2.5
pub type EfiExceptionType = isize;
/// Pointer to system context structure.
///
/// # Documentation
/// UEFI Specification version 2.10, Section 18.2.4
pub type EfiSystemContext = SystemContext;
/// Function type definition for interrupt handler.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.7
pub type InterruptHandler = extern "efiapi" fn;
/// Registers and enables a handler for a processor interrupt or exception. The handler is called once for each
/// interrupt or exception. Pass `NULL` to uninstall a handler. Used by the timer architecture and debuggers.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.7
pub type RegisterInterruptHandler =
extern "efiapi" fn ;
/// Returns a timer value from one of the processor's internal timers. Optionally returns the timer period in
/// femtoseconds for each increment. Returns unsupported if the processor contains no readable timers.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.8
pub type GetTimerValue = extern "efiapi" fn ;
/// Changes memory region attributes to support specified memory attributes. Used by DXE Service
/// `SetMemorySpaceAttributes()` to modify memory region properties visible to the processor.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.9
pub type SetMemoryAttributes = extern "efiapi" fn ;
/// Abstracts the processor services that are required to implement some of the DXE services.
///
/// # Documentation
/// UEFI Platform Initialization Specification, Release 1.8, Section II-12.3.1