/freebsd/tests/sys/kern/ |
H A D | subr_physmem_test.c | 41 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 D | minidump_machdep.c | 88 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 D | locore.S | 42 #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 D | minidump_machdep.c | 63 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 D | drm_buffer.c | 46 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 D | drm_buffer.h | 53 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 D | xdma_iommu.c | 68 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 D | param.h | 93 #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 D | intr_machdep.h | 42 #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 D | minidump_machdep_base.c | 82 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 D | minidump_machdep.c | 91 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 D | minidump_machdep.c | 83 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 D | memguard.c | 173 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 D | vm_dumpset.h | 56 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 D | minidump_machdep.c | 69 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 D | brk_test.c | 56 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 D | bpf_zerocopy.c | 161 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 D | param.h | 107 #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 D | page.h | 82 #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 D | swapoff3.sh | 65 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 D | mthca_allocator.c | 116 #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 D | plpar_iommu.c | 138 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 D | qls_def.h | 76 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 D | param.h | 86 #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 D | pst-iop.c | 246 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...] |