Lines Matching +full:used +full:- +full:by +full:- +full:rtas

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * 64-bit pSeries and RS/6000 setup code.
6 * Adapted from 'alpha' version by Gary Thomas
7 * Modified by Cort Dougan (cort@cs.nmt.edu)
8 * Modified by PPC64 Team, IBM Corp
49 #include <asm/rtas.h>
50 #include <asm/pci-bridge.h>
60 #include <asm/papr-sysparm.h>
61 #include <asm/ppc-pci.h>
70 #include <asm/isa-bridge.h>
72 #include <asm/asm-const.h>
96 early_param("no-steal-acc", parse_no_stealacc);
99 int CMO_PrPSP = -1;
100 int CMO_SecPSP = -1;
124 /* Initialize firmware assisted non-maskable interrupts if
149 system_reset_addr = __pa(system_reset_fwnmi) - PHYSICAL_START; in fwnmi_init()
150 machine_check_addr = __pa(machine_check_fwnmi) - PHYSICAL_START; in fwnmi_init()
157 * Allocate a chunk for per cpu buffer to hold rtas errorlog. in fwnmi_init()
158 * It will be used in real mode mce handler, hence it needs to be in fwnmi_init()
169 paca_ptrs[i]->mce_data_buf = mce_data_buf + in fwnmi_init()
185 paca_ptrs[i]->mce_faulty_slbs = slb_ptr + (mmu_slb_size * i); in fwnmi_init()
197 platform_device_register_simple("pseries-wdt", 0, NULL, 0); in pseries_wdt_init()
210 chip->irq_eoi(&desc->irq_data); in pseries_8259_cascade()
221 for_each_node_by_type(np, "interrupt-controller") { in pseries_setup_i8259_cascade()
247 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL); in pseries_setup_i8259_cascade()
251 intack = addrp[naddr-1]; in pseries_setup_i8259_cascade()
253 intack |= ((unsigned long)addrp[naddr-2]) << 32; in pseries_setup_i8259_cascade()
283 struct device_node *parent, *np = rd->dn; in pci_dn_reconfig_notifier()
292 pci_add_device_node_info(pdn->phb, np); in pci_dn_reconfig_notifier()
299 list_del(&pdn->list); in pci_dn_reconfig_notifier()
317 * and register the buffers with the hypervisor. This is used for
318 * computing time stolen by the hypervisor.
365 * low power mode by ceding processor to hypervisor in pseries_lpar_idle()
397 * just give up rather than wasting any more time on this - if that turns out
515 phb->controller_ops = pseries_pci_controller_ops; in pSeries_discover_phbs()
535 * The features below are disabled by default, so we instead look to see in init_cpu_char_feature_flags()
538 if (result->character & H_CPU_CHAR_SPEC_BAR_ORI31) in init_cpu_char_feature_flags()
541 if (result->character & H_CPU_CHAR_BCCTRL_SERIALISED) in init_cpu_char_feature_flags()
544 if (result->character & H_CPU_CHAR_L1D_FLUSH_ORI30) in init_cpu_char_feature_flags()
547 if (result->character & H_CPU_CHAR_L1D_FLUSH_TRIG2) in init_cpu_char_feature_flags()
550 if (result->character & H_CPU_CHAR_L1D_THREAD_PRIV) in init_cpu_char_feature_flags()
553 if (result->character & H_CPU_CHAR_COUNT_CACHE_DISABLED) in init_cpu_char_feature_flags()
556 if (result->character & H_CPU_CHAR_BCCTR_FLUSH_ASSIST) in init_cpu_char_feature_flags()
559 if (result->character & H_CPU_CHAR_BCCTR_LINK_FLUSH_ASSIST) in init_cpu_char_feature_flags()
562 if (result->behaviour & H_CPU_BEHAV_FLUSH_COUNT_CACHE) in init_cpu_char_feature_flags()
565 if (result->behaviour & H_CPU_BEHAV_FLUSH_LINK_STACK) in init_cpu_char_feature_flags()
569 * The features below are enabled by default, so we instead look to see in init_cpu_char_feature_flags()
574 if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)) { in init_cpu_char_feature_flags()
577 } else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H) in init_cpu_char_feature_flags()
582 if (!(result->behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) in init_cpu_char_feature_flags()
585 if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY) in init_cpu_char_feature_flags()
588 if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS) in init_cpu_char_feature_flags()
591 if (result->behaviour & H_CPU_BEHAV_NO_STF_BARRIER) in init_cpu_char_feature_flags()
594 if (!(result->behaviour & H_CPU_BEHAV_BNDS_CHK_SPEC_BAR)) in init_cpu_char_feature_flags()
606 * Set features to the defaults assumed by init_cpu_char_feature_flags() in pseries_setup_security_mitigations()
670 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_get_iov_fw_value()
709 res = &dev->resource[r + PCI_IOV_RESOURCES]; in of_pci_set_vf_bar_size()
712 res->flags = pci_parse_of_flags(of_read_number in of_pci_set_vf_bar_size()
714 res->flags |= (IORESOURCE_MEM_64 | IORESOURCE_PCI_FIXED); in of_pci_set_vf_bar_size()
715 res->name = pci_name(dev); in of_pci_set_vf_bar_size()
716 res->start = base; in of_pci_set_vf_bar_size()
717 res->end = base + size - 1; in of_pci_set_vf_bar_size()
735 res = &dev->resource[r + PCI_IOV_RESOURCES]; in of_pci_parse_iov_addrs()
738 res->name = pci_name(dev); in of_pci_parse_iov_addrs()
739 res->start = base; in of_pci_parse_iov_addrs()
740 res->end = base + size - 1; in of_pci_parse_iov_addrs()
742 dev_dbg(&dev->dev, in of_pci_parse_iov_addrs()
747 dev_info(&dev->dev, in of_pci_parse_iov_addrs()
750 conflict->name, conflict); in of_pci_parse_iov_addrs()
751 res->flags |= IORESOURCE_UNSET; in of_pci_parse_iov_addrs()
760 pci_warn(pdev, "No hypervisor support for SR-IOV on this device, IOV BARs disabled.\n"); in pseries_disable_sriov_resources()
762 pdev->resource[i + PCI_IOV_RESOURCES].flags = 0; in pseries_disable_sriov_resources()
771 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_pci_fixup_resources()
783 if (!pdev->is_physfn) in pseries_pci_fixup_iov_resources()
786 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_pci_fixup_iov_resources()
800 reg = of_get_property(dn, "ibm,is-open-sriov-pf", NULL); in pseries_pci_iov_resource_alignment()
804 if (!pdev->is_physfn) in pseries_pci_iov_resource_alignment()
807 resno - PCI_IOV_RESOURCES, in pseries_pci_iov_resource_alignment()
827 /* openpic global configuration register (64-bit format). */ in pSeries_setup_arch()
828 /* openpic Interrupt Source Unit pointer (64-bit format). */ in pSeries_setup_arch()
829 /* python0 facility area (mmio) (64-bit format) REAL address. */ in pSeries_setup_arch()
840 /* By default, only probe PCI (can be overridden by rtas_pci) */ in pSeries_setup_arch()
895 ppc_md.progress(init_utsname()->version, 0); in pSeries_init_panel()
942 * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
952 pr_debug(" -> fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
956 pr_debug(" <- fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
965 /* Separate the key and value by replacing '=' with '\0' and in pSeries_cmo_feature_init()
998 if (CMO_PrPSP != -1 || CMO_SecPSP != -1) { in pSeries_cmo_feature_init()
1007 pr_debug(" <- fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
1033 if (of_property_read_bool(dn, "ibm,powervm-partition") || in pseries_add_hw_description()
1034 of_property_read_bool(dn, "ibm,fw-net-version")) in pseries_add_hw_description()
1044 pr_debug(" -> pseries_init()\n"); in pseries_init()
1063 pr_debug(" <- pseries_init()\n"); in pseries_init()
1067 * pseries_power_off - tell firmware about how to power off the system.
1069 * This function calls either the power-off rtas token in normal cases
1070 * or the ibm,power-off-ups token (if present & requested) in case of
1071 * a power failure. If power-off token is used, power on will only be
1072 * possible with power button press. If ibm,power-off-ups token is used
1085 rc = rtas_call(rtas_function_token(RTAS_FN_POWER_OFF), 2, 1, NULL, -1, -1); in pseries_power_off()
1086 printk(KERN_INFO "RTAS power-off returned %d\n", rc); in pseries_power_off()
1089 printk(KERN_INFO "RTAS ibm,power-off-ups returned %d\n", rc); in pseries_power_off()
1106 if (of_machine_is_compatible("IBM,CPBW-1.0") || in pSeries_probe()