Skip to content

Commit 249b8f0

Browse files
committed
windows: Print a hint if no driver is available
Avoid confusion on platforms where the driver is not enabled in bios and driver bundle yet. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 6fa84c7 commit 249b8f0

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

framework_lib/src/chromium_ec/windows.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ use windows::{
1414
use crate::chromium_ec::protocol::HEADER_LEN;
1515
use crate::chromium_ec::EC_MEMMAP_SIZE;
1616
use crate::chromium_ec::{EcError, EcResponseStatus, EcResult};
17+
use crate::smbios;
18+
use crate::util::Platform;
1719

1820
// Create a wrapper around HANDLE to mark it as Send.
1921
// I'm not sure, but I think it's safe to do that for this type of HANDL.
@@ -46,6 +48,20 @@ fn init() -> bool {
4648
let handle = match res {
4749
Ok(h) => h,
4850
Err(err) => {
51+
let platform = smbios::get_platform();
52+
match platform {
53+
Some(platform @ Platform::IntelGen11)
54+
| Some(platform @ Platform::IntelGen12)
55+
| Some(platform @ Platform::IntelGen13)
56+
| Some(platform @ Platform::Framework13Amd7080)
57+
| Some(platform @ Platform::Framework16Amd7080) => {
58+
println!("The windows driver is not enabled on {:?}.", platform);
59+
println!("Please stay tuned for future BIOS and driver updates.");
60+
println!();
61+
}
62+
_ => (),
63+
}
64+
4965
error!("Failed to find Windows driver. {:?}", err);
5066
return false;
5167
}

0 commit comments

Comments
 (0)