summaryrefslogtreecommitdiffstats
path: root/doc/opal-api
Commit message (Collapse)AuthorAgeFilesLines
...
* doc/opal-api: Documentation for OPAL_GET_XIVE_SOURCENageswara R Sastry2016-08-301-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>
* doc/opal-api: Documentation for opal-ipmi-send-recvPridhiviraj Paidipeddi2016-08-301-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>
* doc/opal-api: Documentation for opal-nvram-read-writePridhiviraj Paidipeddi2016-08-301-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>
* doc/opal-api/opal-elog: heavily rework error log documentationStewart Smith2016-08-101-73/+62
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api : Document opal-api's related to error logMukesh Ojha2016-08-091-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>
* doc/opal-api: fix some formatting in OPAL_CONSOLE read/writeStewart Smith2016-08-091-3/+3
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api : Corrects typo errors and adheres to sphinx documentationMukesh Ojha2016-08-093-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>
* doc/opal-api: fix ReStructured Text syntaxStewart Smith2016-08-0248-662/+961
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api: rename .txt to .rstStewart Smith2016-08-0248-0/+0
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal-api/: Fix ReStructured Text syntaxStewart Smith2016-08-022-38/+137
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api: rename .txt to .rstStewart Smith2016-08-022-0/+0
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add opal-api/index.rstStewart Smith2016-08-021-0/+12
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Document changes to how firmware versions are passed to host on P9Stewart Smith2016-07-201-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>
* device-tree: Only advertise ibm, opal-v3 (not v2) on POWER9 and aboveStewart Smith2016-07-201-1/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api: Document OPAL_PCI_GET_PHB_DIAG_DATA2Russell Currey2016-07-201-0/+24
| | | | | Signed-off-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc: add OPAL_SYNC_HOST_REBOOT documentationStewart Smith2016-07-181-0/+15
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* OPAL_REINIT_CPUS: clarify that for P9 and above, we can have other flagsStewart Smith2016-07-142-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>
* Document OPAL_RETURN_CPU and OPAL_REINIT_CPUSStewart Smith2016-07-142-0/+44
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add documentation for OPAL_PCI_TCE_KILLStewart Smith2016-07-081-0/+55
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/OPAL_INT_EOI: document positive return valueStewart Smith2016-07-061-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>
* Reserve OPAL API numbers for XICS emulation for XIVEStewart Smith2016-07-064-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>
* doc/opal-api/power9-changes: Document needed device tree fixStewart Smith2016-06-211-0/+4
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Document changes in OPAL API for POWER9Stewart Smith2016-06-211-0/+19
| | | | | | Well, the beginning of a TODO list at least Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix for typosFrederic Bonnard2016-06-202-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>
* core/opal: Support PCI slot and new APIsGavin Shan2016-06-143-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>
* core/fdt: Introduce opal_get_device_tree()Gavin Shan2016-06-141-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>
* xscom: Return OPAL_WRONG_STATE on XSCOM ops if CPU is asleepRussell Currey2016-03-311-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>
* Add OPAL_CONSOLE_FLUSH to the OPAL APIRussell Currey2016-01-121-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>
* doc/opal-api: Add OPAL_CEC_REBOOT2 OPAL call descriptionVipin K Parashar2015-07-311-0/+54
| | | | | | | | | This patch adds doc/opal-api/opal-cec-reboot-6-116.txt file to add description for OPAL_CEC_REBOOT* OPAL call. Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add OPAL_READ_TPO and OPAL_WRITE_TPO documentationStewart Smith2015-07-161-0/+15
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* occ: Poll OCC throttle status and queue OCC events to hostShilpasri G Bhat2015-07-061-0/+43
| | | | | | | | | | | | | | | | | Add a new class of message definition OPAL_MSG_OCC to opal_message_type to notify the following OCC events to host: 1) OCC Reset 2) OCC Load 3) OCC Throttle Status Change Add an opal poller to periodically read throttle status updated by OCC for each chip and notify any change in throttle status to host. The throttle status indicates the reason why OCC may have limited the max Pstate of the chip. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* doc/opal-api: Add description of OPAL EPOW and DPO messagesVipin K Parashar2015-06-291-5/+15
| | | | | | | Updated opal-messages.txt with description of OPAL EPOW and DPO messages Signed-off-by: Vipin K Parashar <vipin@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add the final bits of old docs OPAL calls related to PCIStewart Smith2015-06-114-0/+241
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add more OPAL documentation: MSI, XIVE, PHB MMIOStewart Smith2015-06-114-0/+139
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add some OPAL API docs for PCI_XIVE callsStewart Smith2015-06-112-0/+47
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add basic OPAL_CEC_POWER_DOWN documentationStewart Smith2015-06-111-0/+25
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Update OPAL_RTC_READ and OPAL_RTC_WRITE documentation to include BCD formatStewart Smith2015-06-112-2/+13
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add more documentationStewart Smith2015-06-114-0/+197
| | | | | | | | Most of the PCI docs come from old documents and thus come with appropriate warnings about accuracy. Much of this is designed to be a *starting point* for real documentation. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LED: Add system attention indicator supportVasant Hegde2015-05-071-0/+19
| | | | | | | | | | | | | | | | SAI is controlled by FSP. This patch adds support to get/set this indicator. Also update OPAL interface so that playload can read/set this indicator. During init, we read this indicator state using MBOX command. OPAL uses MBOX interface to update this SAI. FSP sends update notification whenever there is change in SAI state (except for OPAL initiates updates). We use the notification to update cached SAI state. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/CUPD: Code Update OPAL API documentationVasant Hegde2015-05-071-0/+78
| | | | | | | Add documentation for FSP based machine code update API. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* sensor: return OPAL_UNSUPPORTED when no sensors are supportedCédric Le Goater2015-03-241-0/+1
| | | | | | | | | The OPAL_SENSOR_READ call in Linux currently only tests for OPAL_ASYNC_COMPLETION value. It is safe to change this return value to give some extra information on the platform sensor support. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* sensor: add documentation for the OPAL_SENSOR_READ callCédric Le Goater2015-03-241-0/+32
| | | | | Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* FSP/LEDS: Add OPAL interfaces for accessing or modifying the LED statesVasant Hegde2015-03-201-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds and registers the following two new OPAL interfaces for the LED subsystem. With the help of these new OPAL calls, the host will be able to set or query the state of various LEDs on the system at any given location code (as passed in the device tree). As of now, it supports two kinds of LEDs on the same location code one is "Identify LED" and the other being the "Fault LED". (1) OPAL_LEDS_GET_INDICATOR fsp_opal_leds_get_ind (2) OPAL_LEDS_SET_INDICATOR fsp_opal_leds_set_ind The signtaure of these OPAL interfaces are like the following (1) fsp_opal_leds_get_ind(loc_code, led_mask, led_value, led_max_type) The host will pass the location code of the LED (loc_code) and maximum number of LED types it understands (led_max_type). Sapphire updates the led_mask with set bits pointing to LED types whose status is availbale and updates the led_value with actual status. Sapphire checks the led_max_type to understand whether host is newer or older compared to itself. In the case where the Sapphire is newer compared to host (Sapphire's led_max_type > host's led_max_type), it will update led_mask and led_value according to led_max_type requested by the host. When the host is newer compared to the Sapphire (host's led_max_type > Sapphire's led_max_type), Sapphire updates led_max_type to the maximum number of LED type it understands and updates led_mask, led_value based on that maximum value. (2) fsp_opal_leds_set_ind(loc_code, led_mask, led_value, led_max_type) The host will pass the location code of the LED types, mask, value and maximum number of LED types it understands. Sapphire will update LED status for all the LED types mentioned in the mask with their value mentioned. Sapphire checks the 'led_max_type' to understand whether the host is newer or older compared to itself. In case where the Sapphire is newer compared to the host (Sapphire's led_max_type > host's led_max_type), it updates LED status based on led_max_type requested from the host. When the host is newer compared to the Sapphire (host's led_max_type > Sapphire's led_max_type), Sapphire updates 'led_max_type' to the maximum number of LED type it understands and then it updates LED status based on that updated maximum value of LED types. Host needs to check the returned updated value of led_max_type to figure out which part of it's request got served and which ones got ignored. Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add basic OPAL_XSCOM_READ and OPAL_XSCOM_WRITE docsStewart Smith2015-03-171-0/+12
| | | | | | Intentionally lazy as lazy docs are better than no docs. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* opal: Update doc/opal-api/opal-messages.txtMahesh Salgaonkar2015-03-171-5/+41
| | | | | | | | Update doc/opal-api/opal-messages.txt to add more documentation on the HMI event structure. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Refactor fsp-rtc.c to not call fsp_sync_msg (and thus pollers) with lock heldStewart Smith2015-03-062-0/+53
| | | | | | | | | | We introduce simple state machine, have liberal assert()s and very clearly indicate what's protected by the lock (everything). We also stop waiting for the initial RTC response on boot, which will ever so slightly speed up booting. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* hw/prd: Add firmware PRD handling subsystemJeremy Kerr2015-03-042-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds Processor Recovery Diagnostics (PRD) code to skiboot firmware. This allows certain hardware RAS events to be handled by a userspace application. The core of the PRD code is a messaging interface to the kernel (and onwards to userspace). PRD events are logged with the prd.c code, and sent to the kernel as opal_msg messages. For responses to these messages, the kernel will reply using a new OPAL call, opal_prd_msg. Only one message is outstanding at a time; we collect events from hardware interrupts (hooked up by subsequent patches), and set per-processor event bits. Once an event has been consumed by the kernel, we clear that event from out pending set, and send any further pending events. Certain events (hardware attentions from the psi layer) need to be masked at interrupt time. For these, we have an acknowledgement facility to clear the mask once the userspace PRD application has cleared the source of the error. Includes multiple contributions from: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* core/flash: Add flash APIJeremy Kerr2015-02-191-0/+72
| | | | | | | | | | | | | | | | | | | We'd like to enable access to the system PNOR, on platforms where its present. This change introduces an API for global flash operations: opal_flash_read opal_flash_erase opal_flash_write - plus device-tree bindings to expose the flash details. Since there are other components of the system that use the PNOR (NVRAM and pnor_load_resource), upcoming changes will port this these over to use the new interface. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* s/OpalMessageType/opal_msg_type/ removing CamelCase and being consistent!Stewart Smith2015-02-161-1/+1
| | | | | | We now consistently use msg as abbreviation for message in OPAL API. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Rename opal-get-message.txt to opal-get-msg-85.txtStewart Smith2015-02-161-4/+4
| | | | | | It turns out that MESSAGE vs MSG in places is already confusing Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud