| /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 …]
|
| /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/i386/i386/ |
| H A D | minidump_machdep_base.c | 79 maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); in blk_write() 81 maxdumpsz = PAGE_SIZE; in blk_write() 83 if ((sz % PAGE_SIZE) != 0) { in blk_write() 91 if (pa != 0 && (((uintptr_t)ptr) % PAGE_SIZE) != 0) { in blk_write() 116 for (i = 0; i < len; i += PAGE_SIZE) in blk_write() 180 ptesize += PAGE_SIZE; in cpu_minidumpsys() 190 pa += PAGE_SIZE; in cpu_minidumpsys() 220 dumpsize += PAGE_SIZE; in cpu_minidumpsys() 225 dumpsize += PAGE_SIZE; in cpu_minidumpsys() 253 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 …]
|
| H A D | kexec_support.c | 72 vm_size_t stride = do_pte ? PAGE_SIZE : NBPDR; in kexec_generate_page_tables() 117 l++, pg += PAGE_SIZE) { in kexec_generate_page_tables() 168 va += PAGE_SIZE; in kexec_load_md() 172 va += PAGE_SIZE; in kexec_load_md() 176 va += PAGE_SIZE; in kexec_load_md() 210 PAGE_SIZE, true, false, &pct_iter); in kexec_load_md() 290 pages += howmany(pages * PAGE_SIZE, NBPDR); in kexec_md_pages() 291 pages += howmany(pages * PAGE_SIZE, NBPDP); in kexec_md_pages() 292 pages += howmany(pages * PAGE_SIZE, NBPML4); in kexec_md_pages() 295 pages += howmany(kexec_do_reboot_size, PAGE_SIZE); in kexec_md_pages()
|
| /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)
|
| 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/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() 231 error = blk_write(di, dumpbuf, 0, PAGE_SIZE); in cpu_minidumpsys() 249 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() 260 page = offset / PAGE_SIZE; in bpf_zerocopy_append_bytes() 261 poffset = offset % PAGE_SIZE; in bpf_zerocopy_append_bytes() 266 count = min(len, PAGE_SIZE - poffset); in bpf_zerocopy_append_bytes() 270 if (poffset == PAGE_SIZE) { in bpf_zerocopy_append_bytes() 274 KASSERT(poffset < PAGE_SIZE, in bpf_zerocopy_append_bytes() 315 page = offset / PAGE_SIZE; in bpf_zerocopy_append_mbuf() [all …]
|
| /freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/stat/ |
| H A D | statx_dioalign.ksh | 87 typeset -i PAGE_SIZE=$(getconf PAGE_SIZE) 115 assert_dioalign $TESTFILE $PAGE_SIZE 131072 126 assert_dioalign $TESTFILE $PAGE_SIZE $rs 137 assert_dioalign $TESTFILE $PAGE_SIZE 65536 154 assert_dioalign $TESTFILE $PAGE_SIZE 131072 169 assert_dioalign $TESTFILE $PAGE_SIZE 16384 176 assert_dioalign $TESTFILE $PAGE_SIZE 16384 184 assert_dioalign $TESTFILE $PAGE_SIZE 16384
|
| /freebsd/sys/arm64/include/ |
| H A D | pte.h | 87 #if PAGE_SIZE == PAGE_SIZE_4K 89 #elif PAGE_SIZE == PAGE_SIZE_16K 166 #if PAGE_SIZE == PAGE_SIZE_4K 171 #elif PAGE_SIZE == PAGE_SIZE_16K 216 #if PAGE_SIZE == PAGE_SIZE_4K 219 #elif PAGE_SIZE == PAGE_SIZE_16K 237 #if PAGE_SIZE == PAGE_SIZE_4K 240 #elif PAGE_SIZE == PAGE_SIZE_16K
|
| /freebsd/sys/contrib/vchiq/interface/vchiq_arm/ |
| H A D | vchiq_2835_arm.c | 139 if(offset + count > PAGE_SIZE){ return EINVAL; } in invalidate_cachelines_in_range_of_ppage() 154 if (start >= PAGE_SIZE) in invalidate_cachelines_in_range_of_ppage_seq() 161 offset = offset & (PAGE_SIZE - 1); in invalidate_cachelines_in_range_of_ppage_seq() 163 p++, done += PAGE_SIZE - offset, offset = 0) { in invalidate_cachelines_in_range_of_ppage_seq() 164 size_t in_page = PAGE_SIZE - offset; in invalidate_cachelines_in_range_of_ppage_seq() 210 PAGE_SIZE, 0, /* alignment, boundary */ in vchiq_platform_init() 237 WARN_ON(((size_t)g_slot_mem & (PAGE_SIZE - 1)) != 0); in vchiq_platform_init() 474 offset = (vm_offset_t)buf & (PAGE_SIZE - 1); in create_pagelist() 475 num_pages = (count + offset + PAGE_SIZE - 1) / PAGE_SIZE; in create_pagelist() 490 PAGE_SIZE, 0, /* alignment, boundary */ in create_pagelist() [all …]
|
| /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/include/ |
| H A D | param.h | 100 #define PAGE_SIZE (1 << PAGE_SHIFT) /* Page size */ macro 101 #define PAGE_MASK (PAGE_SIZE - 1) 102 #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t))) 103 #define NPDEPG (PAGE_SIZE/(sizeof (pt_entry_t))) 129 #define USPACE (kstack_pages * PAGE_SIZE) /* total size of pcb */
|
| /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()
|