rusty_mos::kernel::syscall_impl

Function sys_write_dev

Source
fn sys_write_dev(va: u32, pa: u32, len: u32) -> u32
Expand description

SYSNO: 16, write data at va into pa with the length of len.

The len can only be in 1, 2 or 4.

All the valid devices and their physical address ranges are as follows:

devicestart addresslength
console0x180003f80x20
IDE disk0x180001f00x8

See Also: sys_read_dev

ยงFailure

This syscall will return a negated-KError::Invalid if the va is out of the [[UTEMP, UTOP]) range, or the pa is invalid or the len is invalid.