/DragonOS/kernel/src/driver/base/device/ |
H A D | init.rs | 20 .register(None) in devices_init() 38 .register(Some(devices_kset)) in devices_init() 46 dev_kset.register(None).expect("register dev kset failed"); in devices_init() 61 .register(Some(dev_kset)) in devices_init() 76 .register(Some(dev_kset)) in devices_init()
|
H A D | bus.rs | 361 pub fn register(&self, bus: Arc<dyn Bus>) -> Result<(), SystemError> { in register() method 368 subsys_kset.register(Some(sys_bus_kset()))?; in register() 521 return bus_manager().register(bus); in bus_register() 534 bus_kset.register(None).expect("bus kset register failed"); in buses_init() 545 .register(Some(sys_devices_kset())) in buses_init() 854 bus_manager().register(subsys.clone())?; in subsys_register() 858 device_manager().register(fake_root_dev.clone())?; in subsys_register()
|
/DragonOS/kernel/src/arch/riscv64/interrupt/ |
H A D | mod.rs | 3 use riscv::register::{scause::Scause, sstatus::Sstatus}; 38 riscv::register::sstatus::read().sie() in is_irq_enabled() 42 let sie = riscv::register::sstatus::read().sie(); in save_and_disable_irq() 43 riscv::register::sstatus::clear_sie(); in save_and_disable_irq() 50 riscv::register::sstatus::set_sie(); in restore_irq() 52 riscv::register::sstatus::clear_sie(); in restore_irq() 118 self.status.spp() == riscv::register::sstatus::SPP::User in is_from_user()
|
/DragonOS/kernel/src/libs/ |
H A D | notifier.rs | 29 pub fn register( in register() method 119 pub fn register(&mut self, block: Arc<dyn NotifierBlock<V, T>>) -> Result<(), SystemError> { in register() method 121 return notifier_chain_guard.register(block, false); in register() 129 return notifier_chain_guard.register(block, true); in register_unique_prio() 158 pub fn register(&mut self, block: Arc<dyn NotifierBlock<V, T>>) -> Result<(), SystemError> { in register() method 160 return notifier_chain_guard.register(block, false); in register() 168 return notifier_chain_guard.register(block, true); in register_unique_prio() 195 pub fn register(&mut self, block: Arc<dyn NotifierBlock<V, T>>) -> Result<(), SystemError> { in register() method 196 return self.0.register(block, false); in register()
|
/DragonOS/kernel/src/arch/x86_64/driver/apic/ |
H A D | mod.rs | 129 register: LVTRegister, field 137 pub fn new(register: LVTRegister, data: u32) -> Option<Self> { in new() 139 let mut result = Self { register, data: 0 }; in new() 141 match result.register { in new() 150 if let LVTRegister::LINT0 | LVTRegister::LINT1 = result.register { in new() 161 if let LVTRegister::Timer = result.register { in new() 176 pub fn register(&self) -> LVTRegister { in register() method 177 return self.register; in register() 199 match self.register { in set_delivery_mode() 215 if let LVTRegister::Timer | LVTRegister::ErrorReg = self.register { in delivery_mode() [all …]
|
/DragonOS/docs/kernel/core_api/ |
H A D | notifier_chain.md | 13   将回调函数封装成特定的结构体,并将该结构体注册到指定的通知链当中。相关方法为 `register`,由“订阅者”使用。 25   每种通知链都有相对应的 `register`,`unregister` 以及 `call_chain` 的接口,其功能同上面所述的核心功能。
|
/DragonOS/kernel/src/arch/riscv64/process/ |
H A D | mod.rs | 10 use riscv::register::sstatus::Sstatus; 429 if regs.status.fs() == riscv::register::sstatus::FS::Dirty { in save() 436 if regs.status.fs() != riscv::register::sstatus::FS::Off { in restore() 443 regs.status.update_fs(riscv::register::sstatus::FS::Clean); in do_clean() 449 riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Initial); in do_save() 498 riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Off); in do_save() 508 riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Initial); in do_restore() 559 riscv::register::sstatus::set_fs(riscv::register::sstatus::FS::Off); in do_restore()
|
/DragonOS/kernel/src/arch/riscv64/ |
H A D | cpu.rs | 19 let ptr: *const LocalContext = riscv::register::tp::read() as *const LocalContext; in current_cpu_id() 100 riscv::register::sscratch::write(0); in sync_to_cpu() 103 riscv::register::tp::write(ptr); in sync_to_cpu()
|
H A D | time.rs | 53 riscv::register::time::read() in get_cycles()
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | platform_driver.rs | 44 pub fn register(&self, driver: Arc<dyn PlatformDriver>) -> Result<(), SystemError> { in register() method 46 return driver_manager().register(driver as Arc<dyn Driver>); in register()
|
/DragonOS/kernel/src/driver/input/serio/ |
H A D | serio_driver.rs | 68 pub fn register(&self, driver: Arc<dyn SerioDriver>) -> Result<(), SystemError> { in register() method 70 return driver_manager().register(driver as Arc<dyn Driver>); in register()
|
/DragonOS/kernel/src/driver/pci/ |
H A D | driver.rs | 75 pub fn register(&self, driver: Arc<dyn PciDriver>) -> Result<(), SystemError> { in register() method 77 return driver_manager().register(driver as Arc<dyn Driver>); in register()
|
/DragonOS/kernel/src/arch/riscv64/init/ |
H A D | mod.rs | 70 riscv::register::stvec::write(ptr, riscv::register::stvec::TrapMode::Direct); in setup_trap_vector() 73 riscv::register::sscratch::write(0); in setup_trap_vector()
|
/DragonOS/kernel/src/driver/base/ |
H A D | hypervisor.rs | 20 .register(None) in hypervisor_init()
|
H A D | firmware.rs | 20 .register(None) in firmware_init()
|
H A D | class.rs | 27 .register(None) in classes_init() 133 subsys.register(Some(sys_class_kset()))?; in class_register()
|
/DragonOS/kernel/src/driver/pci/test/ |
H A D | mod.rs | 24 let _ = pci_driver_manager().register(tdrv.clone()); in pt_init()
|
/DragonOS/kernel/src/driver/clocksource/ |
H A D | timer_riscv.rs | 54 unsafe { riscv::register::sie::set_stimer() }; in enable() 59 unsafe { riscv::register::sie::clear_stimer() }; in disable()
|
/DragonOS/kernel/crates/rbpf/src/ |
H A D | asm_parser.rs | 70 fn register<I>() -> impl Parser<I, Output = i64> in register() function 85 let register_operand = register().map(Operand::Register); in operand() 87 let memory = between(char('['), char(']'), (register(), optional(integer()))) in operand() 132 use super::{ident, instruction, integer, operand, parse, register, Instruction, Operand}; 159 assert_eq!(register().parse("r0"), Ok((0, ""))); in test_register() 160 assert_eq!(register().parse("r15"), Ok((15, ""))); in test_register()
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | sysfs.rs | 72 hotplug_kset.register(Some(acpi_kset()))?; in acpi_sysfs_init() 90 acpi_tables_kset.register(Some(acpi_kset()))?; in acpi_tables_sysfs_init() 97 acpi_tables_data_kset.register(Some(acpi_tables_kset.clone()))?; in acpi_tables_sysfs_init() 104 acpi_tables_dynamic_kset.register(Some(acpi_tables_kset.clone()))?; in acpi_tables_sysfs_init()
|
H A D | bus.rs | 37 .register(acpi_bus as Arc<dyn Bus>) in bus_init()
|
/DragonOS/kernel/src/misc/ |
H A D | ksysfs.rs | 27 .register(None) in ksysfs_init()
|
/DragonOS/kernel/src/driver/irqchip/ |
H A D | riscv_intc.rs | 52 unsafe { riscv::register::sie::clear_bits(1 << irq.hardware_irq().data()) }; in irq_mask() 57 unsafe { riscv::register::sie::set_bits(1 << irq.hardware_irq().data()) }; in irq_unmask()
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | sysfs.rs | 159 .register(bus) in virtio_init() 172 pub fn register(&self, driver: Arc<dyn VirtIODriver>) -> Result<(), SystemError> { in register() method 174 return driver_manager().register(driver as Arc<dyn Driver>); in register()
|
/DragonOS/kernel/src/driver/input/serio/i8042/ |
H A D | mod.rs | 45 platform_driver_manager().register(i8042_driver.clone() as Arc<dyn PlatformDriver>)?; in i8042_init()
|