Home
last modified time | relevance | path

Searched refs:dev (Results 1 – 25 of 54) sorted by relevance

123

/DragonOS/kernel/src/driver/base/block/
H A Dmanager.rs57 pub fn register(&self, dev: Arc<dyn BlockDevice>) -> Result<(), SystemError> { in register()
59 let dev_name = dev.dev_name(); in register()
63 inner.disks.insert(dev_name.clone(), dev.clone()); in register()
70 self.check_partitions(&dev).inspect_err(|_| out_remove())?; in register()
75 fn check_partitions(&self, dev: &Arc<dyn BlockDevice>) -> Result<(), SystemError> { in check_partitions()
76 if self.check_mbr(dev).is_ok() { in check_partitions()
81 self.register_entire_disk_as_gendisk(dev) in check_partitions()
84 fn check_mbr(&self, dev: &Arc<dyn BlockDevice>) -> Result<(), SystemError> { in check_mbr()
85 let mbr = MbrDiskPartionTable::from_disk(dev.clone())?; in check_mbr()
88 self.register_gendisk_with_range(dev, p.try_into()?)?; in check_mbr()
[all …]
/DragonOS/kernel/src/driver/base/device/
H A Ddd.rs47 pub fn device_attach(&self, dev: &Arc<dyn Device>) -> Result<bool, SystemError> { in device_attach()
48 return self.do_device_attach(dev, false); in device_attach()
51 pub fn device_initial_probe(&self, dev: &Arc<dyn Device>) -> Result<bool, SystemError> { in device_initial_probe()
52 return self.do_device_attach(dev, true); in device_initial_probe()
58 dev: &Arc<dyn Device>, in do_device_attach()
65 if dev.is_dead() { in do_device_attach()
69 warn!("do_device_attach: dev: '{}'", dev.name()); in do_device_attach()
74 if dev.driver().is_some() { in do_device_attach()
75 if self.device_is_bound(dev) { in do_device_attach()
78 dev.name() in do_device_attach()
[all …]
H A Dmod.rs421 let dev = kobj.cast::<dyn Device>().unwrap(); in release() localVariable
434 dev.release(); in release()
500 if let Some(ref dev) = deivce_parent { in add_device()
504 dev.name() in add_device()
676 fn device_platform_notify(&self, dev: &Arc<dyn Device>) { in device_platform_notify()
677 acpi_device_notify(dev); in device_platform_notify()
678 software_node_notify(dev); in device_platform_notify()
682 fn add_class_symlinks(&self, dev: &Arc<dyn Device>) -> Result<(), SystemError> { in add_class_symlinks()
683 let class = dev.class(); in add_class_symlinks()
699 let dev_kobj = dev.clone() as Arc<dyn KObject>; in add_class_symlinks()
[all …]
H A Dbus.rs194 for dev in guard.iter() { in find_device()
195 if matcher.match_device(dev, data) { in find_device()
196 return Some(dev.clone()); in find_device()
265 pub fn add_device(&self, dev: &Arc<dyn Device>) -> Result<(), SystemError> { in add_device()
266 let bus = dev.bus().and_then(|bus| bus.upgrade()); in add_device()
268 device_manager().add_groups(dev, bus.dev_groups())?; in add_device()
275 let dev_kobj = dev.clone() as Arc<dyn KObject>; in add_device()
280 dev.name(), in add_device()
287 bus.subsystem().add_device_to_vec(dev)?; in add_device()
443 for dev in bus.subsystem().devices().iter() { in rescan_devices()
[all …]
H A Ddriver.rs166 .find(|dev| matcher.match_device(dev, data)) in find_device_slow()
234 pub fn driver_sysfs_add(&self, dev: &Arc<dyn Device>) -> Result<(), SystemError> { in driver_sysfs_add()
235 if let Some(bus) = dev.bus().and_then(|bus| bus.upgrade()) { in driver_sysfs_add()
238 .call_chain(BusNotifyEvent::BindDriver, Some(dev), None); in driver_sysfs_add()
240 let driver_kobj = dev.driver().unwrap() as Arc<dyn KObject>; in driver_sysfs_add()
241 let device_kobj = dev.clone() as Arc<dyn KObject>; in driver_sysfs_add()
244 sysfs_instance().remove_link(&driver_kobj, dev.name()); in driver_sysfs_add()
261 if let Err(e) = device_manager().create_file(dev, &DeviceAttrCoredump) { in driver_sysfs_add()
/DragonOS/kernel/src/driver/pci/
H A Dattr.rs60 let dev = _kobj in show() localVariable
66 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.vendor())); in show()
91 let dev = _kobj in show() localVariable
97 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.device_id())); in show()
122 let dev = _kobj in show() localVariable
128 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.subsystem_vendor())); in show()
153 let dev = _kobj in show() localVariable
159 return sysfs_emit_str(_buf, &format!("0x{:04x}", dev.subsystem_device())); in show()
184 let dev = _kobj in show() localVariable
190 return sysfs_emit_str(_buf, &format!("0x{:02x}", dev.revision())); in show()
[all …]
H A Ddev_id.rs44 pub fn match_dev(&self, dev: &Arc<dyn PciDevice>) -> bool { in match_dev()
45 if let Some(d_data) = &dev.dynid().special_data { in match_dev()
49 return s_data.match_dev(dev.dynid().special_data); in match_dev()
51 let d_id = dev.dynid(); in match_dev()
H A Ddriver.rs58 fn match_dev(&self, dev: &Arc<dyn PciDevice>) -> Option<Arc<PciDeviceID>> { in match_dev()
60 if i.match_dev(dev) { in match_dev()
/DragonOS/kernel/src/driver/virtio/
H A Dsysfs.rs191 pub fn device_add(&self, dev: Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in device_add()
192 dev.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in device_add()
193 device_manager().device_default_initialize(&(dev.clone() as Arc<dyn Device>)); in device_add()
196 dev.set_virtio_device_index(virtio_index); in device_add()
197 dev.set_device_name(format!("virtio{}", virtio_index.data())); in device_add()
199 device_manager().add_device(dev.clone() as Arc<dyn Device>)?; in device_add()
201 .add_groups(&(dev.clone() as Arc<dyn Device>), &[&VirtIODeviceAttrGroup]); in device_add()
203 self.setup_irq(&dev).ok(); in device_add()
211 fn setup_irq(&self, dev: &Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in setup_irq()
212 let irq = dev.irq().ok_or(SystemError::EINVAL)?; in setup_irq()
[all …]
/DragonOS/kernel/src/driver/rtc/
H A Dclass.rs84 pub(super) fn rtc_register_device(dev: &Arc<RtcGeneralDevice>) -> Result<(), SystemError> { in rtc_register_device()
85 device_manager().add_device(dev.clone())?; in rtc_register_device()
86 register_default_rtc(dev.clone()); in rtc_register_device()
88 rtc_hctosys(dev); in rtc_register_device()
92 fn rtc_hctosys(dev: &Arc<RtcGeneralDevice>) { in rtc_hctosys()
93 let r = rtc_read_time(dev); in rtc_hctosys()
95 dev.set_hc2sys_result(Err(e)); in rtc_hctosys()
102 dev.set_hc2sys_result(r); in rtc_hctosys()
H A Drtc_cmos.rs72 let dev = device in probe() localVariable
78 if dev.id_table() != self.id_table().unwrap() { in probe()
93 let general_rtc_device: Arc<RtcGeneralDevice> = rtc_general_device_create(&dev, None); in probe()
220 fn read_time(&self, dev: &Arc<dyn RtcDevice>) -> Result<RtcTime, SystemError> { in read_time()
221 dev.class_ops().read_time(dev) in read_time()
224 fn set_time(&self, dev: &Arc<dyn RtcDevice>, time: &RtcTime) -> Result<(), SystemError> { in set_time()
225 dev.class_ops().set_time(dev, time) in set_time()
/DragonOS/user/port/binutils/2.38/
H A DDockerfile15 libgmp-dev \
16 libmpc-dev \
17 libmpfr-dev \
18 libncurses5-dev \
27 zlib1g-dev \
H A Dbuild.sh31 libgmp3-dev \
32 libmpc-dev \
33 libmpfr-dev \
/DragonOS/tools/
H A Dbootstrap.sh66 llvm-dev libclang-dev clang gcc-multilib \
67 gcc build-essential fdisk dosfstools dnsmasq bridge-utils iptables libssl-dev pkg-config \
111dev-util/pkgconf sys-apps/which app-arch/unzip sys-apps/util-linux sys-fs/dosfstools sys-devel/gcc…
304 if hash 2>/dev/null zypper; then
307 elif hash 2>/dev/null apt-get; then
310 elif hash 2>/dev/null dnf; then
313 elif hash 2>/dev/null emerge; then
316 elif hash 2>/dev/null eopkg; then
319 elif hash 2>/dev/null pacman; then
322 elif hash 2>/dev/null pkg; then
[all …]
H A Dbuild_in_docker.sh3 …MKNOD -v $(pwd):/data -v /dev:/dev -v dragonos-build-cargo:/root/.cargo/registry --name dragonos-b…
H A Dwrite_disk_image.sh115 mkdir -p ${root_folder}/bin/disk_mount/dev
118 touch ${root_folder}/bin/disk_mount/dev/keyboard.dev
157 …${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} /dev/$LOOP_DEVICE
168 …${GRUB_PATH_I386_LEGACY_INSTALL} --target=i386-pc --boot-directory=${boot_folder} /dev/$LOOP_DEVICE
/DragonOS/kernel/src/arch/x86_64/driver/
H A Drtc.rs238 fn read_time(&self, dev: &Arc<dyn RtcDevice>) -> Result<RtcTime, SystemError> { in read_time()
240 let dev = dev in read_time() localVariable
245 let _guard = dev.ops_mutex.lock(); in read_time()
250 let status_register_b: u8 = dev.read_cmos(0x0B); // 读取状态寄存器B in read_time()
257 res.year = dev.read_cmos(CMOSTimeSelector::Year as u8) as i32; in read_time()
258 res.month = dev.read_cmos(CMOSTimeSelector::Month as u8) as i32; in read_time()
259 res.mday = dev.read_cmos(CMOSTimeSelector::Day as u8) as i32; in read_time()
260 res.hour = dev.read_cmos(CMOSTimeSelector::Hour as u8) as i32; in read_time()
261 res.minute = dev.read_cmos(CMOSTimeSelector::Minute as u8) as i32; in read_time()
262 res.second = dev.read_cmos(CMOSTimeSelector::Second as u8) as i32; in read_time()
[all …]
/DragonOS/docs/introduction/
H A Dbuild_system.md83 - llvm-dev
84 - libclang-dev
109 sudo apt install -y autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev \
111 zlib1g-dev libexpat-dev pkg-config libglib2.0-dev libpixman-1-dev libsdl2-dev \
/DragonOS/user/port/gcc/11.3.0/
H A Dbuild-hosted.sh33 libgmp3-dev \
34 libmpc-dev \
35 libmpfr-dev \
/DragonOS/.github/workflows/
H A Dmakefile.yml15 container: dragonos/dragonos-dev:v1.6
38 container: dragonos/dragonos-dev:v1.6
59 container: dragonos/dragonos-dev:v1.6
81 container: dragonos/dragonos-dev:v1.6
/DragonOS/kernel/src/driver/net/
H A Dmod.rs111 fn register_netdevice(dev: Arc<dyn NetDevice>) -> Result<(), SystemError> { in register_netdevice()
113 netdev_register_kobject(dev.clone())?; in register_netdevice()
116 dev.set_net_state(NetDeivceState::__LINK_STATE_PRESENT); in register_netdevice()
/DragonOS/kernel/src/exception/
H A Dmsi.rs78 dev: Option<Arc<dyn Device>>, field
96 dev: Option<Arc<dyn Device>>, in new()
104 dev, in new()
/DragonOS/tools/qemu/
H A Difup-nat15 if brctl show | grep "^$BRIDGE" &> /dev/null; then
44 ps -ef | grep "dnsmasq" | grep -v "grep" &> /dev/null
/DragonOS/kernel/src/driver/pci/test/
H A Dpt_driver.rs94 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device()
103 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()
/DragonOS/kernel/src/driver/input/serio/i8042/
H A Di8042_driver.rs113 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device()
122 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()

123