MCPcopy Create free account
hub / github.com/FrameworkComputer/framework-system / dump_ec_flash

Function dump_ec_flash

framework_lib/src/commandline/mod.rs:1114–1129  ·  view source on GitHub ↗
(ec: &CrosEc, dump_path: &str)

Source from the content-addressed store, hash-verified

1112}
1113
1114fn dump_ec_flash(ec: &CrosEc, dump_path: &str) {
1115 let flash_bin = ec.get_entire_ec_flash().unwrap();
1116
1117 #[cfg(not(feature = "uefi"))]
1118 {
1119 let mut file = fs::File::create(dump_path).unwrap();
1120 file.write_all(&flash_bin).unwrap();
1121 }
1122 #[cfg(feature = "uefi")]
1123 {
1124 let ret = crate::fw_uefi::fs::shell_write_file(dump_path, &flash_bin);
1125 if ret.is_err() {
1126 println!("Failed to dump EC FW image.");
1127 }
1128 }
1129}
1130
1131fn dump_dgpu_eeprom(ec: &CrosEc, dump_path: &str) {
1132 // Read raw bytes from EEPROM

Callers 1

run_with_argsFunction · 0.85

Calls 2

shell_write_fileFunction · 0.85
get_entire_ec_flashMethod · 0.80

Tested by

no test coverage detected