Subject: Scheduler Activations support
To: None <port-pc532@netbsd.org>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: port-pc532
Date: 06/23/2003 06:20:25
Folks...

I have checked in changes to adapt the pc532 port to the Scheduler 
Activations framework used to support pthreads.  This means that the 
pc532 port compiles again.  Simon Burge as successfully booted a kernel 
with these changes when compiled with a GCC 3.3 development compiler.  
The kernel goes single-user but fails to go multi-user when built with 
a GCC 3.4 development compiler.  I'll try to investigate the compiler 
issues soon, but it probably won't be for a couple of weeks before I 
get a chance to do so.

I would appreciate it if someone would take a look over the locore.s 
changes, in particular the cpu_switchto() function.  Concerns I have 
about it:

	1. I think I am fetching the function arguments correctly,
	   but it has been a very long time since I did any ns32k
	   assembly programming.  Please make sure I didn't screw
	   this up :-)

	2. I'm concerned about the interaction with MRTD;
	   cpu_switchto() takes 2 args vs cpu_switch()'s 1, but
	   uses the same code return path as cpu_switch().

	3. I'm concerned about the lwp * in the switchframe.  I don't
	   see where this is used in cpu_switch(), and I'm worried
	   that it represents the argument slot.  This would mean it's
	   incorrect for cpu_switchto(), which takes 2 lwp * arguments.
	   Do we need to put 2 lwp *'s in switchframe, and pad it with
	   NULL in the cpu_switch() case?

In any case, cpu_switchto() is not used unless SAs are being used, so 
it should not affect normal system operation until the pthreads library 
is ported.

Begin forwarded message:

> From: Jason R Thorpe <thorpej@netbsd.org>
> Date: Mon Jun 23, 2003  6:06:58  AM US/Pacific
> To: source-changes@netbsd.org
> Subject: CVS commit: src/sys/arch/pc532
> Reply-To: thorpej@netbsd.org
>
>
> Module Name:	src
> Committed By:	thorpej
> Date:		Mon Jun 23 13:06:58 UTC 2003
>
> Modified Files:
> 	src/sys/arch/pc532/fpu: ieee_handler.h
> 	src/sys/arch/pc532/include: cpu.h frame.h pmap.h proc.h
> 	src/sys/arch/pc532/pc532: compat_13_machdep.c genassym.cf locore.s
> 	    machdep.c pmap.c process_machdep.c sys_machdep.c trap.c
> 	    vm_machdep.c
>
> Log Message:
> Adapt to the Scheduler Activations changes.
>
> Boots to multi-user when compiled with GCC 3.3 (20021123) (pre-3.3 
> release),
> boots to single-user but hangs going multi-user when compiled with 3.4
> (20030623).  This is most likely a compiler problem.
>
>
> To generate a diff of this commit:
> cvs rdiff -r1.4 -r1.5 src/sys/arch/pc532/fpu/ieee_handler.h
> cvs rdiff -r1.35 -r1.36 src/sys/arch/pc532/include/cpu.h
> cvs rdiff -r1.8 -r1.9 src/sys/arch/pc532/include/frame.h
> cvs rdiff -r1.37 -r1.38 src/sys/arch/pc532/include/pmap.h
> cvs rdiff -r1.5 -r1.6 src/sys/arch/pc532/include/proc.h
> cvs rdiff -r1.3 -r1.4 src/sys/arch/pc532/pc532/compat_13_machdep.c
> cvs rdiff -r1.10 -r1.11 src/sys/arch/pc532/pc532/genassym.cf \
>     src/sys/arch/pc532/pc532/sys_machdep.c
> cvs rdiff -r1.69 -r1.70 src/sys/arch/pc532/pc532/locore.s
> cvs rdiff -r1.140 -r1.141 src/sys/arch/pc532/pc532/machdep.c
> cvs rdiff -r1.72 -r1.73 src/sys/arch/pc532/pc532/pmap.c
> cvs rdiff -r1.11 -r1.12 src/sys/arch/pc532/pc532/process_machdep.c
> cvs rdiff -r1.51 -r1.52 src/sys/arch/pc532/pc532/trap.c
> cvs rdiff -r1.54 -r1.55 src/sys/arch/pc532/pc532/vm_machdep.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
>
         -- Jason R. Thorpe <thorpej@wasabisystems.com>