aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api
AgeCommit message (Collapse)AuthorFilesLines
2017-09-19Add Documenation for opal_slw_set_regAkshay Adiga1-0/+46
Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Reviewed-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19doc: Update OPAL API call IDs for OPAL_NPU_Stewart Smith1-3/+3
Documentation was always the one that was wrong, so we update it to reflect what was merged. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-08-04phb4: Enable PCI peer-to-peerFrederic Barrat1-0/+50
P9 supports PCI peer-to-peer: a PCI device can write directly to the mmio space of another PCI device. It completely by-passes the CPU. It requires some configuration on the PHBs involved: 1. on the initiating side, the address for the read/write operation is in the mmio space of the target, i.e. well outside the range normally allowed. So we disable range-checking on the TVT entry in bypass mode. 2. on the target side, we need to explicitly enable p2p by setting a bit in a configuration register. It has the side-effect of reserving an outbound (as seen from the CPU) store queue for p2p. Therefore we only enable p2p on the PHBs using it, as we don't want to waste the resource if we don't have to. P9 supports p2p mmio writes. Reads are currently only supported if the two devices are under the same PHB but that is expected to change in the future, and it raises questions about intermediate switches configuration, so we report an error for the time being. The patch adds a new OPAL call to allow the OS to declare a p2p (initiator, target) pair. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-08-01doc: RST syntax fixesStewart Smith2-8/+15
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-07-28sensors: occ: Add support to clear sensor groupsShilpasri G Bhat1-0/+42
Adds a generic API to clear sensor groups. OCC inband sensor groups such as CSM, Profiler and Job Scheduler can be cleared using this API. It will clear the min/max of all sensors belonging to OCC sensor groups. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-07-28psr: occ: Add support to change power-shifting-ratioShilpasri G Bhat1-0/+79
Add support to set the CPU-GPU power shifting ratio which is used by the OCC power capping algorithm. PSR value of 100 takes all power away from CPU first and a PSR value of 0 caps GPU first. Documentation enhanced by Stewart Smith. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-07-28powercap: occ: Add a generic powercap frameworkShilpasri G Bhat1-0/+96
This patch adds a generic powercap framework and exports OCC powercap sensors using which system powercap can be set inband through OPAL-OCC command-response interface. Documentation for powercap enhanced by Stewart Smith. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-27skiboot: Add documentation for IMC opal callAnju T Sudhakar1-0/+87
Add documentation for new OPAL Call APIs added for In Memory Collection(IMC) infrastructure. Three new OPAL Call APIs are added and they are opal_imc_counters_init(int Domain, u64 address, u64 cpu_pir) opal_imc_counters_start(int Domain, u64 cpu_pir) opal_imc_counters_stop(int Domain, u64 cpu_pir) Document details the input parameters and return values. Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-04-04Add skiboot-5.5.0-rc2 release notesskiboot-5.5.0-rc2Stewart Smith1-0/+8
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-30npu2: Add OPAL calls for nvlink2 address translation servicesAlistair Popple1-0/+66
Adds three OPAL calls for interacting with NPU2 devices: opal_npu_init_context, opal_npu_destroy_context and opal_npu_map_lpar. These are used to setup and configure address translation services (ATS) for a process/partition on a given NVLink2 device. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-29Add skiboot 5.5.0-rc1 release notesskiboot-5.5.0-rc1Stewart Smith1-0/+2
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-03-07System reset IPI facility and Mambo implementationNicholas Piggin1-0/+44
Add an opal call OPAL_SIGNAL_SYSTEM_RESET which allows system reset exceptions to be raised on other CPUs and act as an NMI IPI. There is an initial simple Mambo implementation, but allowances are made for a more complex hardware implementation. This API is based on the POWER8 implementation from Alistair Popple. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart@linux.vnet.ibm.com: minor RST fix] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-23platform: add OPAL_REBOOT_FULL_IPL reboot typeAndrew Donnellan1-0/+6
There may be circumstances in which a user wants to force a full IPL reboot rather than using fast reboot. Add a new reboot type, OPAL_REBOOT_FULL_IPL, that disables fast reboot. On platforms which don't support fast reboot, this will be equivalent to a normal reboot. Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-12-08doc/sensors: be explicit about the encoding of sensor ID/handle not being ABIStewart Smith1-2/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-11-15interrupts: Rewrite/correct doc for opal_set/get_xiveBenjamin Herrenschmidt2-32/+38
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28doc: link OPAL_HANDLE_INTERRUPT docs to ibm,opal DTStewart Smith1-2/+1
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28doc: device-tree snippets should be dts code-blocksStewart Smith1-3/+4
This gets us syntax highlighting of device tree snippets. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28doc: use RST references where appropriateStewart Smith6-4/+10
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28Documentation for OPAL_LPC_READ, OPAL_LPC_WRITENageswara R Sastry1-0/+82
Documentation for OPAL_LPC_READ 67 and OPAL_LPC_WRITE 68 Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-10-28Change .txt to .rst for correctnessNageswara R Sastry3-3/+3
This patch changes .txt to .rst for correctness of the documentation files, path to the documentation files Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-06core/cpu.c: Add OPAL call to setup Nest MMUAlistair Popple1-0/+22
POWER9 has an off core MMU called the Nest MMU which allows other units within a chip to perform address translations. The context and setup for translations is handled by the requesting agents, however the Nest MMU does need to know where in system memory the page tables are located. This patch adds a call to setup the Nest MMU page table pointer on a per-chip basis. Signed-off-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30pci: Standardise on uint64_t pe_numberRussell Currey5-15/+15
Throughout skiboot (and the kernel) PE numbers are named "pe_no", "pe_num" and "pe_number", and sized as 16, 32 and 64bit uints depending on where you look. This is annoying and potentially misleading in cases such as the OPAL API, where different calls have different int sizes even though the PE number they want is the same. Fix this by making *everything* uint64_t pe_number. In doing this, there are some whitespace fixes and mve_number gets dragged into this as well for cases like set_msi_{32/64} where they essentially mean the same thing. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30doc/opal-api: Documentation for OPAL_GET_XIVE_SOURCENageswara R Sastry1-0/+32
Documentation for OPAL_GET_XIVE_SOURCE 38 Signed-off-by: Nageswara R Sastry <rnsastry@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30doc/opal-api: Documentation for opal-ipmi-send-recvPridhiviraj Paidipeddi1-0/+102
This patch adds documentation for OPAL_IPMI_SEND and OPAL_IPMI_RECV Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: slight reword] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-30doc/opal-api: Documentation for opal-nvram-read-writePridhiviraj Paidipeddi1-0/+76
This patch adds documentation for OPAL_READ_NVRAM and OPAL_WRITE_NVRAM Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-10doc/opal-api/opal-elog: heavily rework error log documentationStewart Smith1-73/+62
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-09doc/opal-api : Document opal-api's related to error logMukesh Ojha1-0/+126
It documents opal-api's related to error log. OPAL_ELOG_READ 71 OPAL_ELOG_WRITE 72(UNUSED) OPAL_ELOG_ACK 73 OPAL_ELOG_RESEND 74 OPAL_ELOG_SIZE 75 Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-09doc/opal-api: fix some formatting in OPAL_CONSOLE read/writeStewart Smith1-3/+3
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-09doc/opal-api : Corrects typo errors and adheres to sphinx documentationMukesh Ojha3-7/+8
OAPL->OPAL conformining->conforming Other changes related to sphinx documentation. Signed-off-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-02doc/opal-api: fix ReStructured Text syntaxStewart Smith48-662/+961
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-02doc/opal-api: rename .txt to .rstStewart Smith48-0/+0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-02opal-api/: Fix ReStructured Text syntaxStewart Smith2-38/+137
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-02doc/opal-api: rename .txt to .rstStewart Smith2-0/+0
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-08-02Add opal-api/index.rstStewart Smith1-0/+12
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20Document changes to how firmware versions are passed to host on P9Stewart Smith1-0/+1
We won't do mi-version/ml-version, but we will always have version. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20device-tree: Only advertise ibm, opal-v3 (not v2) on POWER9 and aboveStewart Smith1-1/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-20doc/opal-api: Document OPAL_PCI_GET_PHB_DIAG_DATA2Russell Currey1-0/+24
Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-18doc: add OPAL_SYNC_HOST_REBOOT documentationStewart Smith1-0/+15
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14OPAL_REINIT_CPUS: clarify that for P9 and above, we can have other flagsStewart Smith2-0/+7
On P8 we got it a bit wrong and would fall into a workaround for P8 DD1 HILE setting if other bits were set in the flags to OPAL_REINIT_CPUS, limiting our opportunity to extend it in the future. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-14Document OPAL_RETURN_CPU and OPAL_REINIT_CPUSStewart Smith2-0/+44
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-08Add documentation for OPAL_PCI_TCE_KILLStewart Smith1-0/+55
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06doc/OPAL_INT_EOI: document positive return valueStewart Smith1-0/+5
From benh suggestion in id:1467792521.13965.118.camel@kernel.crashing.org Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-07-06Reserve OPAL API numbers for XICS emulation for XIVEStewart Smith4-0/+61
Additionally, we put in some skeleton docs for what's coming, key points being that this is for P9 and above, relies on a device being present in the device tree and is modelled on the PAPR calls. Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-21doc/opal-api/power9-changes: Document needed device tree fixStewart Smith1-0/+4
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-21Document changes in OPAL API for POWER9Stewart Smith1-0/+19
Well, the beginning of a TODO list at least Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-20Fix for typosFrederic Bonnard2-4/+4
While reviewing the Debian packaging, codespell found those. Most proposed fixes are based on codespell's default dictionnary. Signed-off-by: Frederic Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-14core/opal: Support PCI slot and new APIsGavin Shan3-0/+77
The various reset requests are completed by PHB's callbacks. All of them (except reset on IODA table or error injection) are covered by PCI slot. opal_pci_poll() faces similar situation. This reimplements opal_pci_reset() and opal_pci_poll() based on the callbacks provided by PCI slot instead of PHB. Also, couple of new APIs are introduced based on the callbacks in PCI slot as below: * opal_pci_get_presence_state(): Check if there is adapter presented behind the specified PHB or PCI slot. * opal_pci_get_power_state(): Returns power supply state (on or off) on the specified PHB or PCI slot. * opal_pci_set_power_state(): Sets power supply state (on or off) on the specified PHB or PCI slot. Besides, the state can be (offline or online) without changing the PCI slot's power state. Eventually, the definition of unused PHB's callbacks are removed. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-14core/fdt: Introduce opal_get_device_tree()Gavin Shan1-0/+24
This introduces OPAL API opal_get_device_tree() to get the device sub-tree. It's going to be used in PCI hot add path. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-31xscom: Return OPAL_WRONG_STATE on XSCOM ops if CPU is asleepRussell Currey1-0/+5
xscom_read and xscom_write return OPAL_SUCCESS if they worked, and OPAL_HARDWARE if they didn't. This doesn't provide information about why the operation failed, such as if the CPU happens to be asleep. This is specifically useful in error scanning, so if every CPU is being scanned for errors, sleeping CPUs likely aren't the cause of failures. So, return OPAL_WRONG_STATE in xscom_read and xscom_write if the CPU is sleeping. Signed-off-by: Russell Currey <ruscur@russell.cc> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-12Add OPAL_CONSOLE_FLUSH to the OPAL APIRussell Currey1-1/+15
uart consoles only flush output when polled. The Linux kernel calls these pollers frequently, except when in a panic state. As such, panic messages are not fully printed unless the system is configured to reboot after panic. This patch adds a new call to the OPAL API to flush the buffer. If the system has a uart console (i.e. BMC machines), it will incrementally flush the buffer, returning if there is more to be flushed or not. If the system has a different console, the function will have no effect. This will allow the Linux kernel to ensure that panic message have been fully printed out. The existing synchronous flushing mechanism used in OPAL's shutdown and reboot routines has been refactored into a helper that repeatedly calls the new partial flush function. Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>