]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PowerPC] Fix setting of time in OPAL
authorbdragon <bdragon@FreeBSD.org>
Thu, 10 Sep 2020 01:49:53 +0000 (01:49 +0000)
committerbdragon <bdragon@FreeBSD.org>
Thu, 10 Sep 2020 01:49:53 +0000 (01:49 +0000)
commitc2230e2ff02894280462f04bc720694ee45ff74f
tree1cf8de6a9e0a34a4ffd540869c2d93e2fd57b2ae
parent3b413429aa5a24bb84743c7d7345b47bb6b7838a
[PowerPC] Fix setting of time in OPAL

There were multiple bugs in the OPAL RTC code which had never been
discovered, as the default configuration of OPAL machines is to
have the BMC / FSP control the RTC.

* Fix calling convention for setting the time -- the variables are passed
directly in CPU registers, not via memory.

* Fix bug in the bcd encoding routines. (from jhibbits)

Tested on POWER9 Talos II (BE) and POWER9 Blackbird (LE).

Reviewed by: jhibbits (in irc)
Sponsored by: Tag1 Consulting, Inc.
sys/powerpc/powernv/opal_dev.c