@@ -98,7 +98,7 @@ impl DebugSupport {
98
98
}
99
99
100
100
// Safety: As we've validated the `processor_index`, this should always be safe
101
- ( self . register_periodic_callback ) ( self , processor_index, callback) . to_result ( )
101
+ unsafe { ( self . register_periodic_callback ) ( self , processor_index, callback) } . to_result ( )
102
102
}
103
103
104
104
/// Registers a function to be called when a given processor exception occurs.
@@ -122,8 +122,10 @@ impl DebugSupport {
122
122
}
123
123
124
124
// Safety: As we've validated the `processor_index`, this should always be safe
125
- ( self . register_exception_callback ) ( self , processor_index, callback, exception_type)
126
- . to_result ( )
125
+ unsafe {
126
+ ( self . register_exception_callback ) ( self , processor_index, callback, exception_type)
127
+ }
128
+ . to_result ( )
127
129
}
128
130
129
131
/// Invalidates processor instruction cache for a memory range for a given `processor_index`.
@@ -144,7 +146,8 @@ impl DebugSupport {
144
146
145
147
// per the UEFI spec, this call should only return EFI_SUCCESS
146
148
// Safety: As we've validated the `processor_index`, this should always be safe
147
- ( self . invalidate_instruction_cache ) ( self , processor_index, start, length) . to_result ( )
149
+ unsafe { ( self . invalidate_instruction_cache ) ( self , processor_index, start, length) }
150
+ . to_result ( )
148
151
}
149
152
}
150
153
0 commit comments