Home
last modified time | relevance | path

Searched refs:PAGE_SIZE (Results 1 – 25 of 872) sorted by relevance

12345678910>>...35

/freebsd/tests/sys/kern/
H A Dsubr_physmem_test.c41 physmem_hardware_region(2 * PAGE_SIZE, PAGE_SIZE); in ATF_TC_BODY()
45 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY()
46 ATF_CHECK_EQ(avail[1], 3 * PAGE_SIZE); in ATF_TC_BODY()
49 physmem_hardware_region(2 * PAGE_SIZE, 2 * PAGE_SIZE); in ATF_TC_BODY()
52 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY()
53 ATF_CHECK_EQ(avail[1], 4 * PAGE_SIZE); in ATF_TC_BODY()
56 physmem_hardware_region(4 * PAGE_SIZE, PAGE_SIZE); in ATF_TC_BODY()
59 ATF_CHECK_EQ(avail[0], 2 * PAGE_SIZE); in ATF_TC_BODY()
60 ATF_CHECK_EQ(avail[1], 5 * PAGE_SIZE); in ATF_TC_BODY()
63 physmem_hardware_region(4 * PAGE_SIZE, 2 * PAGE_SIZE); in ATF_TC_BODY()
[all …]
/freebsd/sys/arm64/arm64/
H A Dminidump_machdep.c88 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
90 maxdumpsz = PAGE_SIZE; in blk_write()
92 if ((sz % PAGE_SIZE) != 0) { in blk_write()
100 if ((((uintptr_t)pa) % PAGE_SIZE) != 0) { in blk_write()
177 pmapsize += PAGE_SIZE; in cpu_minidumpsys()
186 i++, pa += PAGE_SIZE) in cpu_minidumpsys()
190 pmapsize += (Ln_ENTRIES - 1) * PAGE_SIZE; in cpu_minidumpsys()
194 for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { in cpu_minidumpsys()
221 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
225 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
[all …]
H A Dlocore.S42 #if PAGE_SIZE == PAGE_SIZE_16K
53 #define BOOT_STACK_SIZE (KSTACK_PAGES * PAGE_SIZE)
490 #if PAGE_SIZE == PAGE_SIZE_4K
493 #elif PAGE_SIZE == PAGE_SIZE_16K
564 #if PAGE_SIZE != PAGE_SIZE_4K
591 #if PAGE_SIZE != PAGE_SIZE_4K
593 ldr x9, =(PAGE_SIZE * L3_PAGE_COUNT)
603 add x26, x26, #PAGE_SIZE
611 add x24, x26, #PAGE_SIZE
623 add x27, x24, #PAGE_SIZE
[all …]
/freebsd/sys/riscv/riscv/
H A Dminidump_machdep.c63 static uint64_t tmpbuffer[PAGE_SIZE / sizeof(uint64_t)];
93 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
95 maxdumpsz = PAGE_SIZE; in blk_write()
97 if ((sz % PAGE_SIZE) != 0) { in blk_write()
105 if ((((uintptr_t)pa) % PAGE_SIZE) != 0) { in blk_write()
184 pmapsize += PAGE_SIZE; in cpu_minidumpsys()
196 for (i = 0; i < Ln_ENTRIES; i++, pa += PAGE_SIZE) { in cpu_minidumpsys()
206 pa = (l3e >> PTE_PPN0_S) * PAGE_SIZE; in cpu_minidumpsys()
223 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
227 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
[all …]
/freebsd/sys/dev/drm2/
H A Ddrm_buffer.c46 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_alloc()
57 malloc(min(PAGE_SIZE, size - idx * PAGE_SIZE), in drm_buffer_alloc()
75 int nr_pages = size / PAGE_SIZE + 1; in drm_buffer_copy_from_user()
88 (char *)user_data + idx * PAGE_SIZE, in drm_buffer_copy_from_user()
89 min(PAGE_SIZE, size - idx * PAGE_SIZE))) { in drm_buffer_copy_from_user()
110 int nr_pages = buf->size / PAGE_SIZE + 1; in drm_buffer_free()
139 if (idx + objsize <= PAGE_SIZE) { in drm_buffer_read_object()
143 int beginsz = PAGE_SIZE - idx; in drm_buffer_read_object()
H A Ddrm_buffer.h53 return buf->iterator / PAGE_SIZE; in drm_buffer_page()
60 return buf->iterator & (PAGE_SIZE - 1); in drm_buffer_index()
132 return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; in drm_buffer_pointer_to_dword()
146 return &buffer->data[iter / PAGE_SIZE][iter & (PAGE_SIZE - 1)]; in drm_buffer_pointer_to_byte()
/freebsd/sys/dev/xdma/
H A Dxdma_iommu.c68 va &= ~(PAGE_SIZE - 1); in xdma_iommu_remove_entry()
69 pmap_remove(&xio->p, va, va + PAGE_SIZE); in xdma_iommu_remove_entry()
73 vmem_free(xio->vmem, va, PAGE_SIZE); in xdma_iommu_remove_entry()
88 for (; size > 0; size -= PAGE_SIZE) { in xdma_iommu_enter()
94 va += PAGE_SIZE; in xdma_iommu_enter()
95 pa += PAGE_SIZE; in xdma_iommu_enter()
106 size = roundup2(size, PAGE_SIZE); in xdma_iommu_add_entry()
114 addr |= pa & (PAGE_SIZE - 1); in xdma_iommu_add_entry()
142 xio->vmem = vmem_create("xDMA vmem", 0, 0, PAGE_SIZE, in xdma_iommu_init()
143 PAGE_SIZE, M_FIRSTFIT | M_WAITOK); in xdma_iommu_init()
/freebsd/sys/amd64/include/
H A Dparam.h93 #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
96 #define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */ macro
97 #define PAGE_MASK (PAGE_SIZE-1)
99 #define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
105 #define NPDPEPG (PAGE_SIZE/(sizeof (pdp_entry_t)))
111 #define NPML4EPG (PAGE_SIZE/(sizeof (pml4_entry_t)))
117 #define NPML5EPG (PAGE_SIZE/(sizeof (pml5_entry_t)))
131 #define IOPERM_BITMAP_SIZE (IOPAGES * PAGE_SIZE + 1)
157 #define pgtok(x) ((unsigned long)(x) * (PAGE_SIZE / 1024))
H A Dintr_machdep.h42 #define DBLFAULT_STACK_SIZE PAGE_SIZE
43 #define NMI_STACK_SIZE PAGE_SIZE
44 #define MCE_STACK_SIZE PAGE_SIZE
45 #define DBG_STACK_SIZE PAGE_SIZE
/freebsd/sys/i386/i386/
H A Dminidump_machdep_base.c82 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
84 maxdumpsz = PAGE_SIZE; in blk_write()
86 if ((sz % PAGE_SIZE) != 0) { in blk_write()
94 if (pa != 0 && (((uintptr_t)ptr) % PAGE_SIZE) != 0) { in blk_write()
119 for (i = 0; i < len; i += PAGE_SIZE) in blk_write()
183 ptesize += PAGE_SIZE; in cpu_minidumpsys()
193 pa += PAGE_SIZE; in cpu_minidumpsys()
223 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
228 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
256 error = blk_write(di, (char *)&fakept, 0, PAGE_SIZE); in cpu_minidumpsys()
[all …]
/freebsd/sys/amd64/amd64/
H A Dminidump_machdep.c91 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
93 maxdumpsz = PAGE_SIZE; in blk_write()
95 if ((sz % PAGE_SIZE) != 0) { in blk_write()
103 if ((((uintptr_t)pa) % PAGE_SIZE) != 0) { in blk_write()
135 for (i = 0; i < len; i += PAGE_SIZE) in blk_write()
194 pmapsize += PAGE_SIZE; in cpu_minidumpsys()
214 pa += PAGE_SIZE; in cpu_minidumpsys()
233 pa += PAGE_SIZE; in cpu_minidumpsys()
265 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
270 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
[all...]
/freebsd/sys/arm/arm/
H A Dminidump_machdep.c83 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
85 maxdumpsz = PAGE_SIZE; in blk_write()
92 if ((sz % PAGE_SIZE) != 0) { in blk_write()
122 for (i = 0; i < len; i += PAGE_SIZE) in blk_write()
147 static char dumpbuf[PAGE_SIZE] __aligned(sizeof(uint64_t));
181 for (va = KERNBASE; va < kva_end; va += PAGE_SIZE) { in cpu_minidumpsys()
197 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
201 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
230 error = blk_write(di, dumpbuf, 0, PAGE_SIZE); in cpu_minidumpsys()
248 error = blk_write(di, dumpbuf, 0, PAGE_SIZE); in cpu_minidumpsys()
[all …]
/freebsd/sys/vm/
H A Dmemguard.c173 PAGE_SIZE; in memguard_fudge()
186 memguard_physlimit = (mem_pgs / vm_memguard_divisor) * PAGE_SIZE; in memguard_fudge()
194 if (memguard_mapsize / (2 * PAGE_SIZE) > mem_pgs) in memguard_fudge()
195 memguard_mapsize = mem_pgs * 2 * PAGE_SIZE; in memguard_fudge()
213 PAGE_SIZE, 0, M_WAITOK); in memguard_init()
306 size_v += 2 * PAGE_SIZE; in memguard_alloc()
315 req_size < PAGE_SIZE) { in memguard_alloc()
334 addr += PAGE_SIZE; in memguard_alloc()
345 if (req_size < PAGE_SIZE) { in memguard_alloc()
346 memguard_wasted += (PAGE_SIZE - req_size); in memguard_alloc()
[all …]
H A Dvm_dumpset.h56 adj += howmany(dump_avail[i + 1], PAGE_SIZE) - in vm_page_dump_add()
57 dump_avail[i] / PAGE_SIZE; in vm_page_dump_add()
75 adj += howmany(dump_avail[i + 1], PAGE_SIZE) - in vm_page_dump_drop()
76 dump_avail[i] / PAGE_SIZE; in vm_page_dump_drop()
86 tot = howmany(dump_avail[i + 1], PAGE_SIZE) - in vm_page_dump_index_to_pa()
87 dump_avail[i] / PAGE_SIZE; in vm_page_dump_index_to_pa()
89 return ((vm_paddr_t)bit * PAGE_SIZE + in vm_page_dump_index_to_pa()
/freebsd/sys/powerpc/powerpc/
H A Dminidump_machdep.c69 static char pgbuf[PAGE_SIZE];
103 maxdumpsz = MIN(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write()
105 maxdumpsz = PAGE_SIZE; in blk_write()
107 if ((sz % PAGE_SIZE) != 0) { in blk_write()
115 if ((pa % PAGE_SIZE) != 0) { in blk_write()
142 for (i = 0; i < len; i += PAGE_SIZE) in blk_write()
176 ctx = dumpsys_dump_pmap_init(sizeof(pgbuf) / PAGE_SIZE); in dump_pmap()
207 if (pmapsize % PAGE_SIZE != 0) { in cpu_minidumpsys()
214 dumpsize = PAGE_SIZE; /* header */ in cpu_minidumpsys()
222 dumpsize += PAGE_SIZE; in cpu_minidumpsys()
[all …]
/freebsd/lib/libc/tests/sys/
H A Dbrk_test.c56 error = brk((void *)((intptr_t)oldbrk + PAGE_SIZE * 2)); in ATF_TC_BODY()
89 oldbrk = sbrk(PAGE_SIZE * 2 + 1); in ATF_TC_BODY()
91 memset(oldbrk, 0, PAGE_SIZE * 2 + 1); in ATF_TC_BODY()
92 newbrk = sbrk(-(PAGE_SIZE * 2 + 1)); in ATF_TC_BODY()
120 newbrk = sbrk(PAGE_SIZE * 2); in ATF_TC_BODY()
123 n = (void *)(((uintptr_t)oldbrk + PAGE_SIZE) & ~PAGE_SIZE); in ATF_TC_BODY()
125 error = mincore(n, PAGE_SIZE, &v); in ATF_TC_BODY()
/freebsd/sys/net/
H A Dbpf_zerocopy.c161 if (vm_fault_quick_hold_pages(map, uaddr, PAGE_SIZE, VM_PROT_READ | in zbuf_sfbuf_get()
201 if ((len / PAGE_SIZE) > BPF_MAX_PAGES) in zbuf_setup()
211 zb->zb_numpages = len / PAGE_SIZE; in zbuf_setup()
217 uaddr + (i * PAGE_SIZE)); in zbuf_setup()
261 page = offset / PAGE_SIZE; in bpf_zerocopy_append_bytes()
262 poffset = offset % PAGE_SIZE; in bpf_zerocopy_append_bytes()
267 count = min(len, PAGE_SIZE - poffset); in bpf_zerocopy_append_bytes()
271 if (poffset == PAGE_SIZE) { in bpf_zerocopy_append_bytes()
275 KASSERT(poffset < PAGE_SIZE, in bpf_zerocopy_append_bytes()
316 page = offset / PAGE_SIZE; in bpf_zerocopy_append_mbuf()
[all …]
/freebsd/sys/powerpc/include/
H A Dparam.h107 #define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ macro
108 #define PAGE_MASK (PAGE_SIZE - 1)
109 #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
110 #define NPDEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
136 #define USPACE (kstack_pages * PAGE_SIZE) /* total size of pcb */
156 #define pgtok(x) ((x) * (PAGE_SIZE / 1024UL))
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dpage.h82 #define clear_page(page) memset(page, 0, PAGE_SIZE)
93 #define PAGE_MASK (~(PAGE_SIZE-1))
100 #define btoc(x) (((vm_offset_t)(x) + PAGE_SIZE - 1) >> PAGE_SHIFT)
102 #define round_page(x) ((((uintptr_t)(x)) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))
104 #define trunc_page(x) ((uintptr_t)(x) & ~(PAGE_SIZE - 1))
/freebsd/tools/test/stress2/misc/
H A Dswapoff3.sh65 len = (size_t)free * PAGE_SIZE + swap / 4;
71 res = malloc(howmany(len, PAGE_SIZE));
75 for (i = 0; i < len; i += PAGE_SIZE)
81 for (i = 0; i < howmany(len, PAGE_SIZE); i++)
83 naddr = addr + i * PAGE_SIZE;
84 if (munmap(naddr, PAGE_SIZE) != 0)
86 if (mmap(naddr, PAGE_SIZE,
/freebsd/sys/dev/mthca/
H A Dmthca_allocator.c116 #define MTHCA_ARRAY_MASK (PAGE_SIZE / sizeof (void *) - 1)
162 int npage = (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; in mthca_array_init()
181 for (i = 0; i < (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; ++i) in mthca_array_cleanup()
231 npages = (size + PAGE_SIZE - 1) / PAGE_SIZE; in mthca_buf_alloc()
248 dma_alloc_coherent(&dev->pdev->dev, PAGE_SIZE, in mthca_buf_alloc()
294 for (i = 0; i < (size + PAGE_SIZE - 1) / PAGE_SIZE; ++i) in mthca_buf_free()
295 dma_free_coherent(&dev->pdev->dev, PAGE_SIZE, in mthca_buf_free()
/freebsd/sys/powerpc/pseries/
H A Dplpar_iommu.c138 window->map->vmem = vmem_create("IOMMU mappings", PAGE_SIZE, in phyp_iommu_set_dma_tag()
139 trunc_page(VMEM_ADDR_MAX) - PAGE_SIZE, PAGE_SIZE, 0, in phyp_iommu_set_dma_tag()
181 (alignment < PAGE_SIZE) ? PAGE_SIZE : alignment, 0, in phyp_iommu_map()
187 KASSERT(alloced % PAGE_SIZE == 0, ("Alloc not page aligned")); in phyp_iommu_map()
194 for (j = 0; j < allocsize; j += PAGE_SIZE) { in phyp_iommu_map()
232 roundedsize/PAGE_SIZE); in phyp_iommu_unmap()
234 for (j = 0; j < roundedsize; j += PAGE_SIZE) in phyp_iommu_unmap()
/freebsd/sys/dev/qlxge/
H A Dqls_def.h76 PAGE_SIZE + \
77 (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1))
145 ((QLA_LBQ_SIZE + PAGE_SIZE + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1))
153 ((QLA_SBQ_SIZE + PAGE_SIZE + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1))
/freebsd/sys/i386/include/
H A Dparam.h86 #define PAGE_SIZE (1 << PAGE_SHIFT) /* bytes/page */ macro
87 #define PAGE_MASK (PAGE_SIZE - 1)
88 #define NPTEPG (PAGE_SIZE / sizeof(pt_entry_t))
95 #define NPDEPG (PAGE_SIZE / sizeof(pd_entry_t))
158 #define pgtok(x) ((x) * (PAGE_SIZE / 1024))
/freebsd/sys/dev/pst/
H A Dpst-iop.c246 PAGE_SIZE, 0))) { in iop_init_outqueue()
260 msg->host_pagesize = PAGE_SIZE; in iop_init_outqueue()
297 #define ALLOCSIZE (PAGE_SIZE + (256 * sizeof(struct i2o_lct_entry))) in iop_get_lct()
300 0x00010000, 0xFFFFFFFF, PAGE_SIZE, 0))) in iop_get_lct()
343 if (!(param = contigmalloc(PAGE_SIZE, M_PSTIOP, M_NOWAIT | M_ZERO, in iop_get_util_params()
344 0x00010000, 0xFFFFFFFF, PAGE_SIZE, 0))) in iop_get_util_params()
347 if (!(reply = contigmalloc(PAGE_SIZE, M_PSTIOP, M_NOWAIT | M_ZERO, in iop_get_util_params()
348 0x00010000, 0xFFFFFFFF, PAGE_SIZE, 0))) in iop_get_util_params()
372 msg->sgl[1].count = PAGE_SIZE; in iop_get_util_params()
481 sgl_count = min(count, (PAGE_SIZE in iop_create_sgl()
[all...]

12345678910>>...35