Home
last modified time | relevance | path

Searched refs:reg (Results 1 – 16 of 16) sorted by relevance

/DragonOS/kernel/crates/rbpf/src/
H A Dinterpreter.rs102 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 Dpci_host_ecam.rs15 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 Dioapic.rs49 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(&reg)); 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(&reg)); in write()
[all …]
H A Dx2apic.rs99 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 Dxapic.rs131 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 Dmod.rs77 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 Dirqflags.rs8 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 Dfdt.rs178 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 Dtransport_mmio.rs32 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 Dvmx_asm_wrapper.rs77 in(reg) host_rsp, in vmx_vmlaunch()
78 in(reg) host_rip, in vmx_vmlaunch()
/DragonOS/kernel/src/driver/irqchip/
H A Driscv_sifive_plic.rs174 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 Dmod.rs317 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 Didle.rs96 core::arch::asm!("mv {}, sp", out(reg) stack_ptr); in stack_ptr()
/DragonOS/kernel/src/arch/x86_64/interrupt/
H A Dmod.rs62 asm!("pushfq; pop {}", out(reg) rflags, options(nomem, preserves_flags)); in is_irq_enabled()
/DragonOS/kernel/src/arch/x86_64/process/
H A Dmod.rs569 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 Dmod.rs181 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()