Home
last modified time | relevance | path

Searched refs:u16 (Results 1 – 25 of 69) sorted by relevance

123

/DragonOS/kernel/src/arch/
H A Dio.rs4 unsafe fn in8(port: u16) -> u8; in in8()
5 unsafe fn in16(port: u16) -> u16; in in16() argument
6 unsafe fn in32(port: u16) -> u32; in in32()
7 unsafe fn out8(port: u16, data: u8); in out8() argument
8 unsafe fn out16(port: u16, data: u16); in out16() argument
9 unsafe fn out32(port: u16, data: u32); in out32() argument
/DragonOS/kernel/src/arch/riscv64/
H A Dpio.rs7 unsafe fn in8(_port: u16) -> u8 { in in8()
12 unsafe fn in16(_port: u16) -> u16 { in in16() argument
17 unsafe fn in32(_port: u16) -> u32 { in in32()
22 unsafe fn out8(_port: u16, _data: u8) { in out8() argument
27 unsafe fn out16(_port: u16, _data: u16) { in out16() argument
32 unsafe fn out32(_port: u16, _data: u32) { in out32() argument
H A Dmsi.rs6 pub fn arch_msi_message_address(_processor: u16) -> u32 { in arch_msi_message_address()
14 pub fn arch_msi_message_data(_vector: u16, _processor: u16, _trigger: TriggerMode) -> u32 { in arch_msi_message_data() argument
/DragonOS/kernel/src/arch/x86_64/asm/
H A Dpio.rs7 unsafe fn in8(port: u16) -> u8 { in in8()
12 unsafe fn in16(port: u16) -> u16 { in in16() argument
17 unsafe fn in32(port: u16) -> u32 { in in32()
22 unsafe fn out8(port: u16, data: u8) { in out8() argument
27 unsafe fn out16(port: u16, data: u16) { in out16() argument
32 unsafe fn out32(port: u16, data: u32) { in out32() argument
/DragonOS/kernel/src/arch/x86_64/mm/
H A Dpkru.rs18 pub fn vma_pkey(vma: Arc<LockedVMA>) -> u16 { in vma_pkey() argument
20 ((guard.vm_flags().bits() & PKEY_MASK) >> VM_PKEY_SHIFT) as u16 in vma_pkey()
25 const PKRU_AD_BIT: u16 = 0x1;
26 const PKRU_WD_BIT: u16 = 0x2;
29 pub fn pkru_allows_pkey(pkey: u16, write: bool) -> bool { in pkru_allows_pkey() argument
42 pub fn pkru_allows_read(pkru: u32, pkey: u16) -> bool { in pkru_allows_read()
47 pub fn pkru_allows_write(pkru: u32, pkey: u16) -> bool { in pkru_allows_write()
/DragonOS/kernel/src/driver/tty/virtual_terminal/
H A Dconsole_map.rs2 pub const LAT1_MAP: &[u16] = &[
28 pub const GRAF_MAP: &[u16] = &[
54 pub const IBMPC_MAP: &[u16] = &[
80 pub const USER_MAP: &[u16] = &[
117 pub map: &'static [u16],
132 pub fn translate(&self, c: u32) -> u16 { in translate() argument
H A Dmod.rs43 pub const DEFAULT_RED: [u16; 16] = [
47 pub const DEFAULT_GREEN: [u16; 16] = [
51 pub const DEFAULT_BLUE: [u16; 16] = [
246 pub red: u16,
247 pub green: u16,
248 pub blue: u16,
249 pub transp: u16,
264 color.red = ((col - 16) / 36 * 85 / 2) as u16; in from_256()
265 color.green = ((col - 16) / 6 % 6 * 85 / 2) as u16; in from_256()
266 color.blue = ((col - 16) % 6 * 85 / 2) as u16; in from_256()
[all …]
H A Dvirtual_console.rs84 pub hi_font_mask: u16,
87 pub erase_char: u16,
89 pub complement_mask: u16,
90 pub s_complement_mask: u16,
92 pub cursor_blink_ms: u16,
140 pub screen_buf: Vec<u16>,
521 self.screen_buf[self.pos] = i as u16; in add_softcursor()
525 .con_putc(self, i as u16, self.state.y as u32, self.state.x as u32); in add_softcursor()
538 self.screen_buf[self.pos] = softcursor.unwrap().bits as u16; in hide_softcursor()
541 softcursor.unwrap().bits as u16, in hide_softcursor()
[all …]
/DragonOS/kernel/crates/rbpf/src/
H A Dstack.rs4 return_address: u16,
6 sp: u16,
57 pub fn save_return_address(&mut self, address: u16) { in save_return_address() argument
62 pub fn get_return_address(&self) -> u16 { in get_return_address() argument
67 pub fn save_sp(&mut self, sp: u16) { in save_sp() argument
72 pub fn get_sp(&self) -> u16 { in get_sp() argument
/DragonOS/kernel/crates/kprobe/src/arch/rv64/
H A Dmod.rs11 const INSN_LENGTH_MASK: u16 = 0x3;
12 const INSN_LENGTH_32: u16 = 0x3;
22 Inst16(u16),
57 core::ptr::write(address as *mut u16, inst_16); in drop()
91 let inst_16 = unsafe { core::ptr::read(address as *const u16) }; in replace_inst() constant
107 core::ptr::write(address as *mut u16, C_EBREAK_INST as u16); in replace_inst()
110 core::ptr::write(inst_tmp_ptr as *mut u16, inst_16); in replace_inst()
111 core::ptr::write((inst_tmp_ptr + 2) as *mut u16, C_EBREAK_INST as u16); in replace_inst()
/DragonOS/kernel/src/driver/virtio/
H A Dtransport_pci.rs33 const PCI_DEVICE_ID_OFFSET: u16 = 0x1040;
35 const TRANSITIONAL_NETWORK: u16 = 0x1000;
36 const TRANSITIONAL_BLOCK: u16 = 0x1001;
37 const TRANSITIONAL_MEMORY_BALLOONING: u16 = 0x1002;
38 const TRANSITIONAL_CONSOLE: u16 = 0x1003;
39 const TRANSITIONAL_SCSI_HOST: u16 = 0x1004;
40 const TRANSITIONAL_ENTROPY_SOURCE: u16 = 0x1005;
41 const TRANSITIONAL_9P_TRANSPORT: u16 = 0x1009;
64 const VIRTIO_RECV_VECTOR_INDEX: u16 = 0;
66 const QUEUE_RECEIVE: u16 = 0;
[all …]
H A Dtransport_mmio.rs103 fn max_queue_size(&mut self, queue: u16) -> u32 { in max_queue_size()
107 fn notify(&mut self, queue: u16) { in notify() argument
129 queue: u16, in queue_set() argument
139 fn queue_unset(&mut self, queue: u16) { in queue_unset() argument
143 fn queue_used(&mut self, queue: u16) -> bool { in queue_used()
/DragonOS/kernel/src/driver/pci/
H A Dpci.rs118 vendor_id: u16, in get_pci_device_structures_mut_by_vendor_id() argument
195 pub const PORT_PCI_CONFIG_ADDRESS: u16 = 0xcf8;
196 pub const PORT_PCI_CONFIG_DATA: u16 = 0xcfc;
198 pub type SegmentGroupNumber = u16; //理论上最多支持65535个Segment_Group
202 pub struct Status: u16 {
231 pub struct Command: u16 {
417 pub vendor_id: u16, // 供应商ID 0xffff是一个无效值,在读取访问不存在的设备的配置空间寄存器时返回
418 pub device_id: u16, // 设备ID,标志特定设备
419 pub command: RwLock<u16>, // 提供对设备生成和响应pci周期的能力的控制 向该寄存器写入0时,设备与pci总线断开除配置空间访问以外的所有连接
420 pub status: u16, // 用于记录pci总线相关时间的状态信息寄存器
[all …]
H A Dpci_irq.rs43 InvalidIrqIndex(u16),
60 irq_max_num: u16,
68 irq_max_num: u16,
85 irq_index: u16, //要install的中断号在PCI设备中的irq_vector的index
94 irq_index: u16, in init_from() argument
121 processor: u16,
164 let irq_max_num = ((data >> 16) & 0x7ff) as u16 + 1; in irq_init()
200 let message_control = (data >> 16) as u16; in irq_init()
203 let irq_max_num = (1 << (((message_control & 0x000e) >> 1) + 1)) as u16; in irq_init()
311 fn irq_alloc(_num: u16) -> Option<Vec<u16>> { in irq_alloc() argument
[all …]
/DragonOS/kernel/src/filesystem/
H A Dmbr.rs21 pub starting_sector_cylinder: u16, // sector : 低6, cylinder : 高10; 起始扇区号 + 起始柱面号
24 pub ending_sector_cylinder: u16, // ending_sector : 低6, ending_cylinder : 高10; 结束扇区号 + 结束柱面号
33 pub fn starting_cylinder(&self) -> u16 { in starting_cylinder() argument
34 return (self.starting_sector_cylinder >> 6) & ((1 << 10) - 1) as u16; in starting_cylinder()
40 pub fn ending_cylinder(&self) -> u16 { in ending_cylinder() argument
41 return (self.ending_sector_cylinder >> 6) & ((1 << 10) - 1) as u16; in ending_cylinder()
60 pub bs_trailsig: u16,
144 i as u16, in partitions()
185 index as u16, in next()
/DragonOS/kernel/src/arch/x86_64/
H A Dmsi.rs5 pub fn arch_msi_message_address(processor: u16) -> u32 { in arch_msi_message_address()
13 pub fn arch_msi_message_data(vector: u16, _processor: u16, trigger: TriggerMode) -> u32 { in arch_msi_message_data() argument
H A Dfpu.rs8 fcw: u16,
9 fsw: u16,
10 ftw: u16,
11 fop: u16,
/DragonOS/kernel/src/filesystem/fat/
H A Dbpb.rs23 pub bytes_per_sector: u16,
29 pub rsvd_sec_cnt: u16,
35 pub root_entries_cnt: u16,
38 pub total_sectors_16: u16,
44 pub fat_size_16: u16,
47 pub sector_per_track: u16,
50 pub num_heads: u16,
62 pub trail_sig: u16,
103 pub ext_flags: u16,
108 pub fs_version: u16,
[all …]
/DragonOS/kernel/src/driver/tty/
H A Dtermios.rs8 pub row: u16,
10 pub col: u16,
12 pub xpixel: u16,
14 pub ypixel: u16,
19 pub const fn new(row: u16, col: u16, xpixel: u16, ypixel: u16) -> Self { in new() argument
/DragonOS/kernel/src/libs/
H A Dvec_cursor.rs55 pub fn read_u16(&mut self) -> Result<u16, SystemError> { in read_u16() argument
60 res |= (self.data[self.pos] as u16) & 0xff; in read_u16()
62 res |= ((self.data[self.pos] as u16) & 0xff) << 8; in read_u16()
114 pub fn read_u16_into(&mut self, buf: &mut [u16]) -> Result<(), SystemError> { in read_u16_into()
115 if self.pos + size_of_val(buf) > self.data.len() * size_of::<u16>() { in read_u16_into()
163 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16() argument
/DragonOS/kernel/src/driver/base/block/
H A Ddisk_info.rs16 pub partno: u16, // 在磁盘上的分区号
27 partno: u16, in new() argument
38 pub fn new_raw(start_sector: SectorT, lba_start: u64, sectors_num: u64, partno: u16) -> Self { in new_raw()
/DragonOS/kernel/src/driver/video/console/
H A Ddummycon.rs70 WindowSize::new(Self::ROWS as u16, Self::COLUNMS as u16, 0, 0), in con_init()
95 _ch: u16, in con_putc() argument
105 _buf: &[u16], in con_putcs() argument
/DragonOS/kernel/src/driver/net/
H A Dmod.rs21 pub struct NetDeivceState: u16 {
74 fn net_device_type(&self) -> u16; in net_device_type() argument
91 pub net_device_type: u16,
/DragonOS/kernel/src/net/
H A Dsyscall.rs41 let address_family = AddressFamily::try_from(address_family as u16)?; in socket()
70 let address_family = AddressFamily::try_from(address_family as u16)?; in socketpair()
176 PosixIpProtocol::try_from(level as u16).map_err(|_| SystemError::ENOPROTOOPT)?; in getsockopt()
508 pub sin_family: u16,
509 pub sin_port: u16,
517 pub sun_family: u16,
524 pub sll_family: u16,
525 pub sll_protocol: u16,
527 pub sll_hatype: u16,
536 nl_family: u16,
[all …]
/DragonOS/kernel/src/filesystem/vfs/
H A Dmod.rs78 pub const DT_UNKNOWN: u16 = 0;
80 pub const DT_FIFO: u16 = 1;
82 pub const DT_CHR: u16 = 2;
84 pub const DT_DIR: u16 = 4;
86 pub const DT_BLK: u16 = 6;
88 pub const DT_REG: u16 = 8;
90 pub const DT_LNK: u16 = 10;
92 pub const DT_SOCK: u16 = 12;
95 pub const DT_WHT: u16 = 14;
97 pub const DT_MAX: u16 = 16;
[all …]

123