/DragonOS-0.1.9/kernel/src/mm/ |
D | memblock.rs | 55 pub fn add_block(&self, base: PhysAddr, size: usize) -> Result<(), SystemError> { in add_block() 56 let r = self.add_range(base, size, MemoryAreaAttr::empty()); in add_block() 65 base: PhysAddr, in add_range() 77 let block = PhysMemoryArea::new(base, size, MemoryAreaAttr::empty()); in add_range() 109 let mut base = block.base; in do_add_block() localVariable 110 let end = block.base + block.size; in do_add_block() 118 let range_base = inner.initial_memory_regions[i].base; in do_add_block() 120 inner.initial_memory_regions[i].base + inner.initial_memory_regions[i].size; in do_add_block() 125 if range_end <= base { in do_add_block() 132 if range_base > base { in do_add_block() [all …]
|
D | page.rs | 23 base: VirtAddr, field 33 pub unsafe fn new(base: VirtAddr, phys: PhysAddr, level: usize) -> Self { in new() 35 base, in new() 67 pub fn base(&self) -> VirtAddr { in base() method 68 self.base in base() 87 return Some(self.base.add(i << shift)); in entry_base() 144 if addr < self.base || addr >= self.base.add(mask) { in index_of()
|
D | mod.rs | 375 pub base: PhysAddr, field 384 base: PhysAddr::new(0), 389 pub fn new(base: PhysAddr, size: usize, flags: MemoryAreaAttr) -> Self { in new() 390 Self { base, size, flags } in new() 396 (self.base.data() + (MMArch::PAGE_SIZE - 1)) & !(MMArch::PAGE_SIZE - 1), in area_base_aligned() 402 return PhysAddr::new((self.base.data() + self.size) & !(MMArch::PAGE_SIZE - 1)); in area_end_aligned()
|
/DragonOS-0.1.9/kernel/src/driver/open_firmware/ |
D | fdt.rs | 162 let (base, base_index) = read_cell(reg.value, base_index, addr_cells); in early_init_scan_memory() 169 kdebug!("Found memory: base={:#x}, size={:#x}", base, size); in early_init_scan_memory() 170 self.early_init_dt_add_memory(base, size); in early_init_scan_memory() 184 pub fn early_init_dt_add_memory(&self, base: u64, size: u64) { in early_init_dt_add_memory() 194 let mut base = base as usize; in early_init_dt_add_memory() localVariable 197 if size < (MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK))) { in early_init_dt_add_memory() 198 kwarn!("Ignoring memory block {:#x}-{:#x}", base, base + size); in early_init_dt_add_memory() 201 if PhysAddr::new(base).check_aligned(MMArch::PAGE_SIZE) == false { in early_init_dt_add_memory() 202 size -= MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK)); in early_init_dt_add_memory() 203 base = page_align_down(base); in early_init_dt_add_memory() [all …]
|
/DragonOS-0.1.9/kernel/src/driver/tty/ |
D | tty_driver.rs | 9 base::{ 39 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver() localVariable 40 if dev_num < base || dev_num.data() > base.data() + driver.device_count { in lookup_tty_driver() 290 fn kset(&self) -> Option<alloc::sync::Arc<crate::driver::base::kset::KSet>> { in kset() 294 fn set_kset(&self, _kset: Option<alloc::sync::Arc<crate::driver::base::kset::KSet>>) { in set_kset() 298 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type() 302 fn set_kobj_type(&self, _ktype: Option<&'static dyn crate::driver::base::kobject::KObjType>) { in set_kobj_type() 316 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state() 322 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut() 326 fn set_kobj_state(&self, _state: crate::driver::base::kobject::KObjectState) { in set_kobj_state() [all …]
|
D | tty_device.rs | 11 base::{ 377 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset() 381 fn set_kset(&self, kset: Option<Arc<crate::driver::base::kset::KSet>>) { in set_kset() 385 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type() 389 fn set_kobj_type(&self, _ktype: Option<&'static dyn crate::driver::base::kobject::KObjType>) {} in set_kobj_type() 401 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state() 407 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut() 411 fn set_kobj_state(&self, state: crate::driver::base::kobject::KObjectState) { in set_kobj_state() 417 fn dev_type(&self) -> crate::driver::base::device::DeviceType { in dev_type() 421 fn id_table(&self) -> crate::driver::base::device::IdTable { in id_table() [all …]
|
/DragonOS-0.1.9/kernel/src/libs/ |
D | printk.c | 25 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags); 383 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags) in write_num() argument 397 if (base < 2 || base > 36) in write_num() 435 if (base == 16) // 0x占用2个位置 in write_num() 437 else if (base == 8) // O占用一个位置 in write_num() 450 tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位 in write_num() 451 num /= base; in write_num() 468 if (base == 16) in write_num() 473 else if (base == 8) in write_num()
|
/DragonOS-0.1.9/kernel/src/arch/riscv64/mm/ |
D | init.rs | 107 let paddr = area.base.add(i * MMArch::PAGE_SIZE); in riscv_mm_init() 182 let base = PhysAddr::new(info.paddr as usize); in remap_at_low_address() localVariable 186 let paddr = PhysAddr::new(base.data() + i * MMArch::PAGE_SIZE); in remap_at_low_address() 187 let vaddr = VirtAddr::new(base.data() + i * MMArch::PAGE_SIZE); in remap_at_low_address() 204 let base = PhysAddr::new(info.paddr as usize); in unmap_at_low_address() localVariable 208 let vaddr = VirtAddr::new(base.data() + i * MMArch::PAGE_SIZE); in unmap_at_low_address()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/ |
D | seg.rs | 38 base: u32, field 47 base: concat_idents!(GUEST_, $struct_name, _BASE) as u32, 84 vmx_vmwrite(seg_field.base, 0)?; in seg_setup()
|
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/ |
D | mod.rs | 1 pub mod base; module
|
/DragonOS-0.1.9/kernel/src/mm/allocator/ |
D | buddy.rs | 382 unsafe fn buddy_free(&mut self, mut base: PhysAddr, order: u8) { in buddy_free() 388 if base.data() & ((1 << (order)) - 1) != 0 { in buddy_free() 391 base.data(), in buddy_free() 398 let buddy_addr = PhysAddr::new(base.data() ^ (1 << order)); in buddy_free() 439 base in buddy_free() 493 unsafe { A::write(Self::entry_virt_addr(paddr, page_list.entry_num), base) } in buddy_free() 572 base = min(base, buddy_addr); in buddy_free() 595 unsafe fn free(&mut self, base: PhysAddr, count: PageFrameCount) { in free() 606 self.buddy_free(base, order); in free()
|
/DragonOS-0.1.9/kernel/src/driver/input/ps2_dev/ |
D | ps2_device.rs | 1 use crate::driver::{base::device::Device, input::serio::serio_device::SerioDevice};
|
/DragonOS-0.1.9/kernel/src/driver/acpi/ |
D | glue.rs | 3 use crate::driver::base::device::Device;
|
/DragonOS-0.1.9/kernel/src/driver/ |
D | mod.rs | 2 pub mod base; module
|
/DragonOS-0.1.9/kernel/src/driver/net/e1000e/ |
D | e1000e_driver.rs | 5 base::{ 303 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset() 307 fn set_kset(&self, _kset: Option<Arc<crate::driver::base::kset::KSet>>) { in set_kset() 311 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type() 325 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state() 331 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut()
|
/DragonOS-0.1.9/kernel/src/driver/virtio/ |
D | mod.rs | 8 use super::base::device::DeviceId;
|
/DragonOS-0.1.9/kernel/src/driver/disk/ahci/ |
D | ahcidisk.rs | 2 use crate::driver::base::block::block_device::{BlockDevice, BlockId}; 3 use crate::driver::base::block::disk_info::Partition; 4 use crate::driver::base::block::SeekFrom; 5 use crate::driver::base::class::Class; 6 use crate::driver::base::device::bus::Bus; 8 use crate::driver::base::device::driver::Driver; 9 use crate::driver::base::device::{Device, DeviceType, IdTable}; 10 use crate::driver::base::kobject::{KObjType, KObject, KObjectState}; 11 use crate::driver::base::kset::KSet;
|
/DragonOS-0.1.9/kernel/src/driver/net/ |
D | mod.rs | 7 use super::base::device::driver::Driver;
|
D | virtio_net.rs | 17 base::{ 377 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset() 381 fn set_kset(&self, _kset: Option<Arc<crate::driver::base::kset::KSet>>) { in set_kset() 385 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type() 399 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state() 405 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut()
|
/DragonOS-0.1.9/kernel/src/driver/input/serio/ |
D | mod.rs | 4 use crate::driver::base::device::bus::{bus_register, Bus};
|
D | serio_device.rs | 4 use crate::driver::base::device::{bus::Bus, device_manager, Device};
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/init/ |
D | mod.rs | 51 gdtp.base = gdt_vaddr.data() as *const usize; in kernel_main() 55 idtp.base = idt_vaddr.data() as *const usize; in kernel_main()
|
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/ |
D | init.rs | 68 let base = page_align_down(data_from_fdt.mmap_base.unwrap() as usize); in efi_init() localVariable 69 let offset = data_from_fdt.mmap_base.unwrap() as usize - base; in efi_init() 73 PhysAddr::new(base), in efi_init()
|
/DragonOS-0.1.9/kernel/src/driver/base/platform/ |
D | platform_driver.rs | 3 use crate::driver::base::device::{
|
/DragonOS-0.1.9/kernel/src/misc/ |
D | ksysfs.rs | 2 driver::base::{kobject::KObject, kset::KSet},
|