From: Benjamin Herrenschmidt <bh40@calva.net>
To: linuxppc-dev@lists.linuxppc.org, huberj@WPI.EDU
Subject: Sleeping the powerbook G3 (more)
Date: Sat, 19 Jun 1999 00:19:46 +0200 [thread overview]
Message-ID: <19990619001946.029087@mail.mipsys.com> (raw)
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. ]]
reply other threads:[~1999-06-18 22:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19990619001946.029087@mail.mipsys.com \
--to=bh40@calva.net \
--cc=huberj@WPI.EDU \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).