How to use mtdcr from userland code
Josh Boyer
jwboyer at linux.vnet.ibm.com
Wed Sep 24 22:33:39 EST 2008
On Tue, 23 Sep 2008 16:41:49 -0500
"Ayman El-Khashab" <AymanE at tanisys.com> wrote:
> Greetings,
>
> I am developing an app that needs to map pci address space to the PLB on
> the ppc460ex. From what I gather I need to use the mtcdr
> instruction/macro to configure the PIM0 space. However, I cannot figure
> out how to use that from userland code. Is it possible?
Normally, no. The mtdcr/mfdcr instructions are privileged
instructions. On that particular core though, there are userspace dcr
instructions. They are mtdcrux/mfdcrux instructions documented in the
CPU manual.
You will have to hard code them, as there are no versions of binutils
that I know of that will emit the userspace dcr instructions.
> Can I change the PIM some other way?
Yes, write a proper driver.
josh
More information about the Linuxppc-embedded
mailing list