Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 May 2017 07:37:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 219589] head -r317820 (e.g.); stable/11: TARGET_ARCH=powerpc needs a (somewhat dynamic) variant of powerpc64's 205458 fix if PowerMac G5's are to be supported
Message-ID:  <bug-219589-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D219589

            Bug ID: 219589
           Summary: head -r317820 (e.g.); stable/11: TARGET_ARCH=3Dpowerpc
                    needs a (somewhat dynamic) variant of powerpc64's
                    205458 fix if PowerMac G5's are to be supported
           Product: Base System
           Version: CURRENT
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: markmi@dsl-only.net

TARGET_ARCH=3Dpowerpc64 got a fix to
bugzilla 205458.

It turns out that TARGET_ARCH=3Dpowerpc
needs to detect when it is running on
powerpc64 and do the same thing.

The issue is that for powerpc64 it is
inappropriate to restore the sprg0
value to its openfirmware value. This
is because the FreeBSD real-mode
handling is involved instead of the
openfirmware's original virtual mode.

Quoting Nathan W. from Comment
#4 of 205458:

Where this explodes is if OF uses an unmapped SLB entry. The SLB fault hand=
ler
runs in real mode and refers to the PCPU pointer in SPRG0, which blows up t=
he
kernel. Having a value of SPRG0 that works for the kernel is less fatal than
preserving OF's value in this case.

I know that part of the code does detect
the powerpc64 context vs. not and does
things differently to emulate being powerpc
like on powerpc64 (such as limiting
RAM use as a consequence).

The powerpc64 vs. not status needs to be
recorded and used to control a sprg0
restoration choice: avoid restoring
openfirmware's value on powerpc64;
otherwise restore it.


https://lists.freebsd.org/pipermail/freebsd-ppc/2017-May/008891.html

has details of the periodic/random
panics that can occur as things are.

(I've other reports on the lists as well
but the above has the best details, such
as backtraces and other information.)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-219589-8>