Port-sparc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: partially working SMP again
ah, i fixed the locore.s %sp fix.
infact, it seems it wasn't %sp but %fp.
i still get hangs entering single user or while in single user with this
but dropping to ddb works fine now.
i think i have observed two different cases:
- if cpu1 gets to run nfs_boot() than i don't get root mounted
and my system hangs after printed "nfs_boot: trying DHCP/BOOTP"
- if cpu0 gets to run nfs_boot(), i can get a single user shell
and i can run a few apps. but not many.
i got to the %fp fix above while reading the interrupt handler code
that checks %sp/%fp to see what was active at the time of the intr.
ie, user mode, kernel mode, intr kernel mode...
perhaps there's still an issue here, related to the fact that the
idle lwp no longer uses the interrupt stack (and intr/trap code does
checks against this.)
.mrg.
Index: locore.s
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/sparc/locore.s,v
retrieving revision 1.246
diff -p -r1.246 locore.s
*** locore.s 29 May 2009 22:06:55 -0000 1.246
--- locore.s 31 May 2009 06:03:30 -0000
*************** _C_LABEL(cpu_hatch):
*** 4601,4612 ****
wr %g6, 0, %tbr
nop; nop; nop ! paranoia
! /* Set up a stack. We use the bottom half of the interrupt stack */
set USRSTACK - CCFSZ, %fp ! as if called from user code
sethi %hi(_EINTSTACKP), %o0
ld [%o0 + %lo(_EINTSTACKP)], %o0
set (INT_STACK_SIZE/2) + CCFSZ + 80, %sp
sub %o0, %sp, %sp
/* Enable traps */
rd %psr, %l0
--- 4601,4625 ----
wr %g6, 0, %tbr
nop; nop; nop ! paranoia
! #if 1
set USRSTACK - CCFSZ, %fp ! as if called from user code
+
+ /* Set up a stack. We use the bottom half of the interrupt stack */
sethi %hi(_EINTSTACKP), %o0
ld [%o0 + %lo(_EINTSTACKP)], %o0
set (INT_STACK_SIZE/2) + CCFSZ + 80, %sp
sub %o0, %sp, %sp
+ #else
+ /*
+ * Use this CPUs idlelwp's stack
+ */
+ sethi %hi(cpcb), %o0
+ ld [%o0 + %lo(cpcb)], %o0
+ set USPACE - 80 - CCFSZ, %sp
+ add %o0, %sp, %sp
+
+ add 80, %sp, %fp
+ #endif
/* Enable traps */
rd %psr, %l0
Home |
Main Index |
Thread Index |
Old Index