diff options
Diffstat (limited to 'rsnix/src/uefi.rs')
| -rw-r--r-- | rsnix/src/uefi.rs | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/rsnix/src/uefi.rs b/rsnix/src/uefi.rs index f947c90..c311ad9 100644 --- a/rsnix/src/uefi.rs +++ b/rsnix/src/uefi.rs | |||
| @@ -321,12 +321,28 @@ pub struct GopMode { | |||
| 321 | 321 | ||
| 322 | #[repr(C)] | 322 | #[repr(C)] |
| 323 | pub struct GraphicsOutputProtocol { | 323 | pub struct GraphicsOutputProtocol { |
| 324 | pub query_mode: *mut c_void, | 324 | pub query_mode: EfiGopQueryMode, |
| 325 | pub set_mode: *mut c_void, | 325 | pub set_mode: EfiGopSetMode, |
| 326 | pub get_current_mode: *mut c_void, | 326 | pub get_current_mode: EfiGopGetMode, |
| 327 | pub mode: *mut GopMode, | 327 | pub mode: *mut GopMode, |
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | pub type EfiGopQueryMode = unsafe extern "efiapi" fn( | ||
| 331 | *mut GraphicsOutputProtocol, | ||
| 332 | u32, // mode number | ||
| 333 | *mut usize, // out: size of info | ||
| 334 | *mut *mut GopModeInfo, // out: info pointer (firmware-owned) | ||
| 335 | ) -> Status; | ||
| 336 | |||
| 337 | pub type EfiGopSetMode = unsafe extern "efiapi" fn(*mut GraphicsOutputProtocol, u32) -> Status; | ||
| 338 | |||
| 339 | pub type EfiGopGetMode = unsafe extern "efiapi" fn( | ||
| 340 | *mut GraphicsOutputProtocol, | ||
| 341 | *mut u32, // out: current mode | ||
| 342 | *mut u32, // out: size of info | ||
| 343 | *mut *mut GopModeInfo, // out: info pointer | ||
| 344 | ) -> Status; | ||
| 345 | |||
| 330 | // --------------------------------------------------------------------------- | 346 | // --------------------------------------------------------------------------- |
| 331 | // System table | 347 | // System table |
| 332 | // --------------------------------------------------------------------------- | 348 | // --------------------------------------------------------------------------- |
