Skip to content

Commit 096c5c6

Browse files
committed
Pass image handle, instead of fetching from boot services.
1 parent 2075969 commit 096c5c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

uefi/src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn main_inner(image: Handle, mut st: SystemTable<Boot>) -> Status {
103103
)
104104
.unwrap();
105105

106-
let framebuffer = init_logger(&st, kernel.config);
106+
let framebuffer = init_logger(image, &st, kernel.config);
107107
unsafe {
108108
*SYSTEM_TABLE.get() = None;
109109
}
@@ -439,7 +439,7 @@ fn create_page_tables(
439439
}
440440
}
441441

442-
fn init_logger(st: &SystemTable<Boot>, config: BootloaderConfig) -> Option<RawFrameBufferInfo> {
442+
fn init_logger(image_handle: Handle, st: &SystemTable<Boot>, config: BootloaderConfig) -> Option<RawFrameBufferInfo> {
443443
let gop_handle = st
444444
.boot_services()
445445
.get_handle_for_protocol::<GraphicsOutput>()
@@ -449,7 +449,7 @@ fn init_logger(st: &SystemTable<Boot>, config: BootloaderConfig) -> Option<RawFr
449449
.open_protocol::<GraphicsOutput>(
450450
OpenProtocolParams {
451451
handle: gop_handle,
452-
agent: st.boot_services().image_handle(),
452+
agent: image_handle,
453453
controller: None,
454454
},
455455
OpenProtocolAttributes::Exclusive,

0 commit comments

Comments
 (0)