[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: powerbook g3



On Tue, Jun 1, 1999, Josh Huber <huberj@WPI.EDU> wrote:

>> Just out of curiosity does anyone have MacOS X maybe they have power
>> management there that we can we look at code from?
>I think Paul mentioned that even though MacOS X server runs on the G3
>powerbooks, it doesn't support sleep (am I wrong here?)
>
>As a side note, I got somewhere between 5-10 people come up to me at the
Linux
>expo and ask me lots of questions about Linux on the powerbooks...mostly
people
>who were considering getting one of the nice new slim ones instead of YAPC.

Welcome to the team of people who watched the PowerBook reboot for hours
trying to get it sleep ;-)

I managed to grab some infos about the sleep process of those machines,
but it still requires some ROM diassembling before we can figure it out
completely.

The main difference with older PowerBook models is that the CPU is
completely powered off and reset on wakeup. The ROM reset vector looks
for a structure with a magic word or some kind of checksum, I don't know
for sure, at a fixed location in memory (I didn't figure out the location
yet). This structure contains infos (registers, PC, ...) used for
resuming the OS.

So in order to get it work on linux, we must:

 - Figure out the gory details of the above process, including the MMU
setup used by the ROM when looking for this structure

 - Hack the kernel so that the location used by this structure (probably
an absolute physical address) is reserved. The structure is certainly
somewhere in low memory, somwhere after the exception vectors, so in the
middle of the kernel code.

 - Change via-pmu.c sleep code so that it doesn't try to hack the memory
controller of previous machines when faced with a Grackle based machine,
and add code so that Grackle goes to sleep too (I think NAP mode is used
by MacOS).

 - Add the remaining sleep/wakeup notifiers to drivers that didn't need
them until now (Paul added them to the drivers used by the 3400, but this
doesnt't include atyfb for example).

-- 
           Perso. e-mail: <mailto:bh40@calva.net>
           Work   e-mail: <mailto:benh@mipsys.com>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>




Reply to: