/DragonOS/kernel/crates/rbpf/src/ |
H A D | interpreter.rs | 102 let mut reg: [u64; 11] = [ in execute_program() localVariable 117 reg[1] = mbuff.as_ptr() as u64; in execute_program() 119 reg[1] = mem.as_ptr() as u64; in execute_program() 144 reg[0] = unsafe { in execute_program() 151 reg[0] = unsafe { in execute_program() 158 reg[0] = unsafe { in execute_program() 166 reg[0] = unsafe { in execute_program() 173 reg[0] = unsafe { in execute_program() 175 (mem.as_ptr() as u64 + reg[_src] + (insn.imm as u32) as u64) as *const u8; in execute_program() 181 reg[0] = unsafe { in execute_program() [all …]
|
/DragonOS/kernel/src/arch/riscv64/pci/ |
H A D | pci_host_ecam.rs | 15 let reg = node in pci_host_ecam_driver_init() localVariable 16 .reg() in pci_host_ecam_driver_init() 20 let paddr = reg.starting_address as usize; in pci_host_ecam_driver_init() 21 let size = reg.size.unwrap_or(0); in pci_host_ecam_driver_init()
|
/DragonOS/kernel/src/arch/x86_64/driver/apic/ |
H A D | ioapic.rs | 49 reg: *mut u32, field 108 let reg = mmio_guard.vaddr(); in new() localVariable 111 reg: reg.data() as *mut u32, in new() 112 data: (reg + 0x10).data() as *mut u32, in new() 113 virt_eoi: (reg + 0x40).data() as *mut u32, in new() 143 unsafe fn read(&mut self, reg: u8) -> u32 { in read() 144 assert!(!(0x3..REG_TABLE).contains(®)); in read() 145 self.reg.write_volatile(reg as u32); in read() 155 unsafe fn write(&mut self, reg: u8, data: u32) { in write() 157 assert!(!(0x1..REG_TABLE).contains(®)); in write() [all …]
|
H A D | x2apic.rs | 99 fn read_lvt(&self, reg: LVTRegister) -> LVT { in read_lvt() 100 unsafe { LVT::new(reg, (rdmsr(reg.into()) & 0xffff_ffff) as u32).unwrap() } in read_lvt()
|
H A D | xapic.rs | 131 pub unsafe fn read(&self, reg: XApicOffset) -> u32 { in read() 132 read_volatile((self.apic_vaddr.data() + reg as usize) as *const u32) in read() 137 pub unsafe fn write(&self, reg: XApicOffset, value: u32) { in write() 139 (self.apic_vaddr.data() + (reg as u32) as usize) as *mut u32, in write() 302 fn read_lvt(&self, reg: LVTRegister) -> LVT { in read_lvt() 305 reg, in read_lvt()
|
H A D | mod.rs | 77 fn read_lvt(&self, reg: LVTRegister) -> LVT; in read_lvt() 456 pub(self) unsafe fn write_xapic_register(&self, reg: XApicOffset, value: u32) { in write_xapic_register() 458 xapic.write(reg, value); in write_xapic_register() 588 fn read_lvt(&self, reg: LVTRegister) -> LVT { in read_lvt() 590 return X2Apic.read_lvt(reg); in read_lvt() 595 .map(|xapic| xapic.read_lvt(reg)) in read_lvt()
|
/DragonOS/kernel/src/arch/x86_64/asm/ |
H A D | irqflags.rs | 8 asm!("pushfq; pop {}; cli", out(reg) x, options(nomem, preserves_flags)); in local_irq_save() 17 asm!("push {}; popfq", in(reg) x, options(nomem, preserves_flags)); in local_irq_restore()
|
/DragonOS/kernel/src/driver/open_firmware/ |
H A D | fdt.rs | 178 let reg = node.property("reg"); in early_init_scan_memory() localVariable 179 if reg.is_none() { in early_init_scan_memory() 182 let reg = reg.unwrap(); in early_init_scan_memory() localVariable 187 let total_elements_in_reg = reg.value.len() / ((addr_cells + size_cells) * 4); in early_init_scan_memory() 192 let (base, base_index) = read_cell(reg.value, base_index, addr_cells); in early_init_scan_memory() 193 let (size, _) = read_cell(reg.value, base_index, size_cells); in early_init_scan_memory() 407 let reg = node.property("reg").ok_or(SystemError::ENOENT)?; in reserved_mem_reserve_reg() localVariable 409 let mut reg_size = reg.value.len(); in reserved_mem_reserve_reg() 426 let (base, bi) = read_cell(reg.value, base_index, addr_cells); in reserved_mem_reserve_reg() 428 let (size, bi) = read_cell(reg.value, base_index, size_cells); in reserved_mem_reserve_reg()
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | transport_mmio.rs | 32 let reg = node in new() localVariable 33 .reg() in new() 37 let paddr = reg.starting_address as usize; in new() 38 let size = reg.size.unwrap_or(0); in new()
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | vmx_asm_wrapper.rs | 77 in(reg) host_rsp, in vmx_vmlaunch() 78 in(reg) host_rip, in vmx_vmlaunch()
|
/DragonOS/kernel/src/driver/irqchip/ |
H A D | riscv_sifive_plic.rs | 174 let reg = (inner.enable_base + ((hwirq.data() / 32) * 4) as usize).data() as *mut u32; in toggle() localVariable 179 core::ptr::write_volatile(reg, core::ptr::read_volatile(reg) | hwirq_mask); in toggle() 183 core::ptr::write_volatile(reg, core::ptr::read_volatile(reg) & !hwirq_mask); in toggle() 439 let reg = fdt_node in do_riscv_sifive_plic_init() localVariable 440 .reg() in do_riscv_sifive_plic_init() 444 let paddr = PhysAddr::new(reg.starting_address as usize); in do_riscv_sifive_plic_init() 445 let size = reg.size.ok_or(SystemError::EINVAL)?; in do_riscv_sifive_plic_init()
|
/DragonOS/kernel/src/arch/riscv64/process/ |
H A D | mod.rs | 317 unsafe { asm!("mv {}, sp", lateout(reg) sp, options(nostack)) }; in arch_current_pcb() 446 asm!("frcsr {0}", lateout(reg) self.fcsr); in do_save() 492 in (reg) &self.f as *const _, in do_save() 551 in (reg) &self.f as *const _, in do_restore() 554 asm!("fscsr {0}", in(reg) fcsr); in do_restore()
|
/DragonOS/kernel/src/process/ |
H A D | idle.rs | 96 core::arch::asm!("mv {}, sp", out(reg) stack_ptr); in stack_ptr()
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | mod.rs | 62 asm!("pushfq; pop {}", out(reg) rflags, options(nomem, preserves_flags)); in is_irq_enabled()
|
/DragonOS/kernel/src/arch/x86_64/process/ |
H A D | mod.rs | 569 trapframe_vaddr = in(reg) trapframe_vaddr, in ready_to_switch_to_user() 570 new_rip = in(reg) new_rip in ready_to_switch_to_user()
|
/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | mod.rs | 181 asm!("invlpg [{0}]", in(reg) address.data(), options(nostack, preserves_flags)); in invalidate_page() 213 asm!("mov cr3, {}", in(reg) table.data(), options(nostack, preserves_flags)); in set_table()
|