Commit Graph

4 Commits

Author SHA1 Message Date
manu d4d3cc307c commpage function changes:
Copy all the commpages instead of one
Add the missing bcopy function
Wrong function name: pthread_getspecific instead of pthread_specific
2004-07-11 19:38:14 +00:00
manu 7fef082024 Move all the MD bits of commpage to a new file.
Map the comm page as RW in kernel (we want to modify it but not to execute it),
and RX in userland (no need to modify it but we want to execute it
2004-07-03 22:17:18 +00:00
manu 5d33c4b91c 2^53 does not compute 2 power 53... 2004-07-03 16:47:13 +00:00
manu 26200ee754 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.
2004-07-03 00:14:30 +00:00