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/ppc-pci.h>
69 #include <asm/isa-bridge.h>
71 #include <asm/asm-const.h>
95 early_param("no-steal-acc", parse_no_stealacc);
98 int CMO_PrPSP = -1;
99 int CMO_SecPSP = -1;
123 /* Initialize firmware assisted non-maskable interrupts if
138 ibm_nmi_register_token = rtas_token("ibm,nmi-register"); in fwnmi_init()
142 ibm_nmi_interlock_token = rtas_token("ibm,nmi-interlock"); in fwnmi_init()
148 system_reset_addr = __pa(system_reset_fwnmi) - PHYSICAL_START; in fwnmi_init()
149 machine_check_addr = __pa(machine_check_fwnmi) - PHYSICAL_START; in fwnmi_init()
156 * Allocate a chunk for per cpu buffer to hold rtas errorlog. in fwnmi_init()
157 * It will be used in real mode mce handler, hence it needs to be in fwnmi_init()
168 paca_ptrs[i]->mce_data_buf = mce_data_buf + in fwnmi_init()
184 paca_ptrs[i]->mce_faulty_slbs = slb_ptr + (mmu_slb_size * i); in fwnmi_init()
196 platform_device_register_simple("pseries-wdt", 0, NULL, 0); in pseries_wdt_init()
209 chip->irq_eoi(&desc->irq_data); in pseries_8259_cascade()
220 for_each_node_by_type(np, "interrupt-controller") { in pseries_setup_i8259_cascade()
246 addrp = of_get_property(np, "8259-interrupt-acknowledge", NULL); in pseries_setup_i8259_cascade()
250 intack = addrp[naddr-1]; in pseries_setup_i8259_cascade()
252 intack |= ((unsigned long)addrp[naddr-2]) << 32; in pseries_setup_i8259_cascade()
282 struct device_node *parent, *np = rd->dn; in pci_dn_reconfig_notifier()
291 pci_add_device_node_info(pdn->phb, np); in pci_dn_reconfig_notifier()
298 list_del(&pdn->list); in pci_dn_reconfig_notifier()
316 * and register the buffers with the hypervisor. This is used for
317 * computing time stolen by the hypervisor.
364 * low power mode by ceding processor to hypervisor in pseries_lpar_idle()
396 * just give up rather than wasting any more time on this - if that turns out
514 phb->controller_ops = pseries_pci_controller_ops; in pSeries_discover_phbs()
534 * The features below are disabled by default, so we instead look to see in init_cpu_char_feature_flags()
537 if (result->character & H_CPU_CHAR_SPEC_BAR_ORI31) in init_cpu_char_feature_flags()
540 if (result->character & H_CPU_CHAR_BCCTRL_SERIALISED) in init_cpu_char_feature_flags()
543 if (result->character & H_CPU_CHAR_L1D_FLUSH_ORI30) in init_cpu_char_feature_flags()
546 if (result->character & H_CPU_CHAR_L1D_FLUSH_TRIG2) in init_cpu_char_feature_flags()
549 if (result->character & H_CPU_CHAR_L1D_THREAD_PRIV) in init_cpu_char_feature_flags()
552 if (result->character & H_CPU_CHAR_COUNT_CACHE_DISABLED) in init_cpu_char_feature_flags()
555 if (result->character & H_CPU_CHAR_BCCTR_FLUSH_ASSIST) in init_cpu_char_feature_flags()
558 if (result->character & H_CPU_CHAR_BCCTR_LINK_FLUSH_ASSIST) in init_cpu_char_feature_flags()
561 if (result->behaviour & H_CPU_BEHAV_FLUSH_COUNT_CACHE) in init_cpu_char_feature_flags()
564 if (result->behaviour & H_CPU_BEHAV_FLUSH_LINK_STACK) in init_cpu_char_feature_flags()
568 * The features below are enabled by default, so we instead look to see in init_cpu_char_feature_flags()
573 if (!(result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY)) { in init_cpu_char_feature_flags()
576 } else if (result->behaviour & H_CPU_BEHAV_FAVOUR_SECURITY_H) in init_cpu_char_feature_flags()
581 if (!(result->behaviour & H_CPU_BEHAV_L1D_FLUSH_PR)) in init_cpu_char_feature_flags()
584 if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY) in init_cpu_char_feature_flags()
587 if (result->behaviour & H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS) in init_cpu_char_feature_flags()
590 if (result->behaviour & H_CPU_BEHAV_NO_STF_BARRIER) in init_cpu_char_feature_flags()
593 if (!(result->behaviour & H_CPU_BEHAV_BNDS_CHK_SPEC_BAR)) in init_cpu_char_feature_flags()
605 * Set features to the defaults assumed by init_cpu_char_feature_flags() in pseries_setup_security_mitigations()
669 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_get_iov_fw_value()
708 res = &dev->resource[r + PCI_IOV_RESOURCES]; in of_pci_set_vf_bar_size()
711 res->flags = pci_parse_of_flags(of_read_number in of_pci_set_vf_bar_size()
713 res->flags |= (IORESOURCE_MEM_64 | IORESOURCE_PCI_FIXED); in of_pci_set_vf_bar_size()
714 res->name = pci_name(dev); in of_pci_set_vf_bar_size()
715 res->start = base; in of_pci_set_vf_bar_size()
716 res->end = base + size - 1; in of_pci_set_vf_bar_size()
734 res = &dev->resource[r + PCI_IOV_RESOURCES]; in of_pci_parse_iov_addrs()
737 res->name = pci_name(dev); in of_pci_parse_iov_addrs()
738 res->start = base; in of_pci_parse_iov_addrs()
739 res->end = base + size - 1; in of_pci_parse_iov_addrs()
741 dev_dbg(&dev->dev, in of_pci_parse_iov_addrs()
746 dev_info(&dev->dev, in of_pci_parse_iov_addrs()
749 conflict->name, conflict); in of_pci_parse_iov_addrs()
750 res->flags |= IORESOURCE_UNSET; in of_pci_parse_iov_addrs()
759 pci_warn(pdev, "No hypervisor support for SR-IOV on this device, IOV BARs disabled.\n"); in pseries_disable_sriov_resources()
761 pdev->resource[i + PCI_IOV_RESOURCES].flags = 0; in pseries_disable_sriov_resources()
770 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_pci_fixup_resources()
782 if (!pdev->is_physfn) in pseries_pci_fixup_iov_resources()
785 indexes = of_get_property(dn, "ibm,open-sriov-vf-bar-info", NULL); in pseries_pci_fixup_iov_resources()
799 reg = of_get_property(dn, "ibm,is-open-sriov-pf", NULL); in pseries_pci_iov_resource_alignment()
803 if (!pdev->is_physfn) in pseries_pci_iov_resource_alignment()
806 resno - PCI_IOV_RESOURCES, in pseries_pci_iov_resource_alignment()
824 /* openpic global configuration register (64-bit format). */ in pSeries_setup_arch()
825 /* openpic Interrupt Source Unit pointer (64-bit format). */ in pSeries_setup_arch()
826 /* python0 facility area (mmio) (64-bit format) REAL address. */ in pSeries_setup_arch()
837 /* By default, only probe PCI (can be overridden by rtas_pci) */ in pSeries_setup_arch()
892 ppc_md.progress(init_utsname()->version, 0); in pSeries_init_panel()
939 * fw_cmo_feature_init - FW_FEATURE_CMO is not stored in ibm,hypertas-functions,
948 pr_debug(" -> fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
951 call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1, in pSeries_cmo_feature_init()
960 pr_debug(" <- fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
964 end = rtas_data_buf + CMO_MAXLENGTH - 2; in pSeries_cmo_feature_init()
969 /* Separate the key and value by replacing '=' with '\0' and in pSeries_cmo_feature_init()
1002 if (CMO_PrPSP != -1 || CMO_SecPSP != -1) { in pSeries_cmo_feature_init()
1012 pr_debug(" <- fw_cmo_feature_init()\n"); in pSeries_cmo_feature_init()
1037 if (of_property_read_bool(of_root, "ibm,powervm-partition") || in pseries_add_hw_description()
1038 of_property_read_bool(of_root, "ibm,fw-net-version")) in pseries_add_hw_description()
1047 pr_debug(" -> pseries_init()\n"); in pseries_init()
1066 pr_debug(" <- pseries_init()\n"); in pseries_init()
1070 * pseries_power_off - tell firmware about how to power off the system.
1072 * This function calls either the power-off rtas token in normal cases
1073 * or the ibm,power-off-ups token (if present & requested) in case of
1074 * a power failure. If power-off token is used, power on will only be
1075 * possible with power button press. If ibm,power-off-ups token is used
1081 int rtas_poweroff_ups_token = rtas_token("ibm,power-off-ups"); in pseries_power_off()
1088 rc = rtas_call(rtas_token("power-off"), 2, 1, NULL, -1, -1); in pseries_power_off()
1089 printk(KERN_INFO "RTAS power-off returned %d\n", rc); in pseries_power_off()
1092 printk(KERN_INFO "RTAS ibm,power-off-ups returned %d\n", rc); in pseries_power_off()
1105 if (of_machine_is_compatible("IBM,CPBW-1.0") || in pSeries_probe()