freebsd-nq/sys/powerpc/powernv
Breno Leitao 78f4e2fea0 powerpc64/powernv: re-read RTC after polling
If OPAL_RTC_READ is busy and does not return the information on the first run,
as returning OPAL_BUSY_EVENT, the system will crash since ymd and hmsm variable
will contain junk values.

This is happening because we were not calling OPAL_RTC_READ again after
OPAL_POLL_EVENTS' return, which would finally replace the old/junk hmsm and ymd
values.

The code was also mixing OPAL_RTC_READ and OPAL_POLL_EVENTS return values.

This patch fix this logic and guarantee that we call OPAL_RTC_READ after
OPAL_POLL_EVENTS return, and guarantee the code will only proceed if
OPAL_RTC_READ returns OPAL_SUCCESS.

Reviewed by: jhibbits
Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D16617
2018-08-08 21:19:07 +00:00
..
opal_console.c Support multiple OPAL consoles, and don't crash if uart is not stdout 2018-06-29 19:35:25 +00:00
opal_dev.c powerpc64/powernv: re-read RTC after polling 2018-08-08 21:19:07 +00:00
opal_i2c.c powerpc/powernv: Make opal_i2c driver work with attached i2c drivers 2018-07-09 20:33:48 +00:00
opal_i2cm.c Reverting r330925 for now 2018-03-15 06:19:45 +00:00
opal_pci.c powerpc64/powernv: Avoid type promotion 2018-06-12 19:50:33 +00:00
opal_sensor.c Fix a typo missed in r334232 2018-05-26 04:24:25 +00:00
opal.c
opal.h Add an IPMI attachment for PowerNV systems 2018-05-22 03:57:32 +00:00
opalcall.S
platform_powernv.c Add support for the XIVE XICS emulation mode for POWER9 systems 2018-05-20 03:23:17 +00:00
powernv_centaur.c Reverting r330925 for now 2018-03-15 06:19:45 +00:00
powernv_xscom.c Reverting r330925 for now 2018-03-15 06:19:45 +00:00