/DragonOS-0.1.7/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.7/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.7/kernel/src/driver/pci/ |
D | pci.rs | 149 pub const PORT_PCI_CONFIG_ADDRESS: u16 = 0xcf8; 150 pub const PORT_PCI_CONFIG_DATA: u16 = 0xcfc; 152 pub type SegmentGroupNumber = u16; //理论上最多支持65535个Segment_Group 156 pub struct Status: u16 { 185 pub struct Command: u16 { 343 pub msix_table_size: u16, // msix表的表项数量 346 pub vendor_id: u16, // 供应商ID 0xffff是一个无效值,在读取访问不存在的设备的配置空间寄存器时返回 347 pub device_id: u16, // 设备ID,标志特定设备 348 pub command: u16, // 提供对设备生成和响应pci周期的能力的控制 向该寄存器写入0时,设备与pci总线断开除配置空间访问以外的所有连接 349 pub status: u16, // 用于记录pci总线相关时间的状态信息寄存器 [all …]
|
/DragonOS-0.1.7/kernel/src/driver/uart/ |
D | uart.rs | 10 #[repr(u16)] 28 pub fn from_u16(val: u16) -> Result<Self, &'static str> { in from_u16() 46 pub fn to_u16(self: &Self) -> u16 { in to_u16() argument 138 fn serial_received(offset: u16) -> bool { in serial_received() 146 fn is_transmit_empty(offset: u16) -> bool { in is_transmit_empty() 185 pub extern "C" fn c_uart_send(port: u16, c: u8) { in c_uart_send() argument 196 pub extern "C" fn c_uart_read(port: u16) -> u8 { in c_uart_read() 205 pub extern "C" fn c_uart_send_str(port: u16, str: *const u8) { in c_uart_send_str() argument 220 pub extern "C" fn c_uart_init(port: u16, baud_rate: u32) -> i32 { in c_uart_init() argument
|
/DragonOS-0.1.7/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.7/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 | 936 crt_time: u16, 938 crt_date: u16, 940 lst_acc_date: u16, 942 fst_clus_hi: u16, 944 wrt_time: u16, 946 wrt_date: u16, 948 fst_clus_lo: u16, 959 name1: [u16; 5], 968 name2: [u16; 6], 970 first_clus_low: u16, [all …]
|
D | fs.rs | 939 let mut packed_val: u16 = cursor.read_u16()?; in get_free_cluster() 960 let next_byte = cursor.read_u8()? as u16; in get_free_cluster() 1048 let raw_val: u16 = match fat_entry { in set_entry() 1052 FATEntry::Next(c) => c.cluster_num as u16, in set_entry() 1066 let old_val: u16 = cursor.read_u16()?; in set_entry() 1067 let new_val: u16 = if (cluster.cluster_num & 0x1) > 0 { in set_entry() 1081 let raw_val: u16 = match fat_entry { in set_entry() 1085 FATEntry::Next(c) => c.cluster_num as u16, in set_entry()
|
/DragonOS-0.1.7/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 | 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.7/kernel/src/filesystem/vfs/ |
D | mod.rs | 45 pub const DT_UNKNOWN: u16 = 0; 47 pub const DT_FIFO: u16 = 1; 49 pub const DT_CHR: u16 = 2; 51 pub const DT_DIR: u16 = 4; 53 pub const DT_BLK: u16 = 6; 55 pub const DT_REG: u16 = 8; 57 pub const DT_LNK: u16 = 10; 59 pub const DT_SOCK: u16 = 12; 61 pub const DT_WHT: u16 = 14; 62 pub const DT_MAX: u16 = 16; [all …]
|
/DragonOS-0.1.7/kernel/src/arch/x86_64/ |
D | fpu.rs | 20 fcw: u16, 21 fsw: u16, 22 ftw: u16, 23 fop: u16,
|
/DragonOS-0.1.7/kernel/src/net/ |
D | syscall.rs | 44 let address_family = AddressFamily::try_from(address_family as u16)?; in do_socket() 199 PosixIpProtocol::try_from(level as u16).map_err(|_| SystemError::ENOPROTOOPT)?; in do_getsockopt() 619 pub sin_family: u16, 620 pub sin_port: u16, 628 pub sun_family: u16, 635 pub sll_family: u16, 636 pub sll_protocol: u16, 638 pub sll_hatype: u16, 647 nl_family: u16, 648 nl_pad: u16, [all …]
|
D | socket.rs | 235 packet.set_total_len((20 + len) as u16); in write() 839 pub fn get_ephemeral_port() -> u16 { in get_ephemeral_port() 842 static mut EPHEMERAL_PORT: u16 = 0; in get_ephemeral_port() 845 EPHEMERAL_PORT = (49152 + rand() % (65536 - 49152)) as u16; in get_ephemeral_port() 959 impl TryFrom<u16> for AddressFamily { 961 fn try_from(x: u16) -> Result<Self, Self::Error> { in try_from()
|
D | net_core.rs | 134 pub fn poll_ifaces_try_lock(times: u16) -> Result<(), SystemError> { in poll_ifaces_try_lock()
|
/DragonOS-0.1.7/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.7/kernel/src/driver/disk/ahci/ |
D | ahcidisk.rs | 27 pub flags: u16, // 磁盘的状态flags 60 if count * 512 > buf.len() || check_length > u16::MAX as usize { in read_at() 94 volatile_write!(cmdheader.prdtl, check_length as u16); // PRDT entries count in read_at() 193 if count * 512 > buf.len() || check_length > u16::MAX as usize { in write_at() 229 volatile_write!(cmdheader.prdtl, check_length as u16); // PRDT entries count in write_at() 316 flags: u16, in new() argument 343 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.7/kernel/src/driver/tty/ |
D | tty_device.rs | 260 textui_putchar(x as u16, WHITE, BLACK); in sync()
|