Commit 1549c42d authored by Stewart Smith's avatar Stewart Smith Committed by Michael Ellerman

powerpc/powernv: Update firmware archaeology around OPAL_HANDLE_HMI

The first machines to ship with OPAL firmware all got firmware updates
that have the new call, but just in case someone is foolish enough to
believe the first 4 months of firmware is the best, we keep this code
around.

Comment is updated to not refer to late 2014 as recent or the future.
Signed-off-by: default avatarStewart Smith <stewart@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent efa9ace6
......@@ -206,16 +206,18 @@ static int __init opal_register_exception_handlers(void)
glue = 0x7000;
/*
* Check if we are running on newer firmware that exports
* OPAL_HANDLE_HMI token. If yes, then don't ask OPAL to patch
* the HMI interrupt and we catch it directly in Linux.
* Only ancient OPAL firmware requires this.
* Specifically, firmware from FW810.00 (released June 2014)
* through FW810.20 (Released October 2014).
*
* For older firmware (i.e currently released POWER8 System Firmware
* as of today <= SV810_087), we fallback to old behavior and let OPAL
* patch the HMI vector and handle it inside OPAL firmware.
* Check if we are running on newer (post Oct 2014) firmware that
* exports the OPAL_HANDLE_HMI token. If yes, then don't ask OPAL to
* patch the HMI interrupt and we catch it directly in Linux.
*
* For newer firmware (in development/yet to be released) we will
* start catching/handling HMI directly in Linux.
* For older firmware (i.e < FW810.20), we fallback to old behavior and
* let OPAL patch the HMI vector and handle it inside OPAL firmware.
*
* For newer firmware we catch/handle the HMI directly in Linux.
*/
if (!opal_check_token(OPAL_HANDLE_HMI)) {
pr_info("Old firmware detected, OPAL handles HMIs.\n");
......@@ -225,6 +227,11 @@ static int __init opal_register_exception_handlers(void)
glue += 128;
}
/*
* Only applicable to ancient firmware, all modern
* (post March 2015/skiboot 5.0) firmware will just return
* OPAL_UNSUPPORTED.
*/
opal_register_exception_handler(OPAL_SOFTPATCH_HANDLER, 0, glue);
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment