Date: Wed, 10 Feb 2021 03:20:14 GMT From: Brandon Bergren <bdragon@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 187492ef639f - stable/13 - powerpc64: Fix boot on virtual-mode OF (PowerMac G5) Message-ID: <202102100320.11A3KELi083351@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bdragon: URL: https://cgit.FreeBSD.org/src/commit/?id=187492ef639fecde6c122838cfff0a75d8b94608 commit 187492ef639fecde6c122838cfff0a75d8b94608 Author: Brandon Bergren <bdragon@FreeBSD.org> AuthorDate: 2021-02-07 22:05:41 +0000 Commit: Brandon Bergren <bdragon@FreeBSD.org> CommitDate: 2021-02-10 03:19:45 +0000 powerpc64: Fix boot on virtual-mode OF (PowerMac G5) In 78599c32efed3247d165302a1fbe8d9203e38974, CFI endproc decoration was added to locore64.S. However, it missed the subtle detail that __restartkernel_virtual() falls through to __restartkernel(). This was causing boot failure on PowerMac G5, as it tried to execute the epilogue as code. Fix this by branching to __restartkernel() instead of intentionally running off the end of the function. While here, add some additional notes on how the virtual mode restart works. (cherry picked from commit d26f2a50ff48dacd38ba358d658882d51f7bdbc4) --- sys/powerpc/aim/locore64.S | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/powerpc/aim/locore64.S b/sys/powerpc/aim/locore64.S index 0bc0619620d9..f0a183c4b331 100644 --- a/sys/powerpc/aim/locore64.S +++ b/sys/powerpc/aim/locore64.S @@ -255,6 +255,16 @@ ASENTRY_NOPROF(__restartkernel_virtual) addi %r14, %r14, 1 cmpdi %r14, 16 blt 1b + + /* + * Now that we are set up with a temporary direct map, we can + * continue with __restartkernel. Translation will be switched + * back on at the rfid, at which point we will be executing from + * the temporary direct map we just installed, until the kernel + * takes over responsibility for the MMU. + */ + bl __restartkernel + nop ASEND(__restartkernel_virtual) ASENTRY_NOPROF(__restartkernel)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102100320.11A3KELi083351>