aboutsummaryrefslogtreecommitdiff
path: root/external/opal-prd/hostboot-interface.h
AgeCommit message (Collapse)AuthorFilesLines
2019-07-26SPDX-ify all skiboot codeStewart Smith1-15/+5
Use Software Package Data Exchange (SPDX) to indicate license for each file that is unique to skiboot. At the same time, ensure the (C) who and years are correct. See https://spdx.org/ Signed-off-by: Stewart Smith <stewart@linux.ibm.com> [oliver: Added a few missing files] Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
2019-07-23Updating shared constants for HBRTDan Crowell1-2/+69
Updated a few sets of constants for HBRT operation based on the most recent Hostboot implementation. - added all of the PIB return codes in for scom - added return cords for firmware_request and wakeup - added capability for 'clear all wakeups' Signed-off-by: Dan Crowell <dcrowell@us.ibm.com>
2018-12-11opal-prd: hservice: Enable hservice->wakeup() in BMCShilpasri G Bhat1-0/+1
This patch enables HBRT to use HYP special wakeup register in openBMC which until now was only used in FSP based machines. This patch also adds a capability check for opal-prd so that HBRT can decide if the host special wakeup register can be used. Fixes: 49999302251b("opal-prd: Add support for runtime OCC reset in ZZ") Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2018-05-29Add prepare_hbrt_update to hbrt interfacesDan Crowell1-1/+14
Add placeholder support for prepare_hbrt_update call into hostboot runtime (opal-prd) code. This interface is only called as part of a concurrent code update on a FSP based system. Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2017-09-27opal-prd/hostboot-interface: Add API comment regarding nanosleep rangesJeremy Kerr1-0/+4
Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2017-06-06opal-prd: Sync hostboot interfaces with HBRTJeremy Kerr1-3/+191
This change adds new callbacks defined for p9, and the base thunks for the added calls. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> CC: Daniel M Crowell <dcrowell@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-16opal-prd: Fix error code from scom_read & scom_writeBenjamin Herrenschmidt1-0/+8
Currently, we always return a zero value from scom_read & scom_write, so the HBRT implementation has no way of detecting errors during scom operations. This change uses the actual return value from the scom operation from the kernel instead. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-09-16opal-prd: Add get_interface_capabilities to host interfacesJeremy Kerr1-1/+15
We need a way to indicate behaviour changes & fixes in the prd interface, without requiring a major version bump. This change introduces the get_interface_capabilities callback, returning a bitmask of capability flags, pertaining to 'sets' of capabilities. We currently return 0 for all. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> [stewart@linux.vnet.ibm.com: Dan Crowell says "The interface looks good to me"] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-20Fix for typosFrederic Bonnard1-1/+1
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-04-18external/opal-prd: Ensure that struct host_interfaces matches the thunkJeremy Kerr1-1/+2
Currently, we don't describe the reserved area at the end of struct host_interfaces; it's in the thunk, but not the struct itself. This change adds the reserved area, and adds a set of runtime asserts to ensure that the struct layout matches the thunk. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-07external/opal-prd: Add 'run' option to execute HBRT commandsVaidyanathan Srinivasan1-1/+12
opal-prd client to accept run command and pass it as-is to hbrt. Example: opal-prd -d run test hbrt -t 1 -c "good cmd" argv[0] = test argv[1] = hbrt argv[2] = -t argv[3] = 1 argv[4] = -c argv[5] = good cmd Above argc/argv passed to hbrt->run_command() and result out string sent to the console. Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Patrick Williams <iawillia@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-09-07external/opal-prd: Support manufacturing command HTMGT and attribute overrideNeelesh Gupta1-1/+36
The patch adds the support to invoke manufacturing htmgt pass through and attribute override command in HBRT. The command format would look something as below: # opal-prd --expert-mode htmgt-passthru 0x10 0x11 0x12 It will pass the arguments after 'passthru' in an array as input data to hbrt->htmgt_pass_thru(). The HBRT will return the output data to a buffer provided by 'opal-prd' of maximum length 4096 bytes. # opal-prd override <file_name_of_binary_blob> It will read the contents of the binary blob into a buffer and invoke hbrt->apply_attr_override() with the buffer and size as the input to the interface. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Reviewed-by: Patrick Williams <iawillia@us.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-08-17external/opal-prd: Allow instance numbers for PRD rangesJeremy Kerr1-1/+2
We have a provision for multiple instances of the same PRD range. For example, multiple-socket systems may have a PRD range per socket. This change adds an 'int instance' argument to the get_reserved_mem() call, allowing HBRT to request a specific instance of a range. We bump the hinterface version in indicate that this new parameter is present. These ranges can be provided by ibm,prd-instance properties in the reserved-memory nodes. If these are provided, they'll be used, otherwise opal-prd will number the instances automatically, based on increading physical addreses. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-05external/opal-prd: Allow partial ops with PNOR APIJoel Stanley1-2/+2
The PNOR operations will now return the number of bytes successfully written, which may be less than the number of bytes requested, similar to read(2) and write(2). The hostboot interface is updated with this information. The signature does not change. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-03-04external/opal-prd: Add userspace support for PRD facilityJeremy Kerr1-0/+426
This change adds an application in external/opal-prd, implementing the userspace portion of a PRD stack. This code is responsible for loading the HBRT code from reserved memory, and provding hostboot runtime functionality through a set of callbacks. Because we may be running little-endian (and expect the HBRT code to be big-endian), we need to thunk the endianness between calls through the HBRT interface. Includes multiple contributions from: Joel Stanley <joel@jms.id.au> Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Benjamin Herrenschmidt <benh@kernel.crashing.org Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [stewart@linux.vnet.ibm.com: squash trailing whitespace] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>