ARM920T MMU configuration

Note: This was originally posted on 16th August 2010 at http://forums.arm.com

Hello. I'm making boot loader for arm board SMDK2443 based on ARM920T. There is 128 Mb of RAM on board, and i set up MMU to map addresses 0x80000000-0x88000000 as sections to physical 0x30000000-0x38000000. But for some reason addresses in upper part of address space point to the same physical address that in the lower part.
I.e. running following code
char *p1 = 0x835a0000,
   *p2 = 0x875a0000;

*p1 = 1;
printf("p1 == %x\t*p1==%x\n", p1,*p1);
*p2 = 2;
printf("p2 == %x\t*p2==%x\n", p2,*p2);
printf("p1 == %x\t*p1==%x\n", p1,*p1);

makes output:
p1 == 835a0000 *p1==1
p2 == 875a0000 *p2==2
p1 == 835a0000 *p1==2


Of course, this makes mess for operating system, and it doesn't boot.

Can you tell me, what could be the reason of such behavior?
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    What are your page table entries for 0x835X,XXXX and 0x875X,XXXX?

    Do you see similar behaviour if your write to the equivalent physical addresses with the MMU disabled?
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    What are your page table entries for 0x835X,XXXX and 0x875X,XXXX?

    Here is my mmu table attached. As you can see

    ...
    835:  33500c1e
    ...
    875:  37500c1e
    ...


    As i try turning off mmu, i'll tell you result.
    Upd: I don't know if i can manage to write something, turning off MMU, because printf function is not available in that case.
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    Is it definitely a 128MB RAM device?

    Some memory controllers support "up to 128MB" via a number of chip selects but often use smaller physical RAM chips. (i.e. 2 64MB devices via 2 chip selects). It is not uncommon to fit less than the maximum RAM and then alias the address range by using multiple chip select lines to drive the same chip select pin. May not be true in your case, but seen it happen before, so could be worth checking.
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    Is it definitely a 128MB RAM device?

    Some memory controllers support "up to 128MB" via a number of chip selects but often use smaller physical RAM chips. (i.e. 2 64MB devices via 2 chip selects). It is not uncommon to fit less than the maximum RAM and then alias the address range by using multiple chip select lines to drive the same chip select pin. May not be true in your case, but seen it happen before, so could be worth checking.


    We've got a single 128 Mb chip of Mobile DRAM on board.
  • Note: This was originally posted on 17th August 2010 at http://forums.arm.com

    We've got a single 128 Mb chip of Mobile DRAM on board.

    Is that 128M bits (128Mb) or 128M bytes (128MB)?
  • Note: This was originally posted on 19th August 2010 at http://forums.arm.com

    Is that 128M bits (128Mb) or 128M bytes (128MB)?

    Bytes, not bits.

    That what samsung web site tells me about this memory chip:

    K4 (Memory) : DRAM
    X (Small Classification) : Mobile DDR SDRAM
    1G (Density, Refresh) : 1G, 8K/64ms
    16 (Organization) : x16
    3 (Bank) : 4Bank
    P (Interface, VDD, VDDQ) : LVTTL, 1.8V, 1.8V
  • Note: This was originally posted on 19th August 2010 at http://forums.arm.com

    Problem is solved. It was due to wrong configuration of Mobile DRAM controller.
More questions in this forum