Home
last modified time | relevance | path

Searched refs:u32 (Results 1 – 25 of 33) sorted by relevance

12

/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dhba.rs22 pub const HBA_PORT_CMD_CR: u32 = 1 << 15;
23 pub const HBA_PORT_CMD_FR: u32 = 1 << 14;
24 pub const HBA_PORT_CMD_FRE: u32 = 1 << 4;
25 pub const HBA_PORT_CMD_ST: u32 = 1;
27 pub const HBA_PORT_IS_ERR: u32 = 1 << 30 | 1 << 29 | 1 << 28 | 1 << 27;
28 pub const HBA_SSTS_PRESENT: u32 = 0x3;
29 pub const HBA_SIG_ATA: u32 = 0x00000101;
30 pub const HBA_SIG_ATAPI: u32 = 0xEB140101;
31 pub const HBA_SIG_PM: u32 = 0x96690101;
32 pub const HBA_SIG_SEMB: u32 = 0xC33C0101;
[all …]
Dahcidisk.rs69 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in read_at()
71 let slot = port.find_cmdslot().unwrap_or(u32::MAX); in read_at()
73 if slot == u32::MAX { in read_at()
90 (size_of::<FisRegH2D>() / size_of::<u32>()) as u8 in read_at()
126 ((tmp_count << 9) - 1) as u32 in read_at()
154 const SPIN_LIMIT: u32 = 10000; in read_at()
202 volatile_write!(port.is, u32::MAX); // Clear pending interrupt bits in write_at()
204 let slot = port.find_cmdslot().unwrap_or(u32::MAX); in write_at()
206 if slot == u32::MAX { in write_at()
225 (size_of::<FisRegH2D>() / size_of::<u32>()) as u8 in write_at()
[all …]
Dmod.rs39 pub const HBA_PxIS_TFES: u32 = 1 << 30;
54 let mut ahci_dev_counts: u32 = 0; in ahci_rust_init()
64 (&mut ahci_dev_counts) as *mut u32, in ahci_rust_init()
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dbpb.rs53 pub hidden_sectors: u32,
56 pub total_sectors_32: u32,
83 pub volume_id: u32,
85 pub filesystem_type: u32,
93 pub fat_size_32: u32,
112 pub root_cluster: u32,
137 pub volume_id: u32,
237 let root_sectors = ((bpb.root_entries_cnt as u32 * 32) + (bpb.bytes_per_sector as u32 - 1)) in new()
238 / (bpb.bytes_per_sector as u32); in new()
242 bpb.fat_size_16 as u32 in new()
[all …]
Dutils.rs4 pub const RESERVED_CLUSTERS: u32 = 2;
Dfs.rs213 lead_sig: u32,
215 struc_sig: u32,
217 free_count: u32,
219 next_free: u32,
221 trail_sig: u32,
574 .update_next_free((free_cluster.cluster_num + 1) as u32); in allocate_cluster()
1135 let mut raw_val: u32 = match fat_entry { in set_entry()
1139 FATEntry::Next(c) => c.cluster_num as u32, in set_entry()
1186 const LEAD_SIG: u32 = 0x41615252;
1187 const STRUC_SIG: u32 = 0x61417272;
[all …]
/DragonOS-0.1.5/kernel/src/smp/
Dcore.rs3 pub fn smp_get_processor_id() -> u32 { in smp_get_processor_id()
4 return crate::arch::cpu::current_cpu_id() as u32; in smp_get_processor_id()
8 pub fn smp_send_reschedule(_cpu: u32) { in smp_send_reschedule() argument
/DragonOS-0.1.5/kernel/src/exception/
Dsoftirq.rs69 pub extern "C" fn raise_softirq(sirq_num: u32) { in raise_softirq() argument
82 irq_num: u32, in register_softirq() argument
94 pub extern "C" fn unregister_softirq(irq_num: u32) { in unregister_softirq() argument
102 pub extern "C" fn set_softirq_pending(irq_num: u32) { in set_softirq_pending() argument
112 pub extern "C" fn clear_softirq_pending(irq_num: u32) { in clear_softirq_pending() argument
150 pub fn set_softirq_pending(&mut self, softirq_num: u32) { in set_softirq_pending() argument
155 pub fn set_softirq_running(&mut self, softirq_num: u32) { in set_softirq_running() argument
160 pub fn clear_softirq_running(&mut self, softirq_num: u32) { in clear_softirq_running() argument
166 pub fn clear_softirq_pending(&mut self, softirq_num: u32) { in clear_softirq_pending() argument
173 pub fn is_running(&mut self, softirq_num: u32) -> bool { in is_running()
[all …]
/DragonOS-0.1.5/kernel/src/libs/
Dprintk.rs9 pub const COLOR_WHITE: u32 = 0x00ffffff;
11 pub const COLOR_BLACK: u32 = 0x00000000;
13 pub const COLOR_RED: u32 = 0x00ff0000;
15 pub const COLOR_ORANGE: u32 = 0x00ff8000;
17 pub const COLOR_YELLOW: u32 = 0x00ffff00;
19 pub const COLOR_GREEN: u32 = 0x0000ff00;
21 pub const COLOR_BLUE: u32 = 0x000000ff;
23 pub const COLOR_INDIGO: u32 = 0x0000ffff;
25 pub const COLOR_PURPLE: u32 = 0x008000ff;
105 pub fn __write_string_color(&self, fr_color: u32, bk_color: u32, s: &str) { in __write_string_color() argument
Drwlock.rs15 const READER: u32 = 1 << 2;
18 const UPGRADED: u32 = 1 << 1;
21 const WRITER: u32 = 1;
23 const READER_BIT: u32 = 2;
94 fn current_reader(&self) -> Result<u32, i32> { in current_reader() argument
95 const MAX_READERS: u32 = core::u32::MAX >> READER_BIT >> 1; //右移3位 in current_reader()
151 pub fn reader_count(&self) -> u32 { in reader_count() argument
159 pub fn writer_count(&self) -> u32 { in writer_count() argument
Dvec_cursor.rs71 pub fn read_u32(&mut self) -> Result<u32, i32> { in read_u32() argument
77 res |= ((self.data[self.pos] as u32) & 0xff) << (8 * i); in read_u32()
186 pub fn write_u32(&mut self, value: u32) -> Result<u32, i32> { in write_u32() argument
/DragonOS-0.1.5/kernel/src/driver/virtio/
Dtransport_pci.rs83 notify_off_multiplier: u32,
87 config_space: Option<NonNull<[u32]>>,
244 volwrite!(self.common_cfg, driver_feature, driver_features as u32); in write_driver_features()
249 (driver_features >> 32) as u32 in write_driver_features()
254 fn max_queue_size(&self) -> u32 { in max_queue_size() argument
282 fn set_guest_page_size(&mut self, _guest_page_size: u32) { in set_guest_page_size() argument
289 size: u32, in queue_set() argument
339 if size_of::<T>() > config_space.len() * size_of::<u32>() { in config_space()
349 let config_space_ptr = NonNull::new(config_space.as_ptr() as *mut u32).unwrap(); in config_space()
362 device_feature_select: Volatile<u32>,
[all …]
/DragonOS-0.1.5/kernel/src/mm/
Dmmio_buddy.rs15 const MMIO_BUDDY_MAX_EXP: u32 = PAGE_1G_SHIFT;
17 const MMIO_BUDDY_MIN_EXP: u32 = PAGE_4K_SHIFT;
19 const MMIO_BUDDY_REGION_COUNT: u32 = MMIO_BUDDY_MAX_EXP - MMIO_BUDDY_MIN_EXP + 1;
77 fn give_back_block(&self, vaddr: u64, exp: u32) -> Result<i32, i32> { in give_back_block()
100 exp: u32, in split_block() argument
123 exp: u32, in query_addr_region() argument
262 exp: u32, in mmio_buddy_query_addr_region() argument
290 fn calculate_block_vaddr(&self, vaddr: u64, exp: u32) -> u64 { in calculate_block_vaddr()
309 exp: u32, in pop_buddy_block() argument
366 exp: u32, in merge_all_exp() argument
[all …]
/DragonOS-0.1.5/kernel/src/sched/
Dcore.rs22 pub fn cpu_executing(cpu_id: u32) -> &'static mut process_control_block { in cpu_executing()
33 pub fn get_cpu_loads(cpu_id: u32) -> u32 { in get_cpu_loads() argument
41 return (len_rt + len_cfs) as u32; in get_cpu_loads()
212 pcb.migrate_to = target as u32; in sched_migrate_process()
Drt.rs132 pub fn pick_next_task_rt(&mut self, cpu_id: u32) -> Option<&'static mut process_control_block> { in pick_next_task_rt()
146 pub fn get_rt_queue_len(&mut self, cpu_id: u32) -> usize { in get_rt_queue_len()
154 pub fn get_load_list_len(&mut self, cpu_id: u32) -> usize { in get_load_list_len()
/DragonOS-0.1.5/kernel/src/filesystem/
Dmbr.rs14 pub starting_lba: u32, // 起始逻辑扇区
15 pub total_sectors: u32, // 分区占用的磁盘扇区数
/DragonOS-0.1.5/kernel/src/arch/x86_64/
Dcpu.rs6 let cpuid_res: u32; in current_cpu_id()
/DragonOS-0.1.5/kernel/src/driver/uart/
Duart.rs7 const UART_MAX_BITS_RATE: u32 = 115200;
77 baud_rate: u32,
95 pub fn uart_init(uart_port: &UartPort, baud_rate: u32) -> Result<i32, &'static str> { in uart_init()
220 pub extern "C" fn c_uart_init(port: u16, baud_rate: u32) -> i32 { in c_uart_init()
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dmod.rs21 pub const MAX_PATHLEN: u32 = 1024;
186 mode: u32, in create() argument
205 _mode: u32, in create_with_data() argument
307 fn ioctl(&self, _cmd: u32, _data: usize) -> Result<usize, i32> { in ioctl() argument
467 pub mode: u32,
Dsyscall.rs36 let open_flags: FileMode = FileMode::from_bits_truncate(flags as u32); in sys_open()
128 let whence = regs.r10 as u32; in sys_lseek()
235 if fd < 0 || fd as u32 > PROC_MAX_FD_NUM { in sys_getdents()
284 return match do_mkdir(&path.trim(), FileMode::from_bits_truncate(mode as u32)) { in sys_mkdir()
338 match do_unlink_at(&path, FileMode::from_bits_truncate(flag as u32)) { in sys_unlink_at()
Dmount.rs141 mode: u32, in create_with_data() argument
210 mode: u32, in create() argument
316 fn ioctl(&self, cmd: u32, data: usize) -> Result<usize, i32> { in ioctl() argument
/DragonOS-0.1.5/docs/kernel/memory_management/
Dmmio.md121 const MMIO_BUDDY_MAX_EXP: u32 = PAGE_1G_SHIFT;
123 const MMIO_BUDDY_MIN_EXP: u32 = PAGE_4K_SHIFT;
125 const MMIO_BUDDY_REGION_COUNT: u32 = MMIO_BUDDY_MAX_EXP - MMIO_BUDDY_MIN_EXP + 1;
/DragonOS-0.1.5/kernel/src/filesystem/devfs/
Dmod.rs54 DevFSInode::new(FileType::Dir, 0o755 as u32, 0), in new()
197 pub fn new(dev_type_: FileType, mode_: u32, data_: usize) -> Self { in new() argument
204 mode_: u32, in new_with_parent() argument
240 match self.do_create_with_data(guard, name, FileType::Dir, 0o755 as u32, 0) { in add_dir()
275 _mode: u32, in do_create_with_data() argument
337 mode: u32, in create_with_data() argument
403 fn ioctl(&self, _cmd: u32, _data: usize) -> Result<usize, i32> { in ioctl() argument
/DragonOS-0.1.5/kernel/src/driver/pci/
Dpci.rs195 size: u32,
202 address: u32,
204 size: u32,
215 pub fn memory_address_size(&self) -> Option<(u64, u32)> { in memory_address_size() argument
/DragonOS-0.1.5/kernel/src/ipc/
Dsignal_types.rs169 pub reserved: u32,
579 *set |= 1 << ((sig as u32) - 1); in sigset_add()
621 return if 1 & (set >> ((_sig as u32) - 1)) != 0 { in sig_is_member()
665 pub flags: u32,
666 pub size: u32,

12