Description
Hello,
For your situational awareness: I'm new to UEFI and Rust so I apologize for any assumptions I'm making, this is all a learning experiment for me at the end of the day.
I don't want to attest whether this is a bug so right now its more of a question. But when getting exclusive protocol access via the demonstrated code of a the GraphicsOutput, follow on info prints no longer work even after dropping. On one hand, it makes sense if I get a exclusive protocol handle, it would disable other mechanisms from working like the logging macros. But even when it drops, it doesnt restore the logging functionality which I find to be unexpected. There could also be a very obvious mechanism to fix afterwards like with the mode? But this is all to new me that it was not obvious.
If this is expected ignore me, to get around this I am getting a none exclusive handle for now.
uefi Version 0.35.0 via Cargo
Current dependencies
log = "0.4.21"
uefi = { version = "0.35.0", features = [ "panic_handler", "logger" ] }
Expected
info!("Works");
let proto = boot::get_handle_for_protocol::<GraphicsOutput>().unwrap();
info!("Works 2");
let gop = boot::open_protocol_exclusive::<GraphicsOutput>(proto).unwrap();
info!("No Longer Seeable");
Not Expected
info!("Works");
let proto = boot::get_handle_for_protocol::<GraphicsOutput>().unwrap();
info!("Works 2");
{
let gop = boot::open_protocol_exclusive::<GraphicsOutput>(proto).unwrap();
}
info!("No Longer Seeable Still");
Non exclusive example works fine, which is expected
info!("Works");
let proto = boot::get_handle_for_protocol::<GraphicsOutput>().unwrap();
info!("Works 2");
let mut gop = unsafe {
boot::open_protocol::<GraphicsOutput>(
boot::OpenProtocolParams {
handle: proto,
agent: image_handle(),
controller: None,
},
boot::OpenProtocolAttributes::GetProtocol).unwrap()
};
info!("Works 3");
Thanks in advance for any thoughts/help!