Home
last modified time | relevance | path

Searched refs:base (Results 1 – 25 of 146) sorted by relevance

123456

/DragonOS/kernel/src/mm/
H A Dmemblock.rs56 pub fn add_block(&self, base: PhysAddr, size: usize) -> Result<(), SystemError> { in add_block()
57 let r = self.add_range(base, size, MemoryAreaAttr::empty()); in add_block()
66 base: PhysAddr, in add_range()
78 let block = PhysMemoryArea::new(base, size, MemoryAreaAttr::empty()); in add_range()
110 let mut base = block.base; in do_add_block() localVariable
111 let end = block.base + block.size; in do_add_block()
119 let range_base = inner.initial_memory_regions[i].base; in do_add_block()
121 inner.initial_memory_regions[i].base + inner.initial_memory_regions[i].size; in do_add_block()
126 if range_end <= base { in do_add_block()
133 if range_base > base { in do_add_block()
[all …]
/DragonOS/kernel/src/driver/open_firmware/
H A Dfdt.rs192 let (base, base_index) = read_cell(reg.value, base_index, addr_cells); in early_init_scan_memory()
199 debug!("Found memory: base={:#x}, size={:#x}", base, size); in early_init_scan_memory()
200 self.early_init_dt_add_memory(base, size); in early_init_scan_memory()
214 pub fn early_init_dt_add_memory(&self, base: u64, size: u64) { in early_init_dt_add_memory()
221 let mut base = base as usize; in early_init_dt_add_memory() localVariable
224 if size < (MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK))) { in early_init_dt_add_memory()
225 warn!("Ignoring memory block {:#x}-{:#x}", base, base + size); in early_init_dt_add_memory()
228 if PhysAddr::new(base).check_aligned(MMArch::PAGE_SIZE) == false { in early_init_dt_add_memory()
229 size -= MMArch::PAGE_SIZE - (base & (!MMArch::PAGE_MASK)); in early_init_dt_add_memory()
230 base = page_align_down(base); in early_init_dt_add_memory()
[all …]
/DragonOS/kernel/src/libs/
H A Dprintk.c25 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/kernel/src/driver/tty/
H A Dtty_driver.rs15 base::{
58 let base = DeviceNumber::new(driver.major, driver.minor_start); in lookup_tty_driver() localVariable
59 if dev_num < base || dev_num.data() > base.data() + driver.device_count { in lookup_tty_driver()
62 return Some(((dev_num.data() - base.data()) as usize, driver.clone())); in lookup_tty_driver()
394 fn kset(&self) -> Option<alloc::sync::Arc<crate::driver::base::kset::KSet>> { in kset()
398 fn set_kset(&self, _kset: Option<alloc::sync::Arc<crate::driver::base::kset::KSet>>) { in set_kset()
402 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type()
406 fn set_kobj_type(&self, _ktype: Option<&'static dyn crate::driver::base::kobject::KObjType>) { in set_kobj_type()
420 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state()
426 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut()
[all …]
H A Dtty_device.rs11 base::{
464 fn kset(&self) -> Option<Arc<crate::driver::base::kset::KSet>> { in kset()
468 fn set_kset(&self, kset: Option<Arc<crate::driver::base::kset::KSet>>) { in set_kset()
472 fn kobj_type(&self) -> Option<&'static dyn crate::driver::base::kobject::KObjType> { in kobj_type()
476 fn set_kobj_type(&self, _ktype: Option<&'static dyn crate::driver::base::kobject::KObjType>) {} in set_kobj_type()
488 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state()
494 ) -> crate::libs::rwlock::RwLockWriteGuard<crate::driver::base::kobject::KObjectState> { in kobj_state_mut()
498 fn set_kobj_state(&self, state: crate::driver::base::kobject::KObjectState) { in set_kobj_state()
504 fn dev_type(&self) -> crate::driver::base::device::DeviceType { in dev_type()
508 fn id_table(&self) -> crate::driver::base::device::IdTable { in id_table()
[all …]
/DragonOS/kernel/src/arch/riscv64/mm/
H A Dinit.rs109 let paddr = area.base.add(i * MMArch::PAGE_SIZE); in riscv_mm_init()
184 let base = PhysAddr::new(info.paddr as usize); in remap_at_low_address() localVariable
188 let paddr = PhysAddr::new(base.data() + i * MMArch::PAGE_SIZE); in remap_at_low_address()
189 let vaddr = VirtAddr::new(base.data() + i * MMArch::PAGE_SIZE); in remap_at_low_address()
206 let base = PhysAddr::new(info.paddr as usize); in unmap_at_low_address() localVariable
210 let vaddr = VirtAddr::new(base.data() + i * MMArch::PAGE_SIZE); in unmap_at_low_address()
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/
H A Dseg.rs38 base: u32, field
47 base: concat_idents!(GUEST_, $struct_name, _BASE) as u32,
84 vmx_vmwrite(seg_field.base, 0)?; in seg_setup()
/DragonOS/kernel/src/mm/allocator/
H A Dbuddy.rs382 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()
511 base in buddy_free()
565 unsafe { A::write(Self::entry_virt_addr(paddr, page_list.entry_num), base) } in buddy_free()
570 base = min(base, buddy_addr); in buddy_free()
593 unsafe fn free(&mut self, base: PhysAddr, count: PageFrameCount) { in free()
604 self.buddy_free(base, order); in free()
/DragonOS/kernel/src/driver/video/fbdev/
H A Dmod.rs1 pub mod base; module
H A Dvesafb.rs14 base::{
28 video::fbdev::base::{fbmem::frame_buffer_manager, FbVisual, FRAME_BUFFER_SET},
44 use super::base::{
378 fn fb_image_blit(&self, image: &super::base::FbImage) { in fb_image_blit()
383 fn fb_fillrect(&self, rect: super::base::FillRectData) -> Result<(), SystemError> { in fb_fillrect()
405 let base = screen_base.as_ptr::<u32>(); in fb_fillrect() localVariable
409 unsafe { *base.add((y * line_offset + x) as usize) = fg }; in fb_fillrect()
414 let base = screen_base.as_ptr::<u16>(); in fb_fillrect() localVariable
418 unsafe { *base.add((y * line_offset + x) as usize) = 0x0000 }; in fb_fillrect()
423 let base = screen_base.as_ptr::<[u8; 3]>(); in fb_fillrect() localVariable
[all …]
/DragonOS/kernel/src/driver/acpi/
H A Dglue.rs3 use crate::driver::base::device::Device;
/DragonOS/kernel/src/driver/input/ps2_dev/
H A Dps2_device.rs1 use crate::driver::{base::device::Device, input::serio::serio_device::SerioDevice};
/DragonOS/kernel/src/driver/
H A Dmod.rs2 pub mod base; module
/DragonOS/kernel/src/driver/disk/ahci/
H A Dahcidisk.rs3 use crate::driver::base::block::block_device::{
6 use crate::driver::base::block::disk_info::Partition;
7 use crate::driver::base::block::manager::BlockDevMeta;
8 use crate::driver::base::class::Class;
9 use crate::driver::base::device::bus::Bus;
11 use crate::driver::base::device::driver::Driver;
12 use crate::driver::base::device::{Device, DeviceType, IdTable};
13 use crate::driver::base::kobject::{KObjType, KObject, KObjectState};
14 use crate::driver::base::kset::KSet;
/DragonOS/kernel/src/arch/riscv64/
H A Dcpu.rs29 let base = self.data() as usize / RISCV_XLEN; in into() localVariable
31 HartMask::from_mask_base(offset, base) in into()
/DragonOS/kernel/src/driver/virtio/
H A Dvirtio.rs4 use crate::driver::base::device::bus::Bus;
5 use crate::driver::base::device::{Device, DeviceId};
/DragonOS/kernel/src/driver/rtc/
H A Dutils.rs4 use crate::driver::base::kobject::KObject;
H A Dinterface.rs4 use crate::driver::base::kobject::KObject;
/DragonOS/kernel/src/driver/net/
H A Dloopback.rs2 use crate::driver::base::class::Class;
3 use crate::driver::base::device::bus::Bus;
4 use crate::driver::base::device::driver::Driver;
5 use crate::driver::base::device::{Device, DeviceCommonData, DeviceType, IdTable};
6 use crate::driver::base::kobject::{
9 use crate::driver::base::kset::KSet;
/DragonOS/kernel/src/driver/input/serio/
H A Dmod.rs4 use crate::driver::base::device::bus::{bus_register, Bus};
/DragonOS/kernel/src/arch/riscv64/init/
H A Ddragonstub.rs5 driver::video::fbdev::base::BootTimeScreenInfo,
/DragonOS/kernel/src/arch/x86_64/init/
H A Dmod.rs59 gdtp.base = gdt_vaddr.data() as *const usize; in kernel_main()
63 base: idt_vaddr.data() as *const usize, in kernel_main()
/DragonOS/kernel/src/driver/pci/
H A Ddevice.rs8 driver::base::{
162 ) -> crate::libs::rwlock::RwLockReadGuard<crate::driver::base::kobject::KObjectState> { in kobj_state()
228 fn set_class(&self, _class: Option<alloc::sync::Weak<dyn crate::driver::base::class::Class>>) { in set_class()
/DragonOS/kernel/src/driver/firmware/efi/
H A Dinit.rs79 let base = page_align_down(data_from_fdt.mmap_base.unwrap() as usize); in efi_init() localVariable
80 let offset = data_from_fdt.mmap_base.unwrap() as usize - base; in efi_init()
84 PhysAddr::new(base), in efi_init()
/DragonOS/kernel/src/driver/block/cache/
H A Dcache_block.rs3 use crate::driver::base::block::block_device::BlockId;

123456