Lines Matching +full:iommu +full:- +full:specifier

1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 1996-2005 Paul Mackerras.
45 #include <asm/iommu.h>
49 #include <asm/pci-bridge.h>
94 * overlaps_initrd - check for overlap with page aligned extension of
111 * move_device_tree - move tree to an unused area, if needed.
122 DBG("-> move_device_tree\n"); in move_device_tree()
128 !memblock_is_memory(start + size - 1) || in move_device_tree()
139 DBG("<- move_device_tree\n"); in move_device_tree()
143 * ibm,pa/pi-features is a per-cpu property that contains a string of
147 * Second header byte is an "attribute-specifier" type, of which
148 * zero is the only currently-defined value.
150 * that we are interested in. The function will return -1 if the
151 * pa-features property is missing, or a 1/0 to indicate if the feature
153 * big-endian to match the definition in PAPR.
155 * ibm,pa/pi-features property, it does not set the feature if the
163 unsigned char pabyte; /* byte number in ibm,pa/pi-features */
164 unsigned char pabit; /* bit number (big-endian) */
192 * ibm,pi-features property provides the support of processor specific
193 * options not described in ibm,pa-features. Right now use byte 0, bit 3
218 tablelen -= len; in scan_features()
224 if (fp->pabyte >= ftrs[0]) in scan_features()
226 bit = (ftrs[2 + fp->pabyte] >> (7 - fp->pabit)) & 1; in scan_features()
227 if (bit && !fp->clear) { in scan_features()
228 cur_cpu_spec->cpu_features |= fp->cpu_features; in scan_features()
229 cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs; in scan_features()
230 cur_cpu_spec->cpu_user_features2 |= fp->cpu_user_ftrs2; in scan_features()
231 cur_cpu_spec->mmu_features |= fp->mmu_features; in scan_features()
232 } else if (bit == fp->clear) { in scan_features()
233 cur_cpu_spec->cpu_features &= ~fp->cpu_features; in scan_features()
234 cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs; in scan_features()
235 cur_cpu_spec->cpu_user_features2 &= ~fp->cpu_user_ftrs2; in scan_features()
236 cur_cpu_spec->mmu_features &= ~fp->mmu_features; in scan_features()
260 slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL) ? : in init_mmu_slb_size()
261 of_get_flat_dt_prop(node, "ibm,slb-size", NULL); in init_mmu_slb_size()
305 pvr = cur_cpu_spec->pvr_value | 0x8; in identical_pvr_fixup()
321 prop = of_get_flat_dt_prop(node, fp->name, NULL); in check_cpu_feature_properties()
322 if (prop && be32_to_cpup(prop) >= fp->min_value) { in check_cpu_feature_properties()
323 cur_cpu_spec->cpu_features |= fp->cpu_feature; in check_cpu_feature_properties()
324 cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftr; in check_cpu_feature_properties()
339 int found = -1; in early_init_dt_scan_cpus()
350 intserv = of_get_flat_dt_prop(node, "ibm,ppc-interrupt-server#s", &len); in early_init_dt_scan_cpus()
406 * If the cpu-version property in the cpu node contains in early_init_dt_scan_cpus()
416 * support the cpu-version property, and it's the responsibility of the in early_init_dt_scan_cpus()
418 * architecture level via the ibm,powerpc-cpu-features binding. in early_init_dt_scan_cpus()
421 prop = of_get_flat_dt_prop(node, "cpu-version", NULL); in early_init_dt_scan_cpus()
428 check_cpu_features(node, "ibm,pa-features", ibm_pa_features, in early_init_dt_scan_cpus()
430 check_cpu_features(node, "ibm,pi-features", ibm_pi_features, in early_init_dt_scan_cpus()
437 seq_buf_printf(&ppc_hw_desc, "%s 0x%04lx ", cur_cpu_spec->cpu_name, mfspr(SPRN_PVR)); in early_init_dt_scan_cpus()
445 cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; in early_init_dt_scan_cpus()
447 cur_cpu_spec->cpu_features |= CPU_FTR_SMT; in early_init_dt_scan_cpus()
464 /* check if iommu is forced on or off */ in early_init_dt_scan_chosen_ppc()
465 if (of_get_flat_dt_prop(node, "linux,iommu-off", NULL) != NULL) in early_init_dt_scan_chosen_ppc()
467 if (of_get_flat_dt_prop(node, "linux,iommu-force-on", NULL) != NULL) in early_init_dt_scan_chosen_ppc()
472 lprop = of_get_flat_dt_prop(node, "linux,memory-limit", NULL); in early_init_dt_scan_chosen_ppc()
477 lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-start", NULL); in early_init_dt_scan_chosen_ppc()
480 lprop = of_get_flat_dt_prop(node, "linux,tce-alloc-end", NULL); in early_init_dt_scan_chosen_ppc()
486 lprop = of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); in early_init_dt_scan_chosen_ppc()
490 lprop = of_get_flat_dt_prop(node, "linux,crashkernel-size", NULL); in early_init_dt_scan_chosen_ppc()
492 crashk_res.end = crashk_res.start + *lprop - 1; in early_init_dt_scan_chosen_ppc()
512 *size = max_mem - base; in validate_mem_limit()
535 base = lmb->base_addr; in early_init_drmem_lmb()
543 if ((lmb->flags & DRCONF_MEM_RESERVED) || in early_init_drmem_lmb()
544 !(lmb->flags & DRCONF_MEM_ASSIGNED)) in early_init_drmem_lmb()
552 * For each memblock in ibm,dynamic-memory, a in early_init_drmem_lmb()
553 * corresponding entry in linux,drconf-usable-memory in early_init_drmem_lmb()
556 * linux,drconf-usable-memory property in early_init_drmem_lmb()
573 size = 0x80000000ul - base; in early_init_drmem_lmb()
579 DBG("Adding: %llx -> %llx\n", base, size); in early_init_drmem_lmb()
582 if (lmb->flags & DRCONF_MEM_HOTREMOVABLE) in early_init_drmem_lmb()
584 } while (--rngs); in early_init_drmem_lmb()
594 int node = fdt_path_offset(fdt, "/ibm,dynamic-reconfiguration-memory"); in early_init_dt_scan_memory_ppc()
625 size = 0x80000000ul - base; in early_init_dt_add_memory_arch()
628 /* Keep track of the beginning of memory -and- the size of in early_init_dt_add_memory_arch()
629 * the very first block in the device-tree as it represents in early_init_dt_add_memory_arch()
655 prop = of_get_flat_dt_prop(dt_root, "reserved-ranges", &len); in early_reserve_mem_dt()
660 DBG("Found new-style reserved-ranges\n"); in early_reserve_mem_dt()
671 DBG("reserving: %llx -> %llx\n", base, size); in early_reserve_mem_dt()
684 /* Look for the new "reserved-regions" property in the DT */ in early_reserve_mem()
691 ALIGN(initrd_end, PAGE_SIZE) - in early_reserve_mem()
701 * image that setup the mem_rsvmap as pairs of 32-bit values in early_reserve_mem()
707 DBG("Found old 32-bit reserve map\n"); in early_reserve_mem()
714 DBG("reserving: %x -> %x\n", base_32, size_32); in early_reserve_mem()
729 return -EINVAL; in parse_ppc_tm()
741 cur_cpu_spec->cpu_user_features2 &= in tm_init()
743 cur_cpu_spec->cpu_features &= ~CPU_FTR_TM; in tm_init()
791 DBG(" -> early_init_devtree(%px)\n", params); in early_init_devtree()
818 * device-tree, including the platform type, initrd location and in early_init_devtree()
844 memblock_reserve(PHYSICAL_START, __pa(_end) - PHYSICAL_START); in early_init_devtree()
847 int_vector_size = __end_interrupts - _stext; in early_init_devtree()
858 * If we fail to reserve memory for firmware-assisted dump then in early_init_devtree()
904 * NCPUS-1 non-boot CPUs :-) in early_init_devtree()
906 spinning_secondaries = boot_cpu_count - 1; in early_init_devtree()
939 DBG(" <- early_init_devtree()\n"); in early_init_devtree()
949 /* Setup flat device-tree pointer */ in early_get_first_memblock_info()
978 * of_get_ibm_chip_id - Returns the IBM "chip-id" of a device
981 * This looks for a property "ibm,chip-id" in the node or any
982 * of its parents and returns its content, or -1 if it cannot
993 * cell in chip-id, we only read the first one here. in of_get_ibm_chip_id()
995 if (!of_property_read_u32(np, "ibm,chip-id", &chip_id)) { in of_get_ibm_chip_id()
1002 return -1; in of_get_ibm_chip_id()
1007 * cpu_to_chip_id - Return the cpus chip-id
1010 * Return the value of the ibm,chip-id property corresponding to the given
1011 * logical cpu number. If the chip-id can not be found, returns -1.
1016 int ret = -1, idx; in cpu_to_chip_id()
1019 if (chip_id_lookup_table && chip_id_lookup_table[idx] != -1) in cpu_to_chip_id()