Help on PMU work

Justin Hibbits chmeeedalf at gmail.com
Mon Oct 29 01:49:20 UTC 2012


I'm working on getting PMU sleep and speed control working for at least
the MPC7455-based PowerBooks and running into a snag.  I've got it
changing speed, but it immediately panics.

The method for PMU speed change is as follows:
* Tell the PMU to change PLL inputs
* Save all the needed registers (methinks I missed one or two critical
  ones, but can't figure out which)
* Flush and disable the caches
* Disable NAP and enable SLEEP in HID0
* Sleep via MSR
* PMU asserts #HRESET, and jumps to where you want (write address at
  0x80).
* Recover and restore all the necessary registers
* Go on your merry way.

I'm getting stuck on the "Go on your merry way" part.  When it
recovers, I get a 'panic: null_fetch_syscall_args'.  curthread is the
same going into and coming out of reset/restore, verified with a printf.

Any help tracking this down is greatly appreciated.  I'll be at MeetBSD
with my PowerBook, and hope to get it finished either before then, or
by the time I leave.

- Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pmufreq.diff
Type: text/x-patch
Size: 38113 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ppc/attachments/20121028/9e33993a/attachment.bin>


More information about the freebsd-ppc mailing list