Subject: CVS commit: src/sys
To: None <source-changes@NetBSD.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: source-changes
Date: 07/03/2004 00:14:30
Module Name:	src
Committed By:	manu
Date:		Sat Jul  3 00:14:30 UTC 2004

Modified Files:
	src/sys/arch/powerpc/include: darwin_machdep.h
	src/sys/compat/darwin: darwin_exec.c darwin_exec.h files.darwin
	src/sys/kern: exec_conf.c
Added Files:
	src/sys/compat/darwin: darwin_commpage.c darwin_commpage.h

Log Message:
In MacOS X.3, the kernel maps tw opages of memory in every user process.
This areas is called the comm pages. It is used to provide fast access to
several data and functions.

The comm pages are mapped starting at 0xffff800 (address chosed so that
absolute branch can be used, so it can be accessed even when dynamic linking
is not ready). NetBSD has the user stack here, so we need to provide a
Darwin-specific stack setup routine which sets the top of the stack at
0xbfff0000.

This implementation is not complete but it does enough to get MacOS X.3
starting again (static binaries run, dynamic binaries still have an issue).
in the comm pages functions, we only implement bcopy, pthread_self and
memcpy.

TODO:
- clean up the powerpc specific code from MD parts
- for now we map only one page to avoid a crash, we want two pages.
- write all the comm functions.


To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 src/sys/arch/powerpc/include/darwin_machdep.h
cvs rdiff -r0 -r1.1 src/sys/compat/darwin/darwin_commpage.c \
    src/sys/compat/darwin/darwin_commpage.h
cvs rdiff -r1.35 -r1.36 src/sys/compat/darwin/darwin_exec.c
cvs rdiff -r1.10 -r1.11 src/sys/compat/darwin/darwin_exec.h
cvs rdiff -r1.16 -r1.17 src/sys/compat/darwin/files.darwin
cvs rdiff -r1.84 -r1.85 src/sys/kern/exec_conf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.