MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / write

Method write

devices/src/legacy/uart_pl011.rs:424–438  ·  view source on GitHub ↗
(&mut self, _base: u64, offset: u64, data: &[u8])

Source from the content-addressed store, hash-verified

422 }
423
424 fn write(&mut self, _base: u64, offset: u64, data: &[u8]) -> Option<Arc<Barrier>> {
425 if data.len() <= 4 {
426 let v = read_le_u32(data);
427 if let Err(e) = self.handle_write(offset, v) {
428 warn!("Failed to write to PL011 device: {e}");
429 }
430 } else {
431 warn!(
432 "Invalid PL011 write: offset {offset}, data length {}",
433 data.len()
434 );
435 }
436
437 None
438 }
439}
440
441impl Snapshottable for Pl011 {

Callers 3

triggerMethod · 0.45
pl011_outputFunction · 0.45
pl011_inputFunction · 0.45

Calls 2

lenMethod · 0.45
handle_writeMethod · 0.45

Tested by 2

pl011_outputFunction · 0.36
pl011_inputFunction · 0.36