diff options
| author | salmonik <salmonik@tuta.io> | 2026-08-02 15:21:34 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-08-02 15:21:34 +0200 |
| commit | c7d92071e1dd11c45999457b16554b4abaa73b28 (patch) | |
| tree | aff7c7f19adcffe1dd91e1c2514af02c77fd524e /rsnix/src/gop.rs | |
| parent | v0.5.5: fix real-hardware boot crash — shadow back in heap as first allocation (diff) | |
| download | rs-dos-c7d92071e1dd11c45999457b16554b4abaa73b28.tar.gz rs-dos-c7d92071e1dd11c45999457b16554b4abaa73b28.zip | |
v0.5.5: crash reports go to a dedicated CRASHLOG USB stick
The fault handler now writes crash.log to the volume labeled CRASHLOG
(label-selected via fat::crash_vol), falling back to slot 0. On real
hardware the boot USB may be unwritable, so a second stick labeled
CRASHLOG survives the write; the shell auto-prints the previous crash
report from it at next boot (read_crash_log resolves /disk/<uid>/crash.log
through the FAT path, since Disk nodes hold no cached children).
- fat.rs: volume_label() + crash_vol() (no allocation)
- fs.rs: write_crash_log targets crash_vol(); read_crash_log prefers the
CRASHLOG disk node; drop now-unused first_disk()
- mkdisk.sh: --label option
- test-fault.sh: boots with a dedicated CRASHLOG stick (mkfs -F 32 -n
CRASHLOG), verifies crash.log lands there and NOT on the ESP
Diffstat (limited to 'rsnix/src/gop.rs')
| -rw-r--r-- | rsnix/src/gop.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rsnix/src/gop.rs b/rsnix/src/gop.rs index d37468f..7aeb224 100644 --- a/rsnix/src/gop.rs +++ b/rsnix/src/gop.rs | |||
| @@ -257,7 +257,8 @@ pub fn init(gop: &mut GraphicsOutputProtocol) { | |||
| 257 | let words = (fbinfo.pitch * fbinfo.height) / 4; | 257 | let words = (fbinfo.pitch * fbinfo.height) / 4; |
| 258 | if words > 0 { | 258 | if words > 0 { |
| 259 | let bytes = words * 4; | 259 | let bytes = words * 4; |
| 260 | #[allow(clippy::slow_vector_initialization)] // deliberate: try_reserve must not panic | 260 | #[allow(clippy::slow_vector_initialization)] |
| 261 | // deliberate: try_reserve must not panic | ||
| 261 | let mut v: alloc::vec::Vec<u32> = alloc::vec::Vec::new(); | 262 | let mut v: alloc::vec::Vec<u32> = alloc::vec::Vec::new(); |
| 262 | if v.try_reserve_exact(words).is_ok() { | 263 | if v.try_reserve_exact(words).is_ok() { |
| 263 | v.resize(words, 0); // can't fail after the reserve | 264 | v.resize(words, 0); // can't fail after the reserve |
| @@ -284,8 +285,7 @@ pub fn init(gop: &mut GraphicsOutputProtocol) { | |||
| 284 | rbase + rsize, | 285 | rbase + rsize, |
| 285 | ); | 286 | ); |
| 286 | if SHADOW.is_null() { | 287 | if SHADOW.is_null() { |
| 287 | let msg = | 288 | let msg = "gop: WARNING — shadow rejected (fb overlap); no-shadow fallback"; |
| 288 | "gop: WARNING — shadow rejected (fb overlap); no-shadow fallback"; | ||
| 289 | crate::serial_println!("{}", msg); | 289 | crate::serial_println!("{}", msg); |
| 290 | let lines: alloc::vec::Vec<&str> = msg | 290 | let lines: alloc::vec::Vec<&str> = msg |
| 291 | .as_bytes() | 291 | .as_bytes() |
