[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
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Nov 23 00:04:12 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214761
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 at FreeBSD.org
Reporter: markmi at 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
Index: /usr/src/sys/powerpc/aim/mmu_oea.c
===================================================================
--- /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
"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".
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list