/DragonOS-0.1.9/kernel/src/process/ |
D | exec.rs | 270 fn push_slice<T: Copy>(&self, ustack: &mut UserStack, slice: &[T]) -> Result<(), SystemError> { in push_slice() 272 sp -= slice.len() * core::mem::size_of::<T>(); in push_slice() 275 unsafe { core::slice::from_raw_parts_mut(sp.data() as *mut T, slice.len()) } in push_slice() 276 .copy_from_slice(slice); in push_slice()
|
/DragonOS-0.1.9/kernel/src/mm/allocator/ |
D | kernel_allocator.rs | 41 let slice = unsafe { in alloc_in_buddy() localVariable 42 core::slice::from_raw_parts_mut( in alloc_in_buddy() 47 return Ok(NonNull::from(slice)); in alloc_in_buddy()
|
/DragonOS-0.1.9/kernel/src/driver/firmware/efi/ |
D | tables.rs | 54 let slice = in report_systable_header() localVariable 55 unsafe { core::slice::from_raw_parts(fw_ptr.data() as *const u16, TMPBUF_SIZE) }; in report_systable_header() 57 let val = slice[i]; in report_systable_header() 135 core::slice::from_raw_parts( in parse_config_tables()
|
D | init.rs | 168 core::slice::from_raw_parts( in uefi_init()
|
/DragonOS-0.1.9/kernel/src/syscall/ |
D | user_access.rs | 5 slice::{from_raw_parts, from_raw_parts_mut}, 50 let src: &[u8] = core::slice::from_raw_parts(src.data() as *const u8, dst.len()); in copy_from_user() 171 buffer: unsafe { core::slice::from_raw_parts(addr as *const u8, len) }, in new() 280 buffer: unsafe { core::slice::from_raw_parts_mut(addr as *mut u8, len) }, in new()
|
D | mod.rs | 266 core::slice::from_raw_parts_mut::<'static, u8>(buf_vaddr as *mut u8, len) in handle() 458 let data: &[u8] = unsafe { core::slice::from_raw_parts(optval, optlen) }; in handle() 530 let data: &[u8] = unsafe { core::slice::from_raw_parts(buf, len) }; in handle() 567 let buf = unsafe { core::slice::from_raw_parts_mut(buf, len) }; in handle() 661 let buf = unsafe { core::slice::from_raw_parts_mut(buf, size) }; in handle()
|
/DragonOS-0.1.9/kernel/src/filesystem/vfs/ |
D | syscall.rs | 1059 let iovs: &[IoVec] = core::slice::from_raw_parts(iov, iovcnt); in from_user() 1075 slices.push(core::slice::from_raw_parts_mut(iov.iov_base, iov.iov_len)); in from_user() 1086 for slice in self.0.iter() { in gather() 1087 buf.extend_from_slice(slice); in gather() 1095 for slice in self.0.iter_mut() { in scatter() 1096 let len = core::cmp::min(slice.len(), data.len()); in scatter() 1101 slice[..len].copy_from_slice(&data[..len]); in scatter() 1114 let total_len: usize = self.0.iter().map(|slice| slice.len()).sum(); in new_buf()
|
D | file.rs | 375 ::core::slice::from_raw_parts_mut::<'static, u8>(ptr, name_bytes.len() + 1); in readdir()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/process/ |
D | table.rs | 66 let gdt: &mut [u64] = core::slice::from_raw_parts_mut(gdt_vaddr.data() as *mut u64, 512); in set_tss_descriptor()
|
/DragonOS-0.1.9/kernel/src/libs/lib_ui/ |
D | screen_manager.rs | 164 unsafe { core::slice::from_raw_parts_mut(vaddr.data() as *mut u32, len) }; in copy_from_nonoverlapping() 168 unsafe { core::slice::from_raw_parts(vaddr.data() as *const u32, len) }; in copy_from_nonoverlapping() 184 core::slice::from_raw_parts(vaddr.data() as *const u32, len) in copy_from_nonoverlapping()
|
/DragonOS-0.1.9/kernel/crates/bitmap/src/ |
D | alloc_bitmap.rs | 101 core::slice::from_raw_parts( in as_bytes()
|
D | static_bitmap.rs | 111 core::slice::from_raw_parts( in as_bytes()
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/mm/ |
D | mod.rs | 552 let slice = unsafe { in test_buddy() localVariable 553 core::slice::from_raw_parts_mut( in test_buddy() 558 for i in 0..slice.len() { in test_buddy() 559 slice[i] = ((i + unsafe { rdtsc() } as usize) % 256) as u8; in test_buddy()
|
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/ |
D | vesafb.rs | 353 let slice = unsafe { core::slice::from_raw_parts(vaddr.as_ptr::<u8>(), size as usize) }; in fb_read() localVariable 354 buf[..len].copy_from_slice(&slice[pos as usize..(pos as usize + len)]); in fb_read() 374 let slice = unsafe { core::slice::from_raw_parts_mut(vaddr.as_ptr::<u8>(), size as usize) }; in fb_write() localVariable 375 slice[pos as usize..(pos as usize + len)].copy_from_slice(&buf[..len]); in fb_write()
|
/DragonOS-0.1.9/kernel/src/virt/kvm/ |
D | vcpu_dev.rs | 168 core::slice::from_raw_parts_mut( in ioctl()
|
D | vm_dev.rs | 157 core::slice::from_raw_parts_mut( in ioctl()
|
/DragonOS-0.1.9/kernel/src/driver/acpi/ |
D | mod.rs | 124 unsafe { core::slice::from_raw_parts(rsdp_vaddr as usize as *const u8, size) }; in rsdp_paddr()
|
D | sysfs.rs | 253 core::slice::from_raw_parts( in read()
|
/DragonOS-0.1.9/kernel/crates/klog_types/src/ |
D | lib.rs | 75 core::slice::from_raw_parts( in calculate_checksum()
|
/DragonOS-0.1.9/kernel/src/driver/multiboot2/ |
D | multiboot2.h | 238 unsigned int slice; member
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/kvm/vmx/ |
D | vcpu.rs | 19 use core::slice; 469 let descriptor_table = unsafe { slice::from_raw_parts(gdt_base, gdt_size.into()) }; in get_segment_base()
|
/DragonOS-0.1.9/kernel/src/net/ |
D | syscall.rs | 653 let buf = core::slice::from_raw_parts_mut(addr as *mut u8, to_write); in write_to_user() 654 buf.copy_from_slice(core::slice::from_raw_parts( in write_to_user()
|
/DragonOS-0.1.9/kernel/src/driver/net/e1000e/ |
D | e1000e.rs | 10 use core::slice::{from_raw_parts, from_raw_parts_mut};
|
/DragonOS-0.1.9/kernel/src/arch/x86_64/interrupt/ |
D | entry.rs | 574 let idt_entry = core::slice::from_raw_parts_mut(idt_vaddr.data() as *mut u64, 2); in get_idt_entry()
|
/DragonOS-0.1.9/kernel/src/libs/ |
D | elf.rs | 563 core::slice::from_raw_parts( in load()
|