Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2016 00:04:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 214761] head -r279594 (2015-Mar-4 11-CURRENT) introduced iMac G3 boot-time crash; release/11.x releng/11.x stable/11 and head (12-CURRENT) broken
Message-ID:  <bug-214761-8@https.bugs.freebsd.org/bugzilla/>

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

            Bug ID: 214761
           Summary: head -r279594 (2015-Mar-4 11-CURRENT) introduced iMac
                    G3 boot-time crash; release/11.x releng/11.x stable/11
                    and head (12-CURRENT) broken
           Product: Base System
           Version: 11.0-STABLE
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: markmi@dsl-only.net

This defect goes back to 2015-Mar-4's -r279594 head and so applies to:
release/11.0.x releng/11.0 stable/11 and head (12-CURRENT).
[It was not MFC'd to any 10.x or before.]

-r279594 dropped a couple of powerpc isync instructions from the original
code that was replaced that provide so-called "context-synchronizing".
Without that the iMac G3 that I have access to crashes very early in the
boot when it attempts a process context switch (just after moea_activate
returns to pmap_activate).

The moea_activate fix that I tried that allowed the iMac G3 to boot was:

# svnlite diff /usr/src/sys/powerpc/aim/mmu_oea.c=20
Index: /usr/src/sys/powerpc/aim/mmu_oea.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- /usr/src/sys/powerpc/aim/mmu_oea.c  (revision 308874)
+++ /usr/src/sys/powerpc/aim/mmu_oea.c  (working copy)
@@ -991,7 +991,9 @@
        CPU_SET(PCPU_GET(cpuid), &pm->pm_active);
        PCPU_SET(curpmap, pmr);

+       isync();
        mtsrin(USER_SR << ADDR_SR_SHFT, td->td_pcb->pcb_cpu.aim.usr_vsid);
+       isync();
 }

 void



Before -r279594 an isync was used on both sides of the mtsr instruction
that was then in use in a different place. The above puts back the pair.

As I understand PowerPC general requirements:

mtsr(instruction access):   no synchronization required before;
                            context synchronization required after
mtsrin(instruction access): no synchronization required before;
                            context synchronization required after

So the same criteria. isync, sc, or rfi would be=20
"context-synchronizing".

mtsr(data access):   context synchronization required before;
                     context synchronization required after
mtsrin(data access): context synchronization required before;
                     context synchronization required after

So even more required for this context: before and after.
Again isync would be "context-synchronizing".

--=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-214761-8>