Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 31) sorted by relevance

12

/DragonOS-0.1.5/kernel/src/driver/usb/xhci/
Dinternal.h13 #define xhci_read_cap_reg32(id, offset) (__read4b(xhci_hc[id].vbase + (offset))) argument
14 #define xhci_get_ptr_cap_reg32(id, offset) ((uint32_t *)(xhci_hc[id].vbase + (offset))) argument
15 #define xhci_write_cap_reg32(id, offset, value) (__write4b(xhci_hc[id].vbase + (offset), (value))) argument
17 #define xhci_read_cap_reg64(id, offset) (__read8b(xhci_hc[id].vbase + (offset))) argument
18 #define xhci_get_ptr_reg64(id, offset) ((uint64_t *)(xhci_hc[id].vbase + (offset))) argument
19 #define xhci_write_cap_reg64(id, offset, value) (__write8b(xhci_hc[id].vbase + (offset), (value))) argument
21 #define xhci_read_op_reg8(id, offset) (*(uint8_t *)(xhci_hc[id].vbase_op + (offset))) argument
22 #define xhci_get_ptr_op_reg8(id, offset) ((uint8_t *)(xhci_hc[id].vbase_op + (offset))) argument
23 #define xhci_write_op_reg8(id, offset, value) (*(uint8_t *)(xhci_hc[id].vbase_op + (offset)) = (uin… argument
25 #define xhci_read_op_reg32(id, offset) (__read4b(xhci_hc[id].vbase_op + (offset))) argument
[all …]
Dxhci.c34 …int32_t xhci_hc_get_protocol_offset(int id, uint32_t list_off, const int version, uint32_t *offset,
382 …int32_t xhci_hc_get_protocol_offset(int id, uint32_t list_off, const int version, uint32_t *offset, in xhci_hc_get_protocol_offset() argument
399 if (offset != NULL) in xhci_hc_get_protocol_offset()
400 *offset = (uint32_t)(dw2 & 0xff) - 1; // 使其转换为zero based in xhci_hc_get_protocol_offset()
436 uint32_t offset, cnt; in xhci_hc_pair_ports() local
443 next_off = xhci_hc_get_protocol_offset(id, next_off, 2, &offset, &cnt, &protocol_flags); in xhci_hc_pair_ports()
451 xhci_hc[id].ports[offset + i].offset = xhci_hc[id].port_num_u2++; in xhci_hc_pair_ports()
452 xhci_hc[id].ports[offset + i].flags = XHCI_PROTOCOL_USB2; in xhci_hc_pair_ports()
456 xhci_hc[id].ports[offset + i].flags |= XHCI_PROTOCOL_HSO; in xhci_hc_pair_ports()
466 next_off = xhci_hc_get_protocol_offset(id, next_off, 3, &offset, &cnt, &protocol_flags); in xhci_hc_pair_ports()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dfile.rs84 offset: usize, field
103 offset: 0, in new()
131 .read_at(self.offset, len, buf, &mut self.private_data)?; in read()
132 self.offset += len; in read()
151 .write_at(self.offset, len, buf, &mut FilePrivateData::Unused)?; in write()
152 self.offset += len; in write()
175 SeekFrom::SeekSet(offset) => { in lseek()
176 pos = offset; in lseek()
178 SeekFrom::SeekCurrent(offset) => { in lseek()
179 pos = self.offset as i64 + offset; in lseek()
[all …]
DVFS.h181 …*vfs_filldir_t)(void *buf, ino_t d_ino, char *name, int namelen, unsigned char type, off_t offset);
189 long (*lseek)(struct vfs_file_t *file_ptr, long offset, long origin);
Dmount.rs155 offset: usize, in read_at()
160 return self.inner_inode.read_at(offset, len, buf, data); in read_at()
165 offset: usize, in write_at()
172 .write_at(offset, len, buf, &mut FilePrivateData::Unused); in write_at()
Dsyscall.rs127 let offset = regs.r9 as i64; in sys_lseek() localVariable
131 SEEK_SET => SeekFrom::SeekSet(offset), in sys_lseek()
132 SEEK_CUR => SeekFrom::SeekCurrent(offset), in sys_lseek()
133 SEEK_END => SeekFrom::SeekEnd(offset), in sys_lseek()
/DragonOS-0.1.5/kernel/src/io/
Ddevice.rs35 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, i32>; in read_at()
42 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, i32>; in write_at()
99 fn read_at(&self, offset: usize, len: usize, buf: &mut [u8]) -> Result<usize, i32> { in read_at()
104 let iter = BlockIter::new_multiblock(offset, offset + len, self.blk_size_log2()); in read_at()
109 let buf_begin = range.origin_begin() - offset; // 本次读操作的起始位置/已经读了这么多字节 in read_at()
110 let buf_end = range.origin_end() - offset; in read_at()
135 fn write_at(&self, offset: usize, len: usize, buf: &[u8]) -> Result<usize, i32> { in write_at()
141 let iter = BlockIter::new_multiblock(offset, offset + len, self.blk_size_log2()); in write_at()
145 let buf_begin = range.origin_begin() - offset; // 本次读操作的起始位置/已经读了这么多字节 in write_at()
146 let buf_end = range.origin_end() - offset; in write_at()
/DragonOS-0.1.5/kernel/src/driver/uart/
Duart.rs2 use core::{char, intrinsics::offset, str};
138 fn serial_received(offset: u16) -> bool { in serial_received()
139 if unsafe { io_in8(offset + 5) } & 1 != 0 { in serial_received()
146 fn is_transmit_empty(offset: u16) -> bool { in is_transmit_empty()
147 if unsafe { io_in8(offset + 5) } & 0x20 != 0 { in is_transmit_empty()
208 while *offset(str, i) != '\0' as u8 { in c_uart_send_str()
209 c_uart_send(port, *offset(str, i)); in c_uart_send_str()
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dentry.rs85 pub fn read(&self, fs: &Arc<FATFileSystem>, buf: &mut [u8], offset: u64) -> Result<usize, i32> { in read()
86 if offset >= self.size() { in read()
91 let start_cluster_number: u64 = offset / fs.bytes_per_cluster(); in read()
101 let bytes_remain: u64 = self.size() - offset; in read()
104 let mut in_cluster_offset: u64 = offset % fs.bytes_per_cluster(); in read()
131 let offset = fs.cluster_bytes_offset(current_cluster) + in_cluster_offset; in read() localVariable
133 offset as usize, in read()
161 offset: u64, in write()
163 self.ensure_len(fs, offset, buf.len() as u64)?; in write()
166 let start_cluster_num = offset / fs.bytes_per_cluster(); in write()
[all …]
/DragonOS-0.1.5/kernel/src/libs/
Dvec_cursor.rs137 SeekFrom::SeekSet(offset) => { in seek()
138 pos = offset; in seek()
140 SeekFrom::SeekCurrent(offset) => { in seek()
141 pos = self.pos as i64 + offset; in seek()
143 SeekFrom::SeekEnd(offset) => { in seek()
145 pos = self.data.len() as i64 + offset; in seek()
Dlz4.c467 LZ4_memcpy_using_offset_base(BYTE *dstPtr, const BYTE *srcPtr, BYTE *dstEnd, const size_t offset) in LZ4_memcpy_using_offset_base() argument
469 assert(srcPtr + offset == dstPtr); in LZ4_memcpy_using_offset_base()
470 if (offset < 8) in LZ4_memcpy_using_offset_base()
477 srcPtr += inc32table[offset]; in LZ4_memcpy_using_offset_base()
479 srcPtr -= dec64table[offset]; in LZ4_memcpy_using_offset_base()
515 LZ4_memcpy_using_offset(BYTE *dstPtr, const BYTE *srcPtr, BYTE *dstEnd, const size_t offset) in LZ4_memcpy_using_offset() argument
521 switch (offset) in LZ4_memcpy_using_offset()
536 LZ4_memcpy_using_offset_base(dstPtr, srcPtr, dstEnd, offset); in LZ4_memcpy_using_offset()
1185 U32 offset = 0; in LZ4_compress_generic_validated() local
1334 offset = current - matchIndex; in LZ4_compress_generic_validated()
[all …]
/DragonOS-0.1.5/docs/userland/libc/apis/api-list/
Dunistd.md23 ``off_t lseek(int fd,off_t offset,int whence)`` : 调整文件访问位置
43 将堆内存空间加上offset(注意,该系统调用只应在普通进程中调用,而不能是内核线程)
/DragonOS-0.1.5/kernel/src/mm/
Dmmap.c360 int mm_map_vma(struct vm_area_struct *vma, uint64_t paddr, uint64_t offset, uint64_t length) in mm_map_vma() argument
364 BUG_ON((offset & (PAGE_4K_SIZE - 1)) != 0); in mm_map_vma()
392 BUG_ON(vma->vm_start + offset + length > vma->vm_end); in mm_map_vma()
401 len_4k = PAGE_2M_ALIGN(vma->vm_start + offset) - (vma->vm_start + offset); in mm_map_vma()
412 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset, paddr, le… in mm_map_vma()
431 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
447 …retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
476 uint64_t offset = 0; in mm_map() local
493 offset = vaddr + mapped - vma->vm_start; in mm_map()
494 uint64_t m_len = vma->vm_end - vma->vm_start - offset; in mm_map()
[all …]
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dahci_inode.rs121 offset: usize, // lba地址 in read_at()
131 return self.0.lock().disk.read_at(offset, len, buf); in read_at()
140 offset: usize, // lba地址 in write_at()
150 return self.0.lock().disk.write_at(offset, len, buf); in write_at()
/DragonOS-0.1.5/kernel/src/driver/virtio/
Dtransport_pci.rs139 capability.offset + CAP_BAR_OFFSET, in new()
143 offset: unsafe { in new()
148 capability.offset + CAP_BAR_OFFSET_OFFSET, in new()
157 capability.offset + CAP_LENGTH_OFFSET, in new()
174 capability.offset + CAP_NOTIFY_OFF_MULTIPLIER_OFFSET, in new()
387 offset: u32, field
486 if struct_info.offset + struct_info.length > bar_size in get_bar_region()
494 + struct_info.offset as usize; in get_bar_region()
/DragonOS-0.1.5/user/libs/libc/src/
Dunistd.c54 off_t lseek(int fd, off_t offset, int whence) in lseek() argument
56 return (off_t)syscall_invoke(SYS_LSEEK, fd, offset, whence, 0, 0, 0, 0, 0); in lseek()
/DragonOS-0.1.5/kernel/src/filesystem/ramfs/
Dmod.rs121 offset: usize, in read_at()
137 let start = inode.data.len().min(offset); in read_at()
138 let end = inode.data.len().min(offset + len); in read_at()
153 offset: usize, in write_at()
173 if offset + len > data.len() { in write_at()
174 data.resize(offset + len, 0); in write_at()
177 let target = &mut data[offset..offset + len]; in write_at()
/DragonOS-0.1.5/user/libs/libc/src/include/export/
Dunistd.h45 off_t lseek(int fd, off_t offset, int whence);
/DragonOS-0.1.5/kernel/src/syscall/
Dsyscall.c207 int64_t offset; in sys_brk() local
209 offset = (int64_t)(new_brk - current_pcb->mm->brk_end); in sys_brk()
211 offset = -(int64_t)(current_pcb->mm->brk_end - new_brk); in sys_brk()
213 new_brk = mm_do_brk(current_pcb->mm->brk_end, offset); // 扩展堆内存空间 in sys_brk()
/DragonOS-0.1.5/kernel/src/driver/pci/
Dpci.h179 uint32_t pci_read_config(uchar bus, uchar slot, uchar func, uchar offset);
190 uint pci_write_config(uchar bus, uchar slot, uchar func, uchar offset, uint32_t data);
Dpci.rs446 pub offset: u8, field
463 let offset = self.next_capability_offset?; in next() localVariable
471 offset, in next()
489 offset, in next()
Dpci.c40 uint32_t pci_read_config(uchar bus, uchar slot, uchar func, uchar offset) in pci_read_config() argument
47 …uint address = (uint)((lbus << 16) | (lslot << 11) | (lfunc << 8) | (offset & 0xfc) | ((uint)0x800… in pci_read_config()
64 uint pci_write_config(uchar bus, uchar slot, uchar func, uchar offset, uint32_t data) in pci_write_config() argument
71 …uint address = (uint)((lbus << 16) | (lslot << 11) | (lfunc << 8) | (offset & 0xfc) | ((uint)0x800… in pci_write_config()
/DragonOS-0.1.5/kernel/src/filesystem/procfs/
Dmod.rs197 offset: usize, in read_status()
202 let start = _pdata.data.len().min(offset); in read_status()
203 let end = _pdata.data.len().min(offset + len); in read_status()
365 offset: usize, in read_at()
391 ProcFileType::ProcStatus => return inode.read_status(offset, len, buf, private_data), in read_at()
396 let start = inode.data.len().min(offset); in read_at()
397 let end = inode.data.len().min(offset + len); in read_at()
/DragonOS-0.1.5/kernel/src/common/
Dhid.h105 int offset; // offset of data in report member
/DragonOS-0.1.5/kernel/src/driver/hid/
Dhidparse.c251 parser->data.offset = *offset_ptr; in hid_parse()
523 …_type=%d report_id=%d, offset=%d, size=%d", data->type, data->report_id, data->offset, data->size); in __find_object()
538 (found_data.offset == data->offset)) in __find_object()
575 data->size, data->offset, data->logical_min, data->logical_max, data->attribute); in hid_parse_find_object()

12