Lines Matching refs:align

96     pub fn new(device: DeviceName, align: usize, erased_val: u8) -> Result<Self, String> {  in new()
97 let (flash, areadesc, unsupported_caps) = Self::make_device(device, align, erased_val); in new()
164 for &align in test_alignments() { in each_device()
166 match Self::new(dev, align, erased_val) { in each_device()
283 …pub fn make_device(device: DeviceName, align: usize, erased_val: u8) -> (SimMultiFlash, AreaDesc, … in make_device()
290 align as usize, erased_val); in make_device()
304 let dev = SimFlash::new(vec![4096; 128], align as usize, erased_val); in make_device()
320 let dev = SimFlash::new(vec![4096; 128], align as usize, erased_val); in make_device()
336 let dev = SimFlash::new(vec![4096; 128], align as usize, erased_val); in make_device()
350 let dev = SimFlash::new(vec![4096; 128], align as usize, erased_val); in make_device()
365 let dev0 = SimFlash::new(vec![4096; 128], align as usize, erased_val); in make_device()
366 let dev1 = SimFlash::new(vec![8192; 64], align as usize, erased_val); in make_device()
383 let dev = SimFlash::new(vec![4096; 256], align as usize, erased_val); in make_device()
819 fn trailer_sz(&self, align: usize) -> usize { in trailer_sz()
820 c::boot_trailer_sz(align as u32) as usize in trailer_sz()
823 fn status_sz(&self, align: usize) -> usize { in status_sz()
824 c::boot_status_sz(align as u32) as usize in status_sz()
959 let align = dev.align(); in mark_bad_status_with_rate() localVariable
962 let status_off = off + len - self.trailer_sz(align); in mark_bad_status_with_rate()
965 let _ = dev.add_bad_region(status_off, self.status_sz(align), rate); in mark_bad_status_with_rate()
1334 let align = dev.align(); in install_image() localVariable
1335 while buf.len() % align != 0 { in install_image()
1345 while encbuf.len() % align != 0 { in install_image()
1617 while buf.len() % dev.align() != 0 { in install_ptable()
1675 let align = dev.align(); in mark_upgrade() localVariable
1677 if offset % align != 0 || MAGIC.len() % align != 0 { in mark_upgrade()
1681 let mut buf = vec![dev.erased_val(); align]; in mark_upgrade()
1682 buf[(offset % align)..].copy_from_slice(MAGIC); in mark_upgrade()
1683 dev.write(offset - (offset % align), &buf).unwrap(); in mark_upgrade()
1703 let align = dev.align(); in mark_permanent_upgrade() localVariable
1704 dev.write(off, &ok[..align]).unwrap(); in mark_permanent_upgrade()