| /openbmc/qemu/target/i386/ |
| H A D | monitor.c | 251 hwaddr end, int prot) in mem_print() argument 255 if (prot != prot1) { in mem_print() 266 if (prot != 0) in mem_print() 270 *plast_prot = prot; in mem_print() 277 int prot, last_prot; in mem_info_32() local 290 prot = pde & (PG_USER_MASK | PG_RW_MASK | PG_PRESENT_MASK); in mem_info_32() 291 mem_print(mon, env, &start, &last_prot, end, prot); in mem_info_32() 298 prot = pte & pde & in mem_info_32() 301 prot = 0; in mem_info_32() 303 mem_print(mon, env, &start, &last_prot, end, prot); in mem_info_32() [all …]
|
| /openbmc/qemu/bsd-user/ |
| H A D | mmap.c | 66 int target_mprotect(abi_ulong start, abi_ulong len, int prot) in target_mprotect() argument 73 prot & PROT_READ ? 'r' : '-', in target_mprotect() 74 prot & PROT_WRITE ? 'w' : '-', in target_mprotect() 75 prot & PROT_EXEC ? 'x' : '-'); in target_mprotect() 82 prot &= PROT_READ | PROT_WRITE | PROT_EXEC; in target_mprotect() 91 prot1 = prot; in target_mprotect() 108 prot1 = prot; in target_mprotect() 121 ret = mprotect(g2h_untagged(host_start), host_end - host_start, prot); in target_mprotect() 125 page_set_flags(start, start + len - 1, prot | PAGE_VALID); in target_mprotect() 190 int prot, int flags, int fd, abi_ulong offset) in mmap_frag() argument [all …]
|
| /openbmc/qemu/target/mips/system/ |
| H A D | physaddr.c | 78 int *prot, target_ulong real_address, in get_seg_physical_address() argument 91 return env->tlb->map_address(env, physical, prot, real_address, in get_seg_physical_address() 96 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_seg_physical_address() 102 int *prot, target_ulong real_address, in get_segctl_physical_address() argument 110 return get_seg_physical_address(env, physical, prot, real_address, in get_segctl_physical_address() 116 int *prot, target_ulong real_address, in get_physical_address() argument 141 ret = get_segctl_physical_address(env, physical, prot, in get_physical_address() 148 ret = env->tlb->map_address(env, physical, prot, in get_physical_address() 157 ret = env->tlb->map_address(env, physical, prot, in get_physical_address() 184 ret = get_seg_physical_address(env, physical, prot, in get_physical_address() [all …]
|
| /openbmc/qemu/target/ppc/ |
| H A D | mmu-booke.c | 35 if (!(tlb->prot & PAGE_VALID)) { in ppcemb_tlb_check() 42 mask, (uint32_t)tlb->PID, tlb->prot); in ppcemb_tlb_check() 71 int mmu40x_get_physical_address(CPUPPCState *env, hwaddr *raddr, int *prot, in mmu40x_get_physical_address() argument 100 *prot = PAGE_RWX; in mmu40x_get_physical_address() 108 *prot = 0; in mmu40x_get_physical_address() 116 *prot = tlb->prot; in mmu40x_get_physical_address() 117 if (check_prot_access_type(*prot, access_type)) { in mmu40x_get_physical_address() 129 ret < 0 ? 0 : *raddr, *prot, ret); in mmu40x_get_physical_address() 158 hwaddr *raddr, int *prot, target_ulong address, in mmubooke_check_tlb() argument 175 *prot = tlb->prot & 0xF; in mmubooke_check_tlb() [all …]
|
| H A D | mmu-hash32.h | 118 int prot; in ppc_hash32_prot() local 123 prot = 0; in ppc_hash32_prot() 127 prot = PAGE_READ; in ppc_hash32_prot() 130 prot = PAGE_READ | PAGE_WRITE; in ppc_hash32_prot() 140 prot = PAGE_READ | PAGE_WRITE; in ppc_hash32_prot() 143 prot = PAGE_READ; in ppc_hash32_prot() 149 return nx ? prot : prot | PAGE_EXEC; in ppc_hash32_prot() 154 int prot = 0; in ppc_hash32_bat_prot() local 158 prot = PAGE_READ | PAGE_EXEC; in ppc_hash32_bat_prot() 160 prot |= PAGE_WRITE; in ppc_hash32_bat_prot() [all …]
|
| H A D | mmu_helper.c | 119 tlb->prot &= ~PAGE_VALID; in ppc4xx_tlb_invalidate_all() 694 if (tlb->prot & PAGE_VALID) { in helper_4xx_tlbre_hi() 714 if (tlb->prot & PAGE_EXEC) { in helper_4xx_tlbre_lo() 717 if (tlb->prot & PAGE_WRITE) { in helper_4xx_tlbre_lo() 727 if (tlb->prot & 0xf) { in ppcemb_tlb_flush() 730 if ((tlb->prot >> 4) & 0xf) { in ppcemb_tlb_flush() 753 if ((tlb->prot & PAGE_VALID) && tlb->PID == env->spr[SPR_40x_PID]) { in helper_4xx_tlbwe_hi() 773 tlb->prot |= PAGE_VALID; in helper_4xx_tlbwe_hi() 780 tlb->prot &= ~PAGE_VALID; in helper_4xx_tlbwe_hi() 787 tlb->prot & PAGE_READ ? 'r' : '-', in helper_4xx_tlbwe_hi() [all …]
|
| H A D | mmu-hash32.c | 52 MMUAccessType access_type, int *prot, in ppc_hash32_bat_lookup() argument 82 *prot = ppc_hash32_bat_prot(batu, batl); in ppc_hash32_bat_lookup() 116 hwaddr *raddr, int *prot, int mmu_idx, in ppc_hash32_direct_store() argument 182 *prot = PAGE_READ | PAGE_WRITE; in ppc_hash32_direct_store() 184 *prot = PAGE_READ; in ppc_hash32_direct_store() 186 if (check_prot_access_type(*prot, access_type)) { in ppc_hash32_direct_store() 304 int prot; in ppc_hash32_xlate() local 387 prot = ppc_hash32_prot(key, pte.pte1 & HPTE32_R_PP, sr & SR32_NX); in ppc_hash32_xlate() 389 if (!check_prot_access_type(prot, access_type)) { in ppc_hash32_xlate() 425 prot &= ~PAGE_WRITE; in ppc_hash32_xlate() [all …]
|
| H A D | mmu_common.c | 88 static int ppc6xx_tlb_check(CPUPPCState *env, hwaddr *raddr, int *prot, in ppc6xx_tlb_check() argument 135 *prot = ppc_hash32_prot(key, tlb->pte1 & HPTE32_R_PP, nx); in ppc6xx_tlb_check() 136 if (check_prot_access_type(*prot, access_type)) { in ppc6xx_tlb_check() 148 *raddr & TARGET_PAGE_MASK, *prot, ret); in ppc6xx_tlb_check() 158 *prot &= ~PAGE_WRITE; in ppc6xx_tlb_check() 190 static int get_bat_6xx_tlb(CPUPPCState *env, hwaddr *raddr, int *prot, in get_bat_6xx_tlb() argument 225 *prot = ppc_hash32_bat_prot(*BATu, *BATl); in get_bat_6xx_tlb() 226 if (check_prot_access_type(*prot, access_type)) { in get_bat_6xx_tlb() 229 *prot & PAGE_READ ? 'R' : '-', in get_bat_6xx_tlb() 230 *prot & PAGE_WRITE ? 'W' : '-'); in get_bat_6xx_tlb() [all …]
|
| /openbmc/qemu/target/openrisc/ |
| H A D | mmu.c | 31 static inline void get_phys_nommu(hwaddr *phys_addr, int *prot, in get_phys_nommu() argument 35 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_phys_nommu() 38 static int get_phys_mmu(OpenRISCCPU *cpu, hwaddr *phys_addr, int *prot, in get_phys_mmu() argument 79 *prot = right; in get_phys_mmu() 114 int prot; in openrisc_cpu_tlb_fill() local 119 get_phys_nommu(&phys_addr, &prot, addr); in openrisc_cpu_tlb_fill() 126 excp = get_phys_mmu(cpu, &phys_addr, &prot, addr, need, super); in openrisc_cpu_tlb_fill() 131 phys_addr & TARGET_PAGE_MASK, prot, in openrisc_cpu_tlb_fill() 146 int prot, excp, sr = cpu->env.sr; in openrisc_cpu_get_phys_page_debug() local 152 excp = get_phys_mmu(cpu, &phys_addr, &prot, addr, in openrisc_cpu_get_phys_page_debug() [all …]
|
| /openbmc/qemu/target/loongarch/ |
| H A D | cpu_helper.c | 47 int *prot, target_ulong address) in loongarch_page_table_walker() argument 104 *prot = PAGE_READ; in loongarch_page_table_walker() 106 *prot = PAGE_READ | PAGE_WRITE; in loongarch_page_table_walker() 122 int *prot, target_ulong address, in loongarch_map_address() argument 129 ret = loongarch_get_addr_from_tlb(env, physical, prot, address, in loongarch_map_address() 142 return loongarch_page_table_walker(env, physical, prot, address); in loongarch_map_address() 161 int *prot, target_ulong address, in get_physical_address() argument 174 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 193 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 205 return loongarch_map_address(env, physical, prot, address, in get_physical_address() [all …]
|
| /openbmc/u-boot/include/ |
| H A D | libata.h | 371 static inline unsigned int ata_prot_flags(u8 prot) in ata_prot_flags() argument 373 switch (prot) { in ata_prot_flags() 392 static inline int ata_is_atapi(u8 prot) in ata_is_atapi() argument 394 return ata_prot_flags(prot) & ATA_PROT_FLAG_ATAPI; in ata_is_atapi() 397 static inline int ata_is_nodata(u8 prot) in ata_is_nodata() argument 399 return !(ata_prot_flags(prot) & ATA_PROT_FLAG_DATA); in ata_is_nodata() 402 static inline int ata_is_pio(u8 prot) in ata_is_pio() argument 404 return ata_prot_flags(prot) & ATA_PROT_FLAG_PIO; in ata_is_pio() 407 static inline int ata_is_dma(u8 prot) in ata_is_dma() argument 409 return ata_prot_flags(prot) & ATA_PROT_FLAG_DMA; in ata_is_dma() [all …]
|
| /openbmc/qemu/hw/i386/kvm/ |
| H A D | xen_gnttab.c | 249 int prot; member 253 MemoryRegionSection *mrs, int prot) in gnt_unref() argument 256 if (prot & PROT_WRITE) { in gnt_unref() 271 static uint64_t gnt_ref(XenGnttabState *s, grant_ref_t ref, int prot) in gnt_ref() argument 282 if (prot & PROT_WRITE) { in gnt_ref() 304 if (prot & PROT_WRITE) { in gnt_ref() 328 uint32_t *refs, int prot) in xen_be_gnttab_map_refs() argument 365 if ((prot & PROT_WRITE) && !(act->prot & PROT_WRITE)) { in xen_be_gnttab_map_refs() 366 if (gnt_ref(s, refs[0], prot) == INVALID_GPA) { in xen_be_gnttab_map_refs() 369 act->prot |= PROT_WRITE; in xen_be_gnttab_map_refs() [all …]
|
| /openbmc/qemu/target/i386/tcg/system/ |
| H A D | excp_helper.c | 41 int prot; member 160 int prot; in mmu_translate() local 361 prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in mmu_translate() 378 prot = 0; in mmu_translate() 380 prot |= PAGE_READ; in mmu_translate() 382 prot |= PAGE_WRITE; in mmu_translate() 388 prot |= PAGE_EXEC; in mmu_translate() 410 prot &= pkr_prot; in mmu_translate() 413 if ((prot & (1 << access_type)) == 0) { in mmu_translate() 427 prot &= ~PAGE_WRITE; in mmu_translate() [all …]
|
| /openbmc/qemu/target/hppa/ |
| H A D | mem_helper.c | 206 int prot, r_prot, w_prot, x_prot, priv; in hppa_get_physical_address() local 226 prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in hppa_get_physical_address() 234 prot = 0; in hppa_get_physical_address() 249 prot = r_prot; in hppa_get_physical_address() 252 prot = r_prot | w_prot; in hppa_get_physical_address() 255 prot = r_prot | x_prot; in hppa_get_physical_address() 258 prot = r_prot | w_prot | x_prot; in hppa_get_physical_address() 261 prot = x_prot; in hppa_get_physical_address() 273 if (unlikely(!(prot & type))) { in hppa_get_physical_address() 290 prot &= access_prot; in hppa_get_physical_address() [all …]
|
| /openbmc/qemu/target/tricore/ |
| H A D | helper.c | 38 int *prot, target_ulong address, in get_physical_address() argument 44 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 53 int prot; in tricore_cpu_get_phys_page_debug() local 56 if (get_physical_address(&cpu->env, &phys_addr, &prot, addr, in tricore_cpu_get_phys_page_debug() 75 int prot; in tricore_cpu_tlb_fill() local 79 ret = get_physical_address(env, &physical, &prot, in tricore_cpu_tlb_fill() 84 __func__, address, ret, physical, prot); in tricore_cpu_tlb_fill() 88 physical & TARGET_PAGE_MASK, prot | PAGE_EXEC, in tricore_cpu_tlb_fill()
|
| /openbmc/qemu/target/alpha/ |
| H A D | helper.c | 176 int prot = 0; in get_physical_address() local 182 prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 207 prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 266 prot |= PAGE_READ | PAGE_EXEC; in get_physical_address() 269 prot |= PAGE_WRITE; in get_physical_address() 271 if (unlikely((prot & prot_need) == 0 && prot_need)) { in get_physical_address() 276 prot &= ~(L3pte >> 1); in get_physical_address() 278 if (unlikely((prot & prot_need) == 0)) { in get_physical_address() 286 *pprot = prot; in get_physical_address() 293 int prot, fail; in alpha_cpu_get_phys_page_debug() local [all …]
|
| /openbmc/u-boot/common/ |
| H A D | update.c | 100 static int update_flash_protect(int prot, ulong addr_first, ulong addr_last) in update_flash_protect() argument 109 if (prot == 0) { in update_flash_protect() 141 if (prot == 0) { in update_flash_protect() 151 if (flash_real_protect(info, i, prot)) in update_flash_protect() 154 info->protect[i] = prot; in update_flash_protect() 162 prot ? "": "Un-", cnt); in update_flash_protect() 166 if((prot == 1) && saved_prot_info) in update_flash_protect()
|
| /openbmc/qemu/dump/ |
| H A D | dump-hmp-cmds.c | 32 char *prot; in hmp_dump_guest_memory() local 78 prot = g_strconcat("file:", file, NULL); in hmp_dump_guest_memory() 80 qmp_dump_guest_memory(paging, prot, true, detach, has_begin, begin, in hmp_dump_guest_memory() 83 g_free(prot); in hmp_dump_guest_memory()
|
| /openbmc/qemu/target/arm/ |
| H A D | ptw.c | 611 ptw->out_rw = full->prot & PAGE_WRITE; in S1_ptw_translate() 1090 result->f.prot = ap_to_rw_prot(env, ptw->in_mmu_idx, ap, domain_prot); in get_phys_addr_v5() 1091 result->f.prot |= result->f.prot ? PAGE_EXEC : 0; in get_phys_addr_v5() 1092 if (!(result->f.prot & (1 << access_type))) { in get_phys_addr_v5() 1225 result->f.prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_phys_addr_v6() 1244 result->f.prot = get_S1prot(env, mmu_idx, false, user_rw, prot_rw, in get_phys_addr_v6() 1246 if (!(result->f.prot & (1 << access_type))) { in get_phys_addr_v6() 1271 int prot = 0; in get_S2prot_noexecute() local 1274 prot |= PAGE_READ; in get_S2prot_noexecute() 1277 prot |= PAGE_WRITE; in get_S2prot_noexecute() [all …]
|
| /openbmc/qemu/tests/tcg/multiarch/ |
| H A D | vma-pthread.c | 122 int prot, ret; in thread_mutate() local 133 prot = rand_r(&seed) & (PROT_READ | PROT_WRITE | PROT_EXEC); in thread_mutate() 137 prot |= PROT_READ; in thread_mutate() 141 prot |= PROT_WRITE | PROT_READ; in thread_mutate() 144 prot |= PROT_EXEC; in thread_mutate() 148 (end_idx - start_idx + 1) * ctx->pagesize, prot); in thread_mutate()
|
| /openbmc/qemu/linux-user/ |
| H A D | mmap.c | 122 static int validate_prot_to_pageflags(int prot) in validate_prot_to_pageflags() argument 125 int page_flags = (prot & PAGE_RWX) | PAGE_VALID; in validate_prot_to_pageflags() 137 if ((prot & TARGET_PROT_BTI) && cpu_isar_feature(aa64_bti, cpu)) { in validate_prot_to_pageflags() 142 if ((prot & TARGET_PROT_MTE) && cpu_isar_feature(aa64_mte, cpu)) { in validate_prot_to_pageflags() 151 return prot & ~valid ? 0 : page_flags; in validate_prot_to_pageflags() 164 static int target_to_host_prot(int prot) in target_to_host_prot() argument 166 return (prot & (PROT_READ | PROT_WRITE)) | in target_to_host_prot() 167 (prot & PROT_EXEC ? PROT_READ : 0); in target_to_host_prot() 335 int prot, int flags, int fd, off_t offset) in mmap_frag() argument 345 && (prot & PROT_WRITE)) { in mmap_frag() [all …]
|
| /openbmc/qemu/target/sh4/ |
| H A D | helper.c | 329 int *prot, target_ulong address, in get_mmu_address() argument 344 *prot = PAGE_EXEC; in get_mmu_address() 354 *prot = PAGE_READ | PAGE_EXEC; in get_mmu_address() 356 *prot |= PAGE_WRITE; in get_mmu_address() 377 *prot = PAGE_READ; in get_mmu_address() 379 *prot |= PAGE_WRITE; in get_mmu_address() 396 int *prot, target_ulong address, in get_physical_address() argument 419 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 426 *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; in get_physical_address() 431 return get_mmu_address(env, physical, prot, address, access_type); in get_physical_address() [all …]
|
| /openbmc/u-boot/board/freescale/m5253demo/ |
| H A D | flash.c | 180 int flag, prot, sect, count; in flash_erase() local 205 prot = 0; in flash_erase() 208 prot++; in flash_erase() 212 if (prot) in flash_erase() 214 prot); in flash_erase() 223 if (prot == 0) { in flash_erase() 258 } else if (prot == CONFIG_SYS_SST_SECT) { in flash_erase()
|
| /openbmc/qemu/include/hw/xen/ |
| H A D | xen-legacy-backend.h | 48 unsigned int nr_refs, int prot); 53 uint32_t ref, int prot) in xen_be_map_grant_ref() argument 55 return xen_be_map_grant_refs(xendev, &ref, 1, prot); in xen_be_map_grant_ref()
|
| /openbmc/qemu/include/user/ |
| H A D | mmap.h | 18 int target_mprotect(abi_ulong start, abi_ulong len, int prot); 20 abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
|