[Denali] Assert sector size is 512.

This commit is contained in:
Drew Galbraith 2025-02-07 17:50:39 -08:00
parent e34540b77e
commit 9452e6c705
1 changed files with 7 additions and 2 deletions

View File

@ -155,8 +155,13 @@ impl AhciController {
mammoth::debug!("Sector size: {:#0x}", new_sector_size);
mammoth::debug!("LBA Count: {:#0x}", lba_count);
//self.sector_size = Some(new_sector_size as u64);
//self.sector_cnt = Some(lba_count);
// We hardcode assumptions about sector size in a few places, better to panic if we
// are wrong.
assert_eq!(
new_sector_size, 512,
"Sector size {} differs from 512.",
new_sector_size
);
} else {
mammoth::debug!("Skipping non-sata sig: {:#0x}", sig);
}