Searched refs:offset (Results 1 - 25 of 383) sorted by relevance

1234567891011>>

/fuchsia/zircon/system/ulib/fidl/include/lib/fidl/cpp/
H A Dstring_view.h26 const char& at(size_t offset) const { return data()[offset]; }
27 char& at(size_t offset) { return mutable_data()[offset]; } argument
29 const char& operator[](size_t offset) const { return at(offset); }
30 char& operator[](size_t offset) { return at(offset); } argument
H A Dvector_view.h27 const T& at(size_t offset) const { return data()[offset]; }
28 T& at(size_t offset) { return mutable_data()[offset]; } argument
30 const T& operator[](size_t offset) const { return at(offset); }
31 T& operator[](size_t offset) { return at(offset); } argument
/fuchsia/zircon/kernel/lib/libc/string/arch/x86/
H A Dselector.cpp24 // value is a signed 8-bit value specifying an offset relative to the
33 intptr_t offset; local
35 offset = reinterpret_cast<intptr_t>(memcpy_erms) - jmp_from_address;
37 offset = reinterpret_cast<intptr_t>(memcpy_quad) - jmp_from_address;
39 DEBUG_ASSERT(offset >= -128 && offset <= 127);
41 patch->dest_addr[1] = static_cast<uint8_t>(offset);
46 // value is a signed 8-bit value specifying an offset relative to the
55 intptr_t offset; local
57 offset
[all...]
/fuchsia/zircon/system/dev/lib/amlogic/include/soc/aml-common/
H A Daml-gpu.h22 #define READ32_GPU_REG(offset) readl((uint32_t*)gpu->gpu_buffer.vaddr + offset)
23 #define WRITE32_GPU_REG(offset, value) writel(value, (uint32_t*)gpu->gpu_buffer.vaddr + offset)
25 #define READ32_HIU_REG(offset) readl((uint32_t*)gpu->hiu_buffer.vaddr + offset)
26 #define WRITE32_HIU_REG(offset, value) writel(value, (uint32_t*)gpu->hiu_buffer.vaddr + offset)
28 #define READ32_PRESET_REG(offset) readl((uint32_t*)gpu->preset_buffer.vaddr + offset)
[all...]
/fuchsia/zircon/system/dev/bus/virtio/backends/
H A Dpci_legacy.cpp16 void PciLegacyBackend::IoReadLocked(uint16_t offset, uint8_t* val) TA_REQ(lock_) {
17 *val = inp(static_cast<uint16_t>(bar0_base_ + offset));
18 zxlogf(SPEW, "%s: IoReadLocked8(%#x) = %#x\n", tag(), offset, *val);
20 void PciLegacyBackend::IoReadLocked(uint16_t offset, uint16_t* val) TA_REQ(lock_) {
21 *val = inpw(static_cast<uint16_t>(bar0_base_ + offset));
22 zxlogf(SPEW, "%s: IoReadLocked16(%#x) = %#x\n", tag(), offset, *val);
24 void PciLegacyBackend::IoReadLocked(uint16_t offset, uint32_t* val) TA_REQ(lock_) {
25 *val = inpd(static_cast<uint16_t>(bar0_base_ + offset));
26 zxlogf(SPEW, "%s: IoReadLocked32(%#x) = %#x\n", tag(), offset, *val);
28 void PciLegacyBackend::IoWriteLocked(uint16_t offset, uint8_
72 DeviceConfigRead(uint16_t offset, uint8_t* value) argument
77 DeviceConfigRead(uint16_t offset, uint16_t* value) argument
82 DeviceConfigRead(uint16_t offset, uint32_t* value) argument
87 DeviceConfigRead(uint16_t offset, uint64_t* value) argument
95 DeviceConfigWrite(uint16_t offset, uint8_t value) argument
100 DeviceConfigWrite(uint16_t offset, uint16_t value) argument
105 DeviceConfigWrite(uint16_t offset, uint32_t value) argument
109 DeviceConfigWrite(uint16_t offset, uint64_t value) argument
[all...]
H A Dbackend.h42 virtual void DeviceConfigRead(uint16_t offset, uint8_t* value) = 0;
43 virtual void DeviceConfigRead(uint16_t offset, uint16_t* value) = 0;
44 virtual void DeviceConfigRead(uint16_t offset, uint32_t* value) = 0;
45 virtual void DeviceConfigRead(uint16_t offset, uint64_t* value) = 0;
46 virtual void DeviceConfigWrite(uint16_t offset, uint8_t value) = 0;
47 virtual void DeviceConfigWrite(uint16_t offset, uint16_t value) = 0;
48 virtual void DeviceConfigWrite(uint16_t offset, uint32_t value) = 0;
49 virtual void DeviceConfigWrite(uint16_t offset, uint64_t value) = 0;
56 // Expected to read the interrupt status out of the config based on the offset/address
H A Dpci_modern.cpp16 #define cap_field(offset, field) static_cast<uint8_t>(offset + offsetof(virtio_pci_cap_t, field))
17 static void ReadVirtioCap(pci_protocol_t* pci, uint8_t offset, virtio_pci_cap& cap) { argument
18 pci_config_read8(pci, cap_field(offset, cap_vndr), &cap.cap_vndr);
19 pci_config_read8(pci, cap_field(offset, cap_next), &cap.cap_next);
20 pci_config_read8(pci, cap_field(offset, cap_len), &cap.cap_len);
21 pci_config_read8(pci, cap_field(offset, cfg_type), &cap.cfg_type);
22 pci_config_read8(pci, cap_field(offset, bar), &cap.bar);
23 pci_config_read32(pci, cap_field(offset, offset),
137 DeviceConfigRead(uint16_t offset, uint8_t* value) argument
142 DeviceConfigRead(uint16_t offset, uint16_t* value) argument
147 DeviceConfigRead(uint16_t offset, uint32_t* value) argument
152 DeviceConfigRead(uint16_t offset, uint64_t* value) argument
157 DeviceConfigWrite(uint16_t offset, uint8_t value) argument
162 DeviceConfigWrite(uint16_t offset, uint16_t value) argument
167 DeviceConfigWrite(uint16_t offset, uint32_t value) argument
172 DeviceConfigWrite(uint16_t offset, uint64_t value) argument
[all...]
/fuchsia/zircon/system/ulib/ldmsg/
H A Dldmsg.c12 static uint64_t FidlAlign(uint32_t offset) { argument
14 return (offset + alignment_mask) & ~alignment_mask;
19 size_t offset = 0; local
32 offset = sizeof(fidl_string_t);
36 offset = sizeof(ldmsg_common_t);
43 if (LDMSG_MAX_PAYLOAD - offset - 1 < len)
48 memcpy(req->data + offset, data, len);
50 *req_len_out = FidlAlign(sizeof(fidl_message_header_t) + offset + len);
56 size_t offset = 0; local
77 offset
[all...]
/fuchsia/zircon/kernel/include/kernel/
H A Drange_check.h13 // utility function to test that offset + len is entirely within a range
17 static inline bool InRange(O offset, L len, O trim_to_len) { argument
21 // trim offset/len to the range
22 if (offset + len < offset) {
23 return false; // offset + len wrapped
27 if (offset > trim_to_len) {
32 if (offset + len > trim_to_len) {
39 // utility function to trim offset + len to trim_to_len
45 static inline bool TrimRange(O offset, argument
[all...]
/fuchsia/zircon/system/dev/misc/pty/
H A Dpty-fifo.c23 size_t offset = fifo->head & PTY_FIFO_MASK; local
25 avail = PTY_FIFO_SIZE - offset;
27 memcpy(fifo->data + offset, data, len);
29 memcpy(fifo->data + offset, data, avail);
43 size_t offset = fifo->tail & PTY_FIFO_MASK; local
45 avail = PTY_FIFO_SIZE - offset;
47 memcpy(data, fifo->data + offset, len);
49 memcpy(data, fifo->data + offset, avail);
/fuchsia/zircon/system/dev/lib/amlogic/include/soc/aml-a113/
H A Da113-clocks.h24 static inline uint32_t a113_clk_get_reg(a113_clk_dev_t *dev, uint32_t offset) { argument
25 return ((volatile uint32_t *)dev->virt_regs)[offset];
28 static inline uint32_t a113_clk_set_reg(a113_clk_dev_t *dev, uint32_t offset, uint32_t value) { argument
29 ((uint32_t *)dev->virt_regs)[offset] = value;
30 return ((volatile uint32_t *)dev->virt_regs)[offset];
/fuchsia/zircon/kernel/dev/hw_rng/
H A Ddebug.cpp34 size_t offset = 0; local
36 while (offset < argv[1].u) {
40 todo = fbl::min(sizeof(bytes), argv[1].u - offset);
44 hexdump8_ex(bytes, done, offset);
45 offset += done;
49 offset, offset == 1 ? "" : "s");
/fuchsia/zircon/system/dev/audio/gauss-pdm-input/
H A Dvmo_helper.cpp53 void VmoHelper<DEBUG>::printoffsetinvmo(uint32_t offset) {} argument
55 void VmoHelper<true>::printoffsetinvmo(uint32_t offset) { argument
58 zxlogf(DEBUG1, "Current position: 0x%04x. data: ", offset);
64 for (const auto& offset : offsets) {
65 zxlogf(DEBUG1, " 0x%04x: 0x%08lx,", offset,
66 *(reinterpret_cast<uintptr_t*>(offset +
71 zxlogf(DEBUG1, "offset is at: 0x%x\n", offset);
73 if (offset > 32) {
75 static_cast<uintptr_t>(offset)
[all...]
/fuchsia/zircon/system/ulib/ddk/include/ddk/
H A Dio-buffer.h27 zx_off_t offset; member in struct:__anon909
36 // points to the page containing 'offset'.
64 zx_off_t offset, uint32_t flags);
72 zx_off_t offset, size_t size);
80 const zx_off_t offset, const size_t size);
83 zx_status_t io_buffer_cache_flush(io_buffer_t* buffer, zx_off_t offset, size_t length);
87 zx_status_t io_buffer_cache_flush_invalidate(io_buffer_t* buffer, zx_off_t offset, size_t length);
97 zx_status_t io_buffer_physmap_range(io_buffer_t* buffer, zx_off_t offset,
109 return (void*)(((uintptr_t)buffer->virt) + buffer->offset);
114 return buffer->phys + buffer->offset;
119 io_buffer_size(const io_buffer_t* buffer, size_t offset) argument
[all...]
/fuchsia/zircon/third_party/ulib/jemalloc/test/unit/
H A Dpack.c102 size_t i, j, offset; local
105 for (i = offset = 0; i < NSLABS; i++) {
122 offset = 0;
123 for (i = offset = 0;
125 i++, offset = (offset + 1) % nregs_per_run) {
128 if (offset == j)
139 offset = 0;
140 for (i = offset = 0;
142 i++, offset
[all...]
/fuchsia/zircon/system/ulib/fidl/
H A Ddecoding.cpp48 template <typename T> T* TypedAt(uint32_t offset) const {
49 return reinterpret_cast<T*>(bytes_ + offset);
70 // out-of-line offset by 8 to maintain the aligned-to-FIDL_ALIGNMENT
72 uint32_t offset = out_of_line_offset_; local
73 if (add_overflow(offset, size, &offset) ||
74 add_overflow(offset, mask, &offset)) {
77 offset &= ~mask;
79 if (offset > num_bytes
89 Frame(const fidl_type_t* fidl_type, uint32_t offset) argument
135 Frame(const fidl::FidlCodedStruct* coded_struct, uint32_t offset) argument
141 Frame(const fidl::FidlCodedUnion* coded_union, uint32_t offset) argument
148 Frame(const fidl_type_t* element, uint32_t array_size, uint32_t element_size, uint32_t offset) argument
195 uint32_t offset; member in class:__anon1059::FidlDecoder
385 uint32_t offset = frame->offset + element_offset; local
[all...]
H A Dencoding.cpp54 template <typename T> T* TypedAt(uint32_t offset) const {
55 return reinterpret_cast<T*>(bytes_ + offset);
86 // out-of-line offset by 8 to maintain the aligned-to-FIDL_ALIGNMENT
92 uint32_t offset = out_of_line_offset_; local
93 if (add_overflow(offset, size, &offset) ||
94 add_overflow(offset, mask, &offset)) {
97 offset &= ~mask;
99 if (offset > num_bytes
109 Frame(const fidl_type_t* fidl_type, uint32_t offset) argument
155 Frame(const fidl::FidlCodedStruct* coded_struct, uint32_t offset) argument
161 Frame(const fidl::FidlCodedUnion* coded_union, uint32_t offset) argument
168 Frame(const fidl_type_t* element, uint32_t array_size, uint32_t element_size, uint32_t offset) argument
215 uint32_t offset; member in class:__anon1079::FidlEncoder
416 uint32_t offset = frame->offset + element_offset; local
[all...]
H A Dvalidating.cpp45 const T* TypedAt(uint32_t offset) const {
46 return reinterpret_cast<const T*>(bytes_ + offset);
66 // out-of-line offset by 8 to maintain the aligned-to-FIDL_ALIGNMENT
68 uint32_t offset = out_of_line_offset_; local
69 if (add_overflow(offset, size, &offset) ||
70 add_overflow(offset, mask, &offset)) {
73 offset &= ~mask;
75 if (offset > num_bytes
85 Frame(const fidl_type_t* fidl_type, uint32_t offset) argument
132 Frame(const fidl::FidlCodedStruct* coded_struct, uint32_t offset) argument
139 Frame(const fidl::FidlCodedUnion* coded_union, uint32_t offset) argument
147 Frame(const fidl_type_t* element, uint32_t array_size, uint32_t element_size, uint32_t offset) argument
194 uint32_t offset; member in class:__anon1102::FidlValidator
375 uint32_t offset = frame->offset + element_offset; local
[all...]
/fuchsia/zircon/kernel/vm/include/vm/
H A Dvm_object_paged.h58 size_t AllocatedPagesInRange(uint64_t offset, uint64_t len) const override;
60 zx_status_t CommitRange(uint64_t offset, uint64_t len, uint64_t* committed) override;
61 zx_status_t DecommitRange(uint64_t offset, uint64_t len, uint64_t* decommitted) override;
63 zx_status_t Pin(uint64_t offset, uint64_t len) override;
64 void Unpin(uint64_t offset, uint64_t len) override;
66 zx_status_t Read(void* ptr, uint64_t offset, size_t len) override;
67 zx_status_t Write(const void* ptr, uint64_t offset, size_t len) override;
68 zx_status_t Lookup(uint64_t offset, uint64_t len, uint pf_flags,
71 zx_status_t ReadUser(user_out_ptr<void> ptr, uint64_t offset, size_t len) override;
72 zx_status_t WriteUser(user_in_ptr<const void> ptr, uint64_t offset, size_
[all...]
H A Dvm_object.h30 typedef zx_status_t (*vmo_lookup_fn_t)(void* context, size_t offset, size_t index, paddr_t pa);
61 // object where (offset <= page_offset < offset+len).
62 // |offset| and |len| are in bytes.
63 virtual size_t AllocatedPagesInRange(uint64_t offset, uint64_t len) const { argument
72 virtual zx_status_t CommitRange(uint64_t offset, uint64_t len, uint64_t* committed) { argument
77 virtual zx_status_t DecommitRange(uint64_t offset, uint64_t len, uint64_t* decommitted) { argument
83 virtual zx_status_t Pin(uint64_t offset, uint64_t len) { argument
90 virtual void Unpin(uint64_t offset, uint64_t len) { argument
95 virtual zx_status_t Read(void* ptr, uint64_t offset, size_ argument
98 Write(const void* ptr, uint64_t offset, size_t len) argument
103 Lookup(uint64_t offset, uint64_t len, uint pf_flags, vmo_lookup_fn_t lookup_fn, void* context) argument
109 ReadUser(user_out_ptr<void> ptr, uint64_t offset, size_t len) argument
112 WriteUser(user_in_ptr<const void> ptr, uint64_t offset, size_t len) argument
117 LookupUser(uint64_t offset, uint64_t len, user_inout_ptr<paddr_t> buffer, size_t buffer_size) argument
147 InvalidateCache(const uint64_t offset, const uint64_t len) argument
150 CleanCache(const uint64_t offset, const uint64_t len) argument
153 CleanInvalidateCache(const uint64_t offset, const uint64_t len) argument
156 SyncCache(const uint64_t offset, const uint64_t len) argument
170 CloneCOW(bool resizable, uint64_t offset, uint64_t size, bool copy_name, fbl::RefPtr<VmObject>* clone_vmo) argument
[all...]
/fuchsia/zircon/system/ulib/hwreg/include/hwreg/
H A Dmmio.h20 // Write |val| to the |sizeof(IntType)| byte field located |offset| bytes from
22 template <class IntType> void Write(uint32_t offset, IntType val) { argument
25 auto ptr = reinterpret_cast<volatile IntType*>(mmio_ + offset);
29 // Read the value of the |sizeof(IntType)| byte field located |offset| bytes from
31 template <class IntType> IntType Read(uint32_t offset) { argument
34 auto ptr = reinterpret_cast<volatile IntType*>(mmio_ + offset);
/fuchsia/zircon/system/ulib/zx/
H A Dvmar.cpp11 zx_status_t vmar::allocate(size_t offset, size_t size, zx_vm_option_t options, argument
16 get(), options, offset, size, h.reset_and_get_address(), child_addr);
/fuchsia/zircon/kernel/vm/
H A Dvm_page_list.cpp21 VmPageListNode::VmPageListNode(uint64_t offset) argument
22 : obj_offset_(offset) {
23 LTRACEF("%p offset %#" PRIx64 "\n", this, obj_offset_);
27 LTRACEF("%p offset %#" PRIx64 "\n", this, obj_offset_);
74 zx_status_t VmPageList::AddPage(vm_page* p, uint64_t offset) {
75 uint64_t node_offset = ROUNDDOWN(offset, PAGE_SIZE * VmPageListNode::kPageFanOut);
76 size_t index = (offset >> PAGE_SIZE_SHIFT) % VmPageListNode::kPageFanOut;
78 LTRACEF_LEVEL(2, "%p page %p, offset %#" PRIx64 " node_offset %#" PRIx64 " index %zu\n", this, p, offset,
103 vm_page* VmPageList::GetPage(uint64_t offset) {
[all...]
H A Dvm_object_paged.cpp238 zx_status_t VmObjectPaged::CloneCOW(bool resizable, uint64_t offset, uint64_t size,
240 LTRACEF("vmo %p offset %#" PRIx64 " size %#" PRIx64 "\n", this, offset, size);
271 // set the offset with the parent
272 status = vmo->SetParentOffsetLocked(offset);
308 auto f = [depth](const auto p, uint64_t offset) {
312 printf("offset %#" PRIx64 " page %p paddr %#" PRIxPTR "\n", offset, p, p->paddr());
319 size_t VmObjectPaged::AllocatedPagesInRange(uint64_t offset, uint64_t len) const {
323 if (!TrimRange(offset, le
[all...]
/fuchsia/zircon/system/ulib/ddk/
H A Dphys-iter.c13 iter->offset = 0;
32 zx_off_t offset = iter->offset; local
35 if (offset >= length) {
38 size_t remaining = length - offset;
46 *out_paddr = phys_addrs[0] + offset + align_adjust;
52 iter->offset += return_length;
56 if (offset == 0 && align_adjust > 0) {
67 iter->offset += return_length;
102 iter->offset
[all...]

Completed in 165 milliseconds

1234567891011>>