aboutsummaryrefslogtreecommitdiff
path: root/doc/opal-api
AgeCommit message (Collapse)AuthorFilesLines
2018-03-01phb4: set PBCQ Tunnel BAR for tunneled operationsPhilippe Bergheaud1-0/+76
P9 supports PCI tunneled operations (atomics and as_notify) that are initiated by devices. A subset of the tunneled operations require a response, that must be sent back from the host to the device. For example, an atomic compare and swap will return the compare status, as swap will only performed in case of success. Similarly, as_notify reports if the target thread has been woken up or not, because the operation may fail. To enable tunneled operations, a device driver must tell the host where it expects tunneled operation responses, by setting the PBCQ Tunnel BAR Response register with a specific value within the range of its BARs. This register is currently initialized by enable_capi_mode(). But, as tunneled operations may also operate in PCI mode, a new API is required to set the PBCQ Tunnel BAR Response register, without switching to CAPI mode. This patch provides two new OPAL calls to get/set the PBCQ Tunnel BAR Response register. Note: as there is only one PBCQ Tunnel BAR register, shared between all the devices connected to the same PHB, only one of these devices will be able to use tunneled operations, at any time. Signed-off-by: Philippe Bergheaud <felix@linux.vnet.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-03-01doc/opal-api: Document changes of adding interrupt-parent property under ↵Pridhiviraj Paidipeddi1-0/+2
/ibm, opal/ipmi node on POWER9 and above. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-03-01doc/opal-api: Document using stdout-path propertyPridhiviraj Paidipeddi1-0/+1
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-03-01npu2-opencapi: Add OpenCAPI OPAL API callsFrederic Barrat1-0/+126
Add three OPAL API calls that are required by the ocxl driver. - OPAL_NPU_SPA_SETUP The Shared Process Area (SPA) is a table containing one entry (a "Process Element") per memory context which can be accessed by the OpenCAPI device. - OPAL_NPU_SPA_CLEAR_CACHE The NPU keeps a cache of recently accessed memory contexts. When a Process Element is removed from the SPA, the cache for the link must be cleared. - OPAL_NPU_TL_SET The Transaction Layer specification defines several templates for messages to be exchanged on the link. During link setup, the host and device must negotiate what templates are supported on both sides and at what rates those messages can be sent. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-21opal-api: Re-jig OPAL API numbers because OpenCAPI kernel mergeStewart Smith2-0/+0
74d656d219b98ef3b96f92439337aa6392a7577d added OPAL APIs to kernel (and this commit is now in Linus' tree) that hadn't yet made their way to OPAL. Also, be slightly grumbly about it. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-21sensor-groups: occ: Add support to disable/enable sensor groupShilpasri G Bhat1-0/+46
This patch adds a new opal call to enable/disable a sensor group. This call is used to select the sensor groups that needs to be copied to main memory by OCC at runtime. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> [stewart: rebase and bump OPAL API number] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2018-02-21sensors: Support reading u64 sensor valuesShilpasri G Bhat1-0/+16
This patch adds support to read u64 sensor values. This also adds changes to the core and the backend implementation code to make this API as the base call. Host can use this new API to read sensors upto 64bits. This adds a list to store the pointer to the kernel u32 buffer, for older kernels making async sensor u32 reads. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-12-03core: Add support for quiescing OPALNicholas Piggin2-0/+66
Quiescing is ensuring all host controlled CPUs (except the current one) are out of OPAL and prevented from entering. This can be use in debug and shutdown paths, particularly with system reset sequences. This patch adds per-CPU entry and exit tracking for OPAL calls, and adds logic to "hold" or "reject" at entry time, if OPAL is quiesced. An OPAL call is added, to expose the functionality to Linux, where it can be used for shutdown, kexec, and before generating sreset IPIs for debugging (so the debug code does not recurse into OPAL). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-11-10Document fsp-ipl-params to sp-ipl-paramsStewart Smith1-1/+1
Fixes: eb858339cae8240367c82e6c2cc139519dbddb26 Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-16cpu: Add OPAL_REINIT_CPUS_TM_SUSPEND_DISABLEDMichael Ellerman1-0/+8
Add a new CPU reinit flag, "TM Suspend Disabled", which requests that CPUs be configured so that TM (Transactional Memory) suspend mode is disabled. Currently this always fails, because skiboot has no way to query the state. A future hostboot change will add a mechanism for skiboot to determine the status and return an appropriate error code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-15doc: clarify locking and async of OPAL_SENSOR_READStewart Smith1-1/+6
Reported-by: Robert Lippert <rlippert@google.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-10-11fsp: return OPAL_BUSY_EVENT on failure sending FSP_CMD_POWERDOWN_NORMStewart Smith2-4/+20
We had a race condition between FSP Reset/Reload and powering down the system from the host: Roughly: FSP Host --- ---- Power on Power on (inject EPOW) (trigger FSP R/R) Processes EPOW event, starts shutting down calls OPAL_CEC_POWER_DOWN (is still in R/R) gets OPAL_INTERNAL_ERROR, spins in opal_poll_events (FSP comes back) spinning in opal_poll_events (thinks host is running) The call to OPAL_CEC_POWER_DOWN is only made once as the reset/reload error path for fsp_sync_msg() is to return -1, which means we give the OS OPAL_INTERNAL_ERROR, which is fine, except that our own API docs give us the opportunity to return OPAL_BUSY when trying again later may be successful, and we're ambiguous as to if you should retry on OPAL_INTERNAL_ERROR. For reference, the linux code looks like this: >static void __noreturn pnv_power_off(void) >{ > long rc = OPAL_BUSY; > > pnv_prepare_going_down(); > > while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) { > rc = opal_cec_power_down(0); > if (rc == OPAL_BUSY_EVENT) > opal_poll_events(NULL); > else > mdelay(10); > } > for (;;) > opal_poll_events(NULL); >} Which means that *practically* our only option is to return OPAL_BUSY or OPAL_BUSY_EVENT. We choose OPAL_BUSY_EVENT for FSP systems as we do want to ensure we're running pollers to communicate with the FSP and do the final bits of Reset/Reload handling before we power off the system. Additionally, we really should update our documentation to point all of these return codes and what action an OS should take. CC: stable Reported-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Acked-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-27doc: update skiboot overviewStewart Smith2-0/+4
Updates for P9, xz compressed and STB wrapped payloads amongst a great many other things. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-20core: POWER9 implement OPAL_SIGNAL_SYSTEM_RESETNicholas Piggin1-10/+16
This implements OPAL_SIGNAL_SYSTEM_RESET, using scom registers to quiesce the target thread and raise a system reset exception on it. It has been tested on DD2 with stop0 ESL=0 and ESL=1 shallow power saving modes. DD1 is not implemented because it is sufficiently different as to make support difficult. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [stewart@linux.vnet.ibm.com: fixup hdat_to_dt test] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19doc/opal-flash: fix typoStewart Smith1-1/+1
Fixes: https://github.com/open-power/skiboot/pull/85 Suggested-by: Joel Nider <JOELN@il.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19skiboot: Documentation typo in opal-return-cpuDaniel Black1-2/+2
changed OPAL_REINIT_CPU -> OPAL_REINIT_CPUS Signed-off-by: Daniel Black <daniel.black@au.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-09-19skiboot: Document P9 possible flags to OPAL_REINIT_CPUSDaniel Black1-1/+4
Signed-off-by: Daniel Black <daniel.black@au.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
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>