Re: Modify CPU registers
Re: Modify CPU registers
- Subject: Re: Modify CPU registers
- From: Terry Lambert <email@hidden>
- Date: Fri, 1 Jun 2007 17:58:44 -0700
On Jun 1, 2007, at 11:54 AM, Raul Flores wrote:
I would like to lock/invalidate/flush cache areas and or set other
cpu registers on a 7447A processor (Apple G4 PowerBook) with OS X
(Darwin) 10.4.
Not sure how to proceed, as many of the commands are "supervisor
mode". A simple example would be reading HID0 and HID1 registers.
Trying to perform an "mfspr" command for any other than 1,8,or 9
results in an illegal exception, when executed from the user state.
Any ideas on how to approach/implement this type of functionality
from my software?
It appears that the CHUD framework installs a KEXT to control the
performance counter registers. Am I looking at the same type of
implementation (KEXT) to have my user application query/modify some
of the register settings?
Yes.
Control registers require that you be running in supervisor state to
examine or modify.
I suggest:
<http://www.power.org/resources/downloads/PowerISA_Public.pdf>
for more reading on what's privileged or not privileged. You also need:
<http://www.freescale.com/files/microcontrollers/doc/user_guide/DEMO9RS08KA2UM.pdf?fsrch=1
>
But I'm told on good authority that you will find that whatever you
change, we will likely either crash or change it back to what it's
supposed to be, instead of what you set it to.
-- Terry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden