freebsd-dev/sys/powerpc
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
..
aim powerpc64: Fix stack setup in dbtrap 2018-06-23 01:42:34 +00:00
booke Print the full-width pointer values in hex. 2018-05-28 00:19:08 +00:00
conf Enable kernel dump features in GENERIC for most platforms. 2018-05-19 19:53:23 +00:00
cpufreq Fix the build post-PMCR addition. 2018-06-21 15:59:05 +00:00
fpu sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
include Fix floating point exception definitions for powerpcspe 2018-07-24 22:04:56 +00:00
mambo sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx Remove dead errata fixup code 2018-05-01 04:31:17 +00:00
ofw ofw: Load initrd file 2018-07-24 16:52:52 +00:00
powermac Fix null pointer dereference on nodes without a "compatible" property. 2018-04-30 19:37:32 +00:00
powernv powerpc64/powernv: re-read RTC after polling 2018-08-08 21:19:07 +00:00
powerpc Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
ps3 ifnet: Replace if_addr_lock rwlock with epoch + mutex 2018-05-18 20:13:34 +00:00
pseries Add a comment explaining the need of a global temporary variable 2018-05-22 03:24:16 +00:00
psim Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00