[ixp1200] core locks using IXA SDK
David Mentre
Mentre at tcl.ite.mee.com
Tue Apr 20 09:15:26 EDT 2004
Hello Tim,
I hope I have understood your issue correctly:
> From: Tim Stevens [mailto:tim.stevens at intec.ugent.be]
> Sent: Tuesday, April 20, 2004 2:42 PM
> Chapter 7 (p 167) of the IXP1200 programming book states that an SRAM
> memory read-lock can be obtained by the following command:
> *(unsigned int *)(SRAM_READ_LOCK + (sramLWAddr << 2));
> where sramLWAddr is the physical address in longwords and
> SRAM_READ_LOCK is
> defined as follows:
> #define SRAM_READ_LOCK 0x12000000
>
> Quite obviously, this results in a memory violation because
> the memory was
> not previously allocated (in the 0x12000000 range).
Your are confusing Physical and Virtual addresses. I don't have the IXP1200
book at hand but as far as I can guess, the 0x12000000 is a physical one. So
you need to open a window, i.e. a virtual address to physical address
translation, from a virtual address range of your user linux program to the
0x12000000 physical address range.
The simplest way, in my humble opinion, is to mmap(2) the /dev/mem device
that corresponds to physical address space. You'll find an example of such a
program at: http://www.lart.tudelft.nl/lartware/port/devmem2.c
> A related problem we face is that our addresses allocated in SRAM (by
> RmMalloc) seem to have a virtual address starting with
> 0xf400...., which
> does not correspond to the 10000000-->107fffff range presented in the
> "StrongARM Core Memory Map" (appendix C) from the "Microcode
> Programmer's
> Reference Manual".
I think that once again your are confusing physical and virtual addresses.
Yours,
david
--
David Mentré <mentre at tcl.ite.mee.com> - Research engineer (Ph.D.)
Mitsubishi Electric ITE-TCL / European Telecommunication Research Lab
Phone: +33 2 23 45 58 29 / Fax: +33 2 23 45 58 59
http://www.mitsubishi-electric-itce.fr
More information about the ixp1200
mailing list