/DragonOS-0.1.8/kernel/src/filesystem/ |
D | mbr.rs | 10 pub starting_sector_cylinder: u16, // sector : 低6, cylinder : 高10; 起始扇区号 + 起始柱面号 13 pub ending_sector_cylingder: u16, // ending_sector : 低6, ending_cylinder : 高10; 结束扇区号 + 结束柱面号 19 pub fn starting_sector(&self) -> u16 { in starting_sector() argument 20 return self.starting_sector_cylinder & ((1 << 6) - 1) as u16; in starting_sector() 22 pub fn starting_cylinder(&self) -> u16 { in starting_cylinder() argument 23 return (self.starting_sector_cylinder >> 6) & ((1 << 10) - 1) as u16; in starting_cylinder() 25 pub fn ending_sector(&self) -> u16 { in ending_sector() argument 26 return self.ending_sector_cylingder & ((1 << 6) - 1) as u16; in ending_sector() 28 pub fn ending_cylinder(&self) -> u16 { in ending_cylinder() argument 29 return (self.ending_sector_cylingder >> 6) & ((1 << 10) - 1) as u16; in ending_cylinder() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/virtio/ |
D | transport_pci.rs | 24 const VIRTIO_VENDOR_ID: u16 = 0x1af4; 28 const PCI_DEVICE_ID_OFFSET: u16 = 0x1040; 30 const TRANSITIONAL_NETWORK: u16 = 0x1000; 31 const TRANSITIONAL_BLOCK: u16 = 0x1001; 32 const TRANSITIONAL_MEMORY_BALLOONING: u16 = 0x1002; 33 const TRANSITIONAL_CONSOLE: u16 = 0x1003; 34 const TRANSITIONAL_SCSI_HOST: u16 = 0x1004; 35 const TRANSITIONAL_ENTROPY_SOURCE: u16 = 0x1005; 36 const TRANSITIONAL_9P_TRANSPORT: u16 = 0x1009; 59 fn device_type(pci_device_id: u16) -> DeviceType { in device_type() [all …]
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | msi.rs | 5 pub fn ia64_pci_get_arch_msi_message_address(processor: u16) -> u32 { in ia64_pci_get_arch_msi_message_address() 14 vector: u16, in ia64_pci_get_arch_msi_message_data() argument 15 _processor: u16, in ia64_pci_get_arch_msi_message_data() argument
|
D | fpu.rs | 21 fcw: u16, 22 fsw: u16, 23 ftw: u16, 24 fop: u16,
|
/DragonOS-0.1.8/kernel/src/driver/pci/ |
D | pci.rs | 152 pub const PORT_PCI_CONFIG_ADDRESS: u16 = 0xcf8; 153 pub const PORT_PCI_CONFIG_DATA: u16 = 0xcfc; 155 pub type SegmentGroupNumber = u16; //理论上最多支持65535个Segment_Group 159 pub struct Status: u16 { 188 pub struct Command: u16 { 373 fn irq_vector_mut(&mut self) -> Option<&mut Vec<u16>>; in irq_vector_mut() argument 381 pub vendor_id: u16, // 供应商ID 0xffff是一个无效值,在读取访问不存在的设备的配置空间寄存器时返回 382 pub device_id: u16, // 设备ID,标志特定设备 383 pub command: u16, // 提供对设备生成和响应pci周期的能力的控制 向该寄存器写入0时,设备与pci总线断开除配置空间访问以外的所有连接 384 pub status: u16, // 用于记录pci总线相关时间的状态信息寄存器 [all …]
|
D | pci_irq.rs | 36 InvalidIrqIndex(u16), 37 InvalidIrqNum(u16), 38 IrqNumOccupied(u16), 52 irq_max_num: u16, 60 irq_max_num: u16, 75 irq_index: u16, //要install的中断号在PCI设备中的irq_vector的index 77 irq_parameter: u16, //中断额外参数,可传入中断处理函数 86 processor: u16, 126 let irq_max_num = ((data >> 16) & 0x07ff) as u16; in irq_init() 158 let message_control = (data >> 16) as u16; in irq_init() [all …]
|
/DragonOS-0.1.8/kernel/src/io/ |
D | disk_info.rs | 10 pub const BLK_GF_AHCI: u16 = 1 << 0; // 定义blk_gendisk中的标志位 19 pub partno: u16, // 在磁盘上的分区号 33 partno: u16, in new() argument
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | bpb.rs | 23 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 …]
|
D | entry.rs | 945 crt_time: u16, 947 crt_date: u16, 949 lst_acc_date: u16, 951 fst_clus_hi: u16, 953 wrt_time: u16, 955 wrt_date: u16, 957 fst_clus_lo: u16, 968 name1: [u16; 5], 977 name2: [u16; 6], 979 first_clus_low: u16, [all …]
|
D | fs.rs | 943 let mut packed_val: u16 = cursor.read_u16()?; in get_free_cluster() 964 let next_byte = cursor.read_u8()? as u16; in get_free_cluster() 1052 let raw_val: u16 = match fat_entry { in set_entry() 1056 FATEntry::Next(c) => c.cluster_num as u16, in set_entry() 1070 let old_val: u16 = cursor.read_u16()?; in set_entry() 1071 let new_val: u16 = if (cluster.cluster_num & 0x1) > 0 { in set_entry() 1085 let raw_val: u16 = match fat_entry { in set_entry() 1089 FATEntry::Next(c) => c.cluster_num as u16, in set_entry()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | vec_cursor.rs | 54 pub fn read_u16(&mut self) -> Result<u16, SystemError> { in read_u16() argument 59 res |= (self.data[self.pos] as u16) & 0xff; in read_u16() 61 res |= ((self.data[self.pos] as u16) & 0xff) << 8; in read_u16() 113 pub fn read_u16_into(&mut self, buf: &mut [u16]) -> Result<(), SystemError> { in read_u16_into() 114 if self.pos + buf.len() * size_of::<u16>() > self.data.len() * size_of::<u16>() { in read_u16_into() 169 pub fn write_u16(&mut self, value: u16) -> Result<u16, SystemError> { in write_u16() argument
|
D | elf.rs | 729 impl From<u16> for ElfMachine { 730 fn from(machine: u16) -> Self { in from() 759 impl From<u16> for ElfType { 760 fn from(elf_type: u16) -> Self { in from()
|
D | lz4.c | 358 U16 u16; member 363 static U16 LZ4_read16(const void *ptr) { return ((const unalign *)ptr)->u16; } in LZ4_read16() 367 static void LZ4_write16(void *memPtr, U16 value) { ((unalign *)memPtr)->u16 = value; } in LZ4_write16()
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | mod.rs | 46 pub const DT_UNKNOWN: u16 = 0; 48 pub const DT_FIFO: u16 = 1; 50 pub const DT_CHR: u16 = 2; 52 pub const DT_DIR: u16 = 4; 54 pub const DT_BLK: u16 = 6; 56 pub const DT_REG: u16 = 8; 58 pub const DT_LNK: u16 = 10; 60 pub const DT_SOCK: u16 = 12; 62 pub const DT_WHT: u16 = 14; 63 pub const DT_MAX: u16 = 16; [all …]
|
/DragonOS-0.1.8/kernel/src/driver/uart/ |
D | uart.rs | 35 #[repr(u16)] 53 pub fn from_u16(val: u16) -> Result<Self, &'static str> { in from_u16() 71 pub fn to_u16(self: &Self) -> u16 { in to_u16() argument 322 fn serial_received(offset: u16) -> bool { in serial_received() 330 fn is_transmit_empty(offset: u16) -> bool { in is_transmit_empty() 365 fn port() -> u16 { in port() 374 pub extern "C" fn c_uart_send(port: u16, c: u8) { in c_uart_send() argument 385 pub extern "C" fn c_uart_read(port: u16) -> u8 { in c_uart_read() 394 pub extern "C" fn c_uart_send_str(port: u16, s: *const u8) { in c_uart_send_str() argument 409 pub extern "C" fn c_uart_init(port: u16, baud_rate: u32) -> i32 { in c_uart_init() argument
|
/DragonOS-0.1.8/kernel/src/net/ |
D | syscall.rs | 35 let address_family = AddressFamily::try_from(address_family as u16)?; in socket() 146 PosixIpProtocol::try_from(level as u16).map_err(|_| SystemError::ENOPROTOOPT)?; in getsockopt() 423 pub sin_family: u16, 424 pub sin_port: u16, 432 pub sun_family: u16, 439 pub sll_family: u16, 440 pub sll_protocol: u16, 442 pub sll_hatype: u16, 451 nl_family: u16, 452 nl_pad: u16, [all …]
|
D | socket.rs | 37 tcp_port_table: SpinLock<HashMap<u16, Arc<GlobalSocketHandle>>>, 39 udp_port_table: SpinLock<HashMap<u16, Arc<GlobalSocketHandle>>>, 51 pub fn get_ephemeral_port(&self, socket_type: SocketType) -> Result<u16, SystemError> { in get_ephemeral_port() argument 54 static mut EPHEMERAL_PORT: u16 = 0; in get_ephemeral_port() 57 EPHEMERAL_PORT = (49152 + rand() % (65536 - 49152)) as u16; in get_ephemeral_port() 62 let mut port: u16; in get_ephemeral_port() 94 port: u16, in get_port() argument 113 pub fn unbind_port(&self, socket_type: SocketType, port: u16) -> Result<(), SystemError> { in unbind_port() 357 packet.set_total_len((20 + len) as u16); in write() 1093 impl TryFrom<u16> for AddressFamily { [all …]
|
D | net_core.rs | 137 pub fn poll_ifaces_try_lock(times: u16) -> Result<(), SystemError> { in poll_ifaces_try_lock()
|
/DragonOS-0.1.8/kernel/src/driver/acpi/ |
D | acpi.rs | 21 let number_of_segments = ((table_length - 44) / 16) as u16; in mcfg_find_segment()
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | ahcidisk.rs | 28 pub flags: u16, // 磁盘的状态flags 61 if count * 512 > buf.len() || check_length > u16::MAX as usize { in read_at() 95 volatile_write!(cmdheader.prdtl, check_length as u16); // PRDT entries count in read_at() 220 if count * 512 > buf.len() || check_length > u16::MAX as usize { in write_at() 256 volatile_write!(cmdheader.prdtl, check_length as u16); // PRDT entries count in write_at() 364 flags: u16, in new() argument 391 i as u16, in new()
|
D | hba.rs | 118 pub prdtl: u16, // Physical region descriptor table length in entries 380 pub tc: u16, // Transfer count
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | tty_device.rs | 260 textui_putchar(x as u16, WHITE, BLACK); in sync()
|