[ELDK] new developer for kilauea PPC405EX, EBC device?

Wolfgang Denk wd at denx.de
Wed Mar 19 20:33:23 CET 2008


Dear John,

in message <B9639434CFA424438117913649CDB78704C52DB7 at MA_EXCHANGE.corp.sds.l-3com.com> you wrote:
> 
> >Be careful. The user manual is one thing, and the implementation in a
> >specific piece of code (like U-Boot, or Linux, or another  OS)  is  a
> >completely different and often unrelated thing.
> 
> At the end of the day the hardware device has to have an address that
> only it will respond to on the bus, regardless of O.S.

Yes. I wanted to make clear that the addresses you see in U-Boot  and
Linux  may  be different, and are most likely different from what you
read in the manual.

> True, however we plan on putting a Dual-Port memory device with
> registers.  I think mmap() should suffice for simple reads and writes
> from user space, at least initially.

Yes, but again you have to be  careful,  for  example  about  caching
issues.  And  things  start  to  get interesting as soon as you start
digging into things like DMA.

> It was a hypothetical question, looking for any ramifications from
> moving the real physical address of the EBC space or changing its size.

You have to understand the memory  map  (and  it's  implications  and
limitations) used by the Linux kernel.

> Wait a minute, my user program should be able to access the DMA
> controller configuration registers via DCR.  Right.

This will not work. Quoting the fine manual:  "The  mtdcr  and  mfdcr
instructions are privileged, for all DCRs. Therefore, all accesses to
DCRs  are  privileged." That means, access is only possible in kernel
mode, but not from user space.

Note that this is intetnional and  is  generally  considered  a  Good
Thing (TM).

> Determining the correct addresses to load into the DMA controller I have
> some idea of what this means.  But I am not so familiar with linux, I
> will be investigating this aspect very closely.

You will need a thourough understanding of physical versus virtual
addresses.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
In the beginning there was nothing.
And the Lord said "Let There Be Light!"
And still there was nothing, but at least now you could see it.


More information about the eldk mailing list