Repository navigation
Comparing changes
Open a pull request
base repository: FrameworkComputer/framework-system
base: main
head repository: FrameworkComputer/framework-system
compare: windows-fixes
- 13 commits
- 12 files changed
- 2 contributors
Commits on Nov 23, 2026
-
ci: Run clippy and tests on Windows too
The lints and test jobs run on Linux only, so none of the cfg(windows) code was ever linted or tested. That is how the io_other_error lint in smart_battery's Windows read_password made it in. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for 5e2fa65 - Browse repository at this point
Copy the full SHA 5e2fa65View commit details -
chromium_ec: Pass a real lpBytesReturned pointer in read_memory
`Some(retb as *mut u32)` casts the u32 value 0 into a pointer, so the driver was handed a NULL lpBytesReturned. DeviceIoControl documents that as not allowed when lpOverlapped is NULL, even for operations whose returned byte count is meaningless. send_command a few lines below already does this correctly, so just match it. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for 2558b45 - Browse repository at this point
Copy the full SHA 2558b45View commit details -
chromium_ec: Drop redundant pointer cast in send_command
&mut u32 coerces to *mut u32 on its own, and read_memory now passes Some(&mut returned) without the cast, so match that. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for 26069ab - Browse repository at this point
Copy the full SHA 26069abView commit details -
chromium_ec: Return an error instead of panicking on failed IOCTLs
Both DeviceIoControl calls ended in unwrap(), so any driver-level failure aborted the whole tool instead of surfacing as an EcError. The Linux cros_ec backend already maps its ioctl errors to EcError::DeviceError. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for 46ef6d2 - Browse repository at this point
Copy the full SHA 46ef6d2View commit details -
commandline: Don't panic when the EC flash dump can't be written
--dump-ec-flash unwrapped both the flash read and the file write, so a path that can't be created aborted the tool: $ framework_tool --dump-ec-flash Z:\nope\dump.bin panicked at commandline/mod.rs: Os { code: 3, kind: NotFound, .. } Create the file before reading the flash, so a bad path is reported immediately rather than after dumping all 512 KB. dump_dgpu_eeprom right below already handled this gracefully. Signed-off-by: Daniel Schaefer <dhs@frame.work>Configuration menu - View commit details
-
Copy full SHA for 34635a5 - Browse repository at this point
Copy the full SHA 34635a5View commit details -
touchscreen: Stop reading past the report buffer on Windows
HidD_SetOutputReport was told the report is one byte longer than the 0x40 byte buffer it was given, so the driver read one byte past the end of the stack buffer. The firmware does need that extra byte, so make the buffer 0x41 long instead of lying about its size. While here, stop treating failures as success: - ReadFile's result and bytes_read were only logged, so a failed or short read returned the zero-initialized buffer as if the device had answered. Return None instead. - Bound the response slice, which panicked when a caller asked for more than fits into a report. - HidD_SetOutputReport/HidD_GetFeature return values were ignored. - Device paths that aren't UTF-8 no longer panic. - Close the device HANDLE on drop. Untested on hardware, this system has no touchscreen. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for ee65a2f - Browse repository at this point
Copy the full SHA ee65a2fView commit details -
chromium_ec: Only offer drivers that are built for the platform
All three CrosEcDriverType variants were always compiled, so on Windows clap advertised drivers whose modules don't even exist there: $ framework_tool.exe --driver [possible values: portio, cros-ec, windows] $ framework_tool.exe --driver portio --power Selected driver Portio not available. Gate the variants the same way the modules are gated. Portio is only gated on the OS and not the architecture, so that non-x86_64 targets still have at least one variant and the enum never ends up empty. Those fall through to the existing "No EC driver available" arm, hence the unreachable_patterns allows. The help text claimed portio is the default, which was only true for Linux and UEFI. Regenerate completions and the man page for the new wording and value list. Signed-off-by: Daniel Schaefer <dhs@frame.work>Configuration menu - View commit details
-
Copy full SHA for 708a58a - Browse repository at this point
Copy the full SHA 708a58aView commit details -
commandline: Only touch the touchscreen and stylus on Laptop 12
Laptop 12 is the only system with a touchscreen and stylus, but --stylus-battery, --touchscreen-enable and the touchscreen part of --versions ran everywhere. --stylus-battery was the worst of them: print_stylus_battery_level looped forever, only logging at debug level when no stylus answered. On a Laptop 16 it never returned, it had to be killed. Gate it on the platform and bound the retries, so it also terminates on a Laptop 12 with no stylus paired. print_himax_fw_ver was likewise called on every platform in --versions, while print_fw_ver next to it was already gated. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for ae320f3 - Browse repository at this point
Copy the full SHA ae320f3View commit details -
chromium_ec: Match the Windows driver's read_memory bounds
crosecbus rejects a memory map read when offset >= EC_MEMMAP_SIZE - bytes, so a read ending exactly at the end of the 255 byte map fails, even though the shared check in CrosEc::read_memory lets it through. Check the same bound up front so the user gets an error saying why instead of a generic IOCTL failure. The other drivers can still read the whole map. Signed-off-by: Daniel Schaefer <dhs@frame.work>
Configuration menu - View commit details
-
Copy full SHA for 11c5684 - Browse repository at this point
Copy the full SHA 11c5684View commit details -
commandline: Show the Himax touchscreen version on Laptop 13 again
The previous commit gated print_himax_fw_ver behind the Laptop 12 check, but the Himax touchscreen is the one Laptop 13 can have, so --versions stopped showing it there. On Laptop 12 print_fw_ver already prints the Himax version itself, so calling both printed it twice. Call print_fw_ver on Laptop 12 and print_himax_fw_ver everywhere else. Rename has_touchscreen to has_ili_touchscreen, because it is only about the ILI touchscreen and stylus. Signed-off-by: Daniel Schaefer <dhs@frame.work> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for eeeca28 - Browse repository at this point
Copy the full SHA eeeca28View commit details -
EXAMPLES: Update the --driver help text
It changed when the driver enum was gated by platform. The help output shown here is from Linux, where --driver now only accepts portio and cros-ec. Passing --driver windows is rejected by the argument parser instead of failing later when the driver is not found. Signed-off-by: Daniel Schaefer <dhs@frame.work> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for f7ffc71 - Browse repository at this point
Copy the full SHA f7ffc71View commit details -
commandline: Remove the empty dump file when the EC flash read fails
The dump file is now created before reading the flash, so a failed read left an empty file behind, which could be mistaken for a dump. Remove it again. It has to be closed first, otherwise Windows can't delete it. Signed-off-by: Daniel Schaefer <dhs@frame.work> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 771081e - Browse repository at this point
Copy the full SHA 771081eView commit details -
power: Don't report 0% charge before an update when LFCC is 0
charge_percentage falls back to 0 when the last full charge capacity is 0. print_battery_information already says the level is unknown in that case, but check_update_ready printed "Current charge is: 0%". Say it's unknown there too. The update is still refused, as before. Signed-off-by: Daniel Schaefer <dhs@frame.work> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for ed1fd83 - Browse repository at this point
Copy the full SHA ed1fd83View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...windows-fixes