Home
last modified time | relevance | path

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

1234567

/xnu-8020.140.41/bsd/vm/
H A Dvnode_pager.c413 base_index = upl_offset / PAGE_SIZE; in vnode_pageout()
415 for (pg_index = (upl_offset + isize) / PAGE_SIZE; pg_index > base_index;) { in vnode_pageout()
431 isize = ((pg_index + 1) - base_index) * PAGE_SIZE; in vnode_pageout()
448 for (offset = upl_offset; isize; isize -= PAGE_SIZE, offset += PAGE_SIZE) { in vnode_pageout()
461 ubc_upl_abort_range(upl, offset, PAGE_SIZE, UPL_ABORT_FREE_ON_EMPTY); in vnode_pageout()
468 ubc_upl_commit_range(upl, offset, PAGE_SIZE, UPL_COMMIT_FREE_ON_EMPTY); in vnode_pageout()
470 f_offset += PAGE_SIZE; in vnode_pageout()
488 f_offset += PAGE_SIZE; in vnode_pageout()
489 offset += PAGE_SIZE; in vnode_pageout()
490 isize -= PAGE_SIZE; in vnode_pageout()
[all …]
/xnu-8020.140.41/tools/tests/superpages/
H A Dmeasure_tlbs.c29 mach_vm_size_t size = SUPERPAGE_ROUND_UP(pages * PAGE_SIZE); /* allocate full superpages */ in testt()
42 sum += data[p * PAGE_SIZE]; in testt()
51 data[p * PAGE_SIZE] = run & 0xFF; in testt()
57 sum += data[p * PAGE_SIZE]; in testt()
64 for (run = 0; run < RUNS1 / PAGE_SIZE; run++) { in testt()
65 for (i = 0; i < pages * PAGE_SIZE; i++) { in testt()
70 for (run = 0; run < RUNS1 / PAGE_SIZE; run++) { in testt()
71 for (i = 0; i < pages * PAGE_SIZE; i++) { in testt()
85 p2 = p % (pages * PAGE_SIZE / NODE_SIZE); in testt()
94 p2 = p % (pages * PAGE_SIZE / NODE_SIZE); in testt()
H A Dtestsp.c117 for (i = 0; i < size / PAGE_SIZE; i++) { in check_nr()
118 if ((ret = check_r(addr + i * PAGE_SIZE, PAGE_SIZE, res))) { in check_nr()
150 for (i = 0; i < size / PAGE_SIZE; i++) { in check_nw()
151 if ((ret = check_w(addr + i * PAGE_SIZE, PAGE_SIZE))) { in check_nw()
253 mach_vm_size_t size = 2 * PAGE_SIZE; /* will be rounded up to some superpage size */ in test_allocate_size_any()
343 mach_vm_size_t size = PAGE_SIZE; /* != 2 MB */ in test_allocateoddsize()
371 kr = mach_vm_deallocate(mach_task_self(), addr + PAGE_SIZE, size); in test_deallocatesubpage()
399 for (i = 0; i < SUPERPAGE_SIZE / PAGE_SIZE; i++) { in test_reallocate()
400 addr2 = addr + i * PAGE_SIZE; in test_reallocate()
401 size = PAGE_SIZE; in test_reallocate()
[all …]
/xnu-8020.140.41/osfmk/i386/
H A Dpmap_x86_common.c544 PMAP_UPDATE_TLBS(pmap, vaddr, vaddr + PAGE_SIZE); in pmap_update_cache_attributes_locked()
776 PAGE_SIZE); in pmap_enter_options()
781 PAGE_SIZE); in pmap_enter_options()
785 PAGE_SIZE); in pmap_enter_options()
873 pmap_ledger_credit(pmap, task_ledgers.wired_mem, PAGE_SIZE); in pmap_enter_options()
877 pmap_ledger_debit(pmap, task_ledgers.wired_mem, PAGE_SIZE); in pmap_enter_options()
954 PMAP_UPDATE_TLBS(pmap, vaddr, vaddr + PAGE_SIZE); in pmap_enter_options()
973 pmap_ledger_debit(pmap, task_ledgers.phys_mem, PAGE_SIZE); in pmap_enter_options()
978 pmap_ledger_debit(pmap, task_ledgers.internal, PAGE_SIZE); in pmap_enter_options()
979 pmap_ledger_debit(pmap, task_ledgers.alternate_accounting, PAGE_SIZE); in pmap_enter_options()
[all …]
H A Dphys.c98 bzero_phys((addr64_t)i386_ptob(pn), PAGE_SIZE); in pmap_zero_page()
113 assert(offset + len <= PAGE_SIZE); in pmap_zero_part_page()
138 assert((((uintptr_t)dst & PAGE_MASK) + dst_offset + len) <= PAGE_SIZE); in pmap_copy_part_page()
139 assert((((uintptr_t)src & PAGE_MASK) + src_offset + len) <= PAGE_SIZE); in pmap_copy_part_page()
159 assert((dst_offset + len) <= PAGE_SIZE); in pmap_copy_part_lpage()
175 assert((src_offset + len) <= PAGE_SIZE); in pmap_copy_part_rpage()
H A Dpanic_hooks.c49 typedef char check2_[PAGE_SIZE == 4096 ? 1 : -1];
127 for (; len > 0; addr = (const uint8_t *)addr + PAGE_SIZE, len -= PAGE_SIZE) { in panic_dump_mem()
199 if (r->PhysicalStart + r->NumberOfPages * PAGE_SIZE > *pphys) { in panic_phys_range_before()
214 range->len = closest->NumberOfPages * PAGE_SIZE; in panic_phys_range_before()
H A Dpmap.h120 #define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
121 #define NPTDPG (PAGE_SIZE/(sizeof (pd_entry_t)))
125 #define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
133 #define NPML4PG (PAGE_SIZE/(sizeof (pml4_entry_t)))
141 #define NPDPTPG (PAGE_SIZE/(sizeof (pdpt_entry_t)))
149 #define NPDPG (PAGE_SIZE/(sizeof (pd_entry_t)))
157 #define NPTPG (PAGE_SIZE/(sizeof (pt_entry_t)))
196 #define NPML4PGS (1ULL * (PAGE_SIZE/(sizeof (pml4_entry_t))))
197 #define NPDPTPGS (NPML4PGS * (PAGE_SIZE/(sizeof (pdpt_entry_t))))
198 #define NPDEPGS (NPDPTPGS * (PAGE_SIZE/(sizeof (pd_entry_t))))
[all …]
/xnu-8020.140.41/osfmk/vm/
H A Dvm_tests.c86 backing_size = 15 * PAGE_SIZE; in vm_test_collapse_compressor()
103 backing_address[0x1 * PAGE_SIZE] = 0xB1; in vm_test_collapse_compressor()
104 backing_address[0x4 * PAGE_SIZE] = 0xB4; in vm_test_collapse_compressor()
105 backing_address[0x7 * PAGE_SIZE] = 0xB7; in vm_test_collapse_compressor()
106 backing_address[0xa * PAGE_SIZE] = 0xBA; in vm_test_collapse_compressor()
107 backing_address[0xd * PAGE_SIZE] = 0xBD; in vm_test_collapse_compressor()
122 backing_address[0x0 * PAGE_SIZE] = 0xB0; in vm_test_collapse_compressor()
123 backing_address[0x3 * PAGE_SIZE] = 0xB3; in vm_test_collapse_compressor()
124 backing_address[0x6 * PAGE_SIZE] = 0xB6; in vm_test_collapse_compressor()
125 backing_address[0x9 * PAGE_SIZE] = 0xB9; in vm_test_collapse_compressor()
[all …]
H A Dvm_compressor_pager.c252 assert(pager_page_size == PAGE_SIZE); in compressor_memory_object_init()
465 if ((uint32_t)(offset / PAGE_SIZE) != (offset / PAGE_SIZE)) { in compressor_memory_object_data_request()
482 if (offset / PAGE_SIZE >= pager->cpgr_num_slots) { in compressor_memory_object_data_request()
521 cur_offset += PAGE_SIZE) { in compressor_memory_object_data_initialize()
576 if ((uint32_t)(new_size / PAGE_SIZE) != (new_size / PAGE_SIZE)) { in compressor_memory_object_create()
587 pager->cpgr_num_slots = (uint32_t)(new_size / PAGE_SIZE); in compressor_memory_object_create()
664 page_num = (uint32_t)(offset / PAGE_SIZE); in compressor_pager_slot_lookup()
665 if (page_num != (offset / PAGE_SIZE)) { in compressor_pager_slot_lookup()
803 if ((uint32_t)(offset / PAGE_SIZE) != (offset / PAGE_SIZE)) { in vm_compressor_pager_put()
860 if ((uint32_t)(offset / PAGE_SIZE) != (offset / PAGE_SIZE)) { in vm_compressor_pager_get()
[all …]
H A Dvm_compressor_algorithms.c173 VM_COMPRESSOR_STAT(compressor_stats.lz4_compressed_bytes += PAGE_SIZE); in compressor_selector_update()
246 if (PAGE_SIZE == 4096) { in WKdmD()
276 if (PAGE_SIZE == 4096) { in WKdmC()
304 int insize = PAGE_SIZE; in metacompressor()
333 VM_COMPRESSOR_STAT(compressor_stats.wk_compressed_bytes_total += PAGE_SIZE); in metacompressor()
353 int wkc = (sz == -1) ? PAGE_SIZE : sz; in metacompressor()
365 sz = PAGE_SIZE; in metacompressor()
396 …rval = (int)lz4raw_decode_buffer(dest, PAGE_SIZE, source, csize, &compressor_dscratch->lz4decodest… in metadecompressor()
402 assertf(rval == PAGE_SIZE, "LZ4 decode: size != pgsize %d, header: 0x%x, 0x%x, 0x%x", in metadecompressor()
404 success = (rval == PAGE_SIZE); in metadecompressor()
[all …]
H A Dvm_swapfile_pager.c357 kr = kmem_alloc(kernel_map, &kernel_mapping, PAGE_SIZE, in swapfile_pager_data_request()
369 pl_count = length / PAGE_SIZE; in swapfile_pager_data_request()
370 for (cur_offset = 0; cur_offset < length; cur_offset += PAGE_SIZE) { in swapfile_pager_data_request()
373 if (!upl_page_present(upl_pl, (int)(cur_offset / PAGE_SIZE))) { in swapfile_pager_data_request()
385 upl_phys_page(upl_pl, (int)(cur_offset / PAGE_SIZE)); in swapfile_pager_data_request()
401 memset(dst_ptr, '\0', PAGE_SIZE); in swapfile_pager_data_request()
403 dst_ptr[PAGE_SIZE - 1] = '\n'; in swapfile_pager_data_request()
448 kmem_free(kernel_map, kernel_mapping, PAGE_SIZE); in swapfile_pager_data_request()
/xnu-8020.140.41/tests/
H A Dmemcmp_zero.c11 unsigned char *p = mmap(NULL, 3 * PAGE_SIZE, PROT_NONE, MAP_SHARED | MAP_ANON, 0, 0); in get_guarded_page()
12 p += PAGE_SIZE; in get_guarded_page()
13 mprotect(p, PAGE_SIZE, PROT_READ | PROT_WRITE); in get_guarded_page()
20 munmap(p - PAGE_SIZE, 3 * PAGE_SIZE); in free_guarded_page()
35 unsigned char *right = buffer + PAGE_SIZE - 512;
H A Dmacho_size_63133398.c29 #define ADJUSTMENT_SIZE (1337 * PAGE_SIZE)
3184 …dst_buf = mmap(NULL, (dst_size + PAGE_SIZE - 1) & ~PAGE_MASK, PROT_READ | PROT_WRITE, MAP_FILE | M…
3207 T_ASSERT_POSIX_SUCCESS(munmap(dst_buf, (dst_size + PAGE_SIZE - 1) & ~PAGE_MASK), NULL);
/xnu-8020.140.41/osfmk/mach/i386/
H A Dvm_param.h107 #define PAGE_SIZE I386_PGBYTES macro
109 #define PAGE_MASK (PAGE_SIZE - 1)
112 #define PAGE_MAX_SIZE PAGE_SIZE
116 #define PAGE_MIN_SIZE PAGE_SIZE
147 #define PAGE_SIZE I386_PGBYTES macro
148 #define PAGE_MASK (PAGE_SIZE-1)
151 #define PAGE_SIZE vm_page_size macro
/xnu-8020.140.41/osfmk/x86_64/
H A Dboot_pt.c49 [0] = ((uint64_t)(PAGE_SIZE) | PML4_PROT),
50 [KERNEL_PML4_INDEX] = ((uint64_t)(PAGE_SIZE) | PML4_PROT),
56 [0] = ((uint64_t)(2 * PAGE_SIZE) | PDPT_PROT),
57 [1] = ((uint64_t)(3 * PAGE_SIZE) | PDPT_PROT),
58 [2] = ((uint64_t)(4 * PAGE_SIZE) | PDPT_PROT),
59 [3] = ((uint64_t)(5 * PAGE_SIZE) | PDPT_PROT),
H A Dcopyio.c554 … lop = (unsigned int)(PAGE_SIZE - (snk64 & (PAGE_SIZE - 1))); /* Assume sink smallest */ in copypv()
556 if (lop > (unsigned int)(PAGE_SIZE - (src64 & (PAGE_SIZE - 1)))) { in copypv()
557 lop = (unsigned int)(PAGE_SIZE - (src64 & (PAGE_SIZE - 1))); /* No, source is smaller */ in copypv()
566 lop = (unsigned int)(PAGE_SIZE - (src64 & (PAGE_SIZE - 1))); in copypv()
568 lop = (unsigned int)(PAGE_SIZE - (snk64 & (PAGE_SIZE - 1))); in copypv()
H A Dpmap.c282 ps = PAGE_SIZE; in pmap_map()
757 pgsz = PAGE_SIZE; in pmap_pv_fixup()
800 _vm_object_allocate((vm_object_size_t)NPML4PGS * PAGE_SIZE, &kpml4obj_object_store); in pmap_init()
803 _vm_object_allocate((vm_object_size_t)NPDPTPGS * PAGE_SIZE, &kpdptobj_object_store); in pmap_init()
806 _vm_object_allocate((vm_object_size_t)NPDEPGS * PAGE_SIZE, &kptobj_object_store); in pmap_init()
887 vaddr += PAGE_SIZE; in pmap_init()
888 vsize -= PAGE_SIZE; in pmap_init()
901 pmap_anchor_zone = zone_create("pagetable anchors", PAGE_SIZE, in pmap_init()
911 pmap_uanchor_zone = zone_create("pagetable user anchors", PAGE_SIZE, in pmap_init()
1039 ml_static_mfree((uintptr_t)KPTphys + offset, PAGE_SIZE * cnt); in pmap_free_early_PT()
[all …]
/xnu-8020.140.41/tests/iokit/
H A Drosetta_map_mmio.c57 T_LOG("PAGE_SIZE is 0x%lx", PAGE_SIZE);
61 …T_QUIET; T_ASSERT_LE(deviceMemoryOffsetPages * PAGE_SIZE, PHYSICAL_CARVEOUT_SIZE, "device memory o…
65 …T_QUIET; T_ASSERT_LE((deviceMemoryOffsetPages + sizeInPages) * PAGE_SIZE, PHYSICAL_CARVEOUT_SIZE, …
70 args.deviceMemoryOffset = deviceMemoryOffsetPages * PAGE_SIZE;
71 args.offset = offsetInPages * PAGE_SIZE;
72 args.size = sizeInPages * PAGE_SIZE;
/xnu-8020.140.41/bsd/vfs/
H A Dvfs_cluster.c352 max_io_size = min((segcnt * PAGE_SIZE), maxcnt); in cluster_max_io_size()
499 …if (VNOP_BLOCKMAP(vp, f_offset, PAGE_SIZE, &blkno, &io_size, NULL, VNODE_READ | VNODE_BLOCKMAP_NO_… in cluster_io_present_in_BC()
598 assert(upl_end >= PAGE_SIZE); in cluster_handle_associated_upl()
623 upl_offset += PAGE_SIZE; in cluster_handle_associated_upl()
645 upl_end -= PAGE_SIZE; in cluster_handle_associated_upl()
858 cluster_zero(upl, zero_offset, PAGE_SIZE - (zero_offset & PAGE_MASK), real_bp); in cluster_iodone()
923 commit_size = (pg_offset + transaction_size + (PAGE_SIZE - 1)) & ~PAGE_MASK; in cluster_iodone()
992 page_index = upl_offset / PAGE_SIZE; in cluster_zero()
996 zero_cnt = min(PAGE_SIZE - page_offset, size); in cluster_zero()
1206 if (real_bp && non_rounded_size > PAGE_SIZE) { in cluster_io()
[all …]
/xnu-8020.140.41/osfmk/kdp/ml/i386/
H A Dkdp_x86_common.c139 cnt_src = PAGE_SIZE - (cur_phys_src & PAGE_MASK); in kdp_machine_vm_read()
140 cnt_dst = PAGE_SIZE - (cur_phys_dst & PAGE_MASK); in kdp_machine_vm_read()
194 cnt_src = PAGE_SIZE - (cur_phys_src & PAGE_MASK); in kdp_machine_phys_read()
195 cnt_dst = PAGE_SIZE - (cur_phys_dst & PAGE_MASK); in kdp_machine_phys_read()
250 cnt_src = (unsigned)(PAGE_SIZE - (cur_phys_src & PAGE_MASK)); in kdp_machine_vm_write()
251 cnt_dst = (unsigned)(PAGE_SIZE - (cur_phys_dst & PAGE_MASK)); in kdp_machine_vm_write()
306 cnt_src = (unsigned)(PAGE_SIZE - (cur_phys_src & PAGE_MASK)); in kdp_machine_phys_write()
307 cnt_dst = (unsigned)(PAGE_SIZE - (cur_phys_dst & PAGE_MASK)); in kdp_machine_phys_write()
423 kmem_alloc(kernel_map, &debugger_window_kva, PAGE_SIZE, in kdp_map_debug_pagetable_window()
/xnu-8020.140.41/osfmk/arm/
H A Dcpu.c280 INTSTACK_SIZE + (2 * PAGE_SIZE), in cpu_stack_alloc()
288 cpu_data_ptr->intstack_top = irq_stack + PAGE_SIZE + INTSTACK_SIZE; in cpu_stack_alloc()
292 FIQSTACK_SIZE + (2 * PAGE_SIZE), in cpu_stack_alloc()
300 cpu_data_ptr->fiqstack_top = fiq_stack + PAGE_SIZE + FIQSTACK_SIZE; in cpu_stack_alloc()
320 cpu_data_ptr->intstack_top - INTSTACK_SIZE - PAGE_SIZE, in cpu_data_free()
321 INTSTACK_SIZE + 2 * PAGE_SIZE); in cpu_data_free()
323 cpu_data_ptr->fiqstack_top - FIQSTACK_SIZE - PAGE_SIZE, in cpu_data_free()
324 FIQSTACK_SIZE + 2 * PAGE_SIZE); in cpu_data_free()
559 LowExceptionVectorsAddr = (void *)ml_io_map(ml_vtophys((vm_offset_t)gPhysBase), PAGE_SIZE); in cpu_machine_idle_init()
579 CleanPoC_DcacheRegion((vm_offset_t) phystokv(gPhysBase), PAGE_SIZE); in cpu_machine_idle_init()
/xnu-8020.140.41/bsd/tests/
H A Dcopyio_tests.c47 #define copyio_test_buf_size (PAGE_SIZE * 16)
143 err = copyin(data->unmapped_addr - PAGE_SIZE, in_buf, PAGE_SIZE * 2); in copyin_test()
145 err = copyin(data->user_lastpage_addr, in_buf, PAGE_SIZE * 2); in copyin_test()
190 err = copyout(out_buf, data->unmapped_addr - PAGE_SIZE, PAGE_SIZE * 2); in copyout_test()
192 err = copyout(out_buf, data->user_lastpage_addr, PAGE_SIZE * 2); in copyout_test()
248 err = copyinstr(data->user_lastpage_addr, in_buf, PAGE_SIZE * 2, &lencopied); in copyinstr_test()
320 …err = copyoutstr(copyio_test_string, data->user_lastpage_addr + PAGE_SIZE - 1, strlen(copyio_test_… in copyoutstr_test()
518 …ret = mach_vm_allocate_kernel(data.user_map, &user_addr, copyio_test_buf_size + PAGE_SIZE, VM_FLAG… in copyio_test()
525 user_addr = get_map_max(data.user_map) - PAGE_SIZE; in copyio_test()
526 …ret = mach_vm_allocate_kernel(data.user_map, &user_addr, PAGE_SIZE, VM_FLAGS_FIXED, VM_KERN_MEMORY… in copyio_test()
[all …]
/xnu-8020.140.41/osfmk/kern/
H A Dgzalloc.c209 kmem_free(gzalloc_map, free_addr, rounded_size + PAGE_SIZE); in gzalloc_empty_free_cache()
349 if (gzalloc_reserve_size < (rounded_size + PAGE_SIZE)) { in gzalloc_alloc()
356 gzalloc_reserve += rounded_size + PAGE_SIZE; in gzalloc_alloc()
357 gzalloc_reserve_size -= rounded_size + PAGE_SIZE; in gzalloc_alloc()
361 &gzaddr, rounded_size + PAGE_SIZE, 0, in gzalloc_alloc()
368 gzaddr += PAGE_SIZE; in gzalloc_alloc()
428 saddr = (vm_offset_t) addr - PAGE_SIZE; in gzalloc_free()
476 checkend = (char *) ((((vm_offset_t)addr) & ~PAGE_MASK) + PAGE_SIZE); in gzalloc_free()
513 saddr + rounded_size + (1 * PAGE_SIZE), in gzalloc_free()
548 kmem_free(gzalloc_map, free_addr, rounded_size + PAGE_SIZE); in gzalloc_free()
/xnu-8020.140.41/osfmk/mach/arm/
H A Dvm_param.h72 #define PAGE_SIZE (1 << PAGE_SHIFT) macro
73 #define PAGE_MASK (PAGE_SIZE-1)
75 #define VM_PAGE_SIZE PAGE_SIZE
91 #define PAGE_SIZE vm_page_size macro
/xnu-8020.140.41/osfmk/i386/vmx/
H A Dvmx_shims.c42 ret = kmem_alloc(kernel_map, (vm_offset_t *)&pptr, PAGE_SIZE, in vmx_pcalloc()
59 kmem_free(kernel_map, (vm_offset_t)va, PAGE_SIZE); in vmx_pfree()

1234567