* Sleeping the powerbook G3 (more)
@ 1999-06-18 22:19 Benjamin Herrenschmidt
0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 1999-06-18 22:19 UTC (permalink / raw)
To: linuxppc-dev, huberj
I think I have located the piece of MacOS nanokernel code that handles
the lowest level steps of the sleep/wakeup process.
You need MacOS 8.6. Open the 'krnl' resource, it contains the nanokernel.
The function that handles storing the CPU context, putting the 'Lars' and
function pointers to low memory, and the code called just after wakeup
(the function pointer) begins at offset 0x6c54 of the nanokernel. It's a
huge function that does all sorts of things, mostly saving lots of stuffs
to memory (registers, sprs, ...), calling a function at offset 0x7228
that puts things to low-mem 0 & 4, and resuming.
The function pointer itself is the lr on entry of the function at offset
0x7228, so waking up just resume normal execution after the call to this
function.
If you want to disassemble that stuff with MacsBug, either load manually
this resource somewhere in RAM, or locate the nanokernel in memory with
the 'f' command.
I can't spend more time on this for now, so if someone wants to continue...
--
Perso. e-mail: <mailto:bh40@calva.net>
Work e-mail: <mailto:benh@mipsys.com>
BenH. Web : <http://calvaweb.calvacom.fr/bh40/>
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-06-18 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-06-18 22:19 Sleeping the powerbook G3 (more) Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).