none
How to utilize >256MB DRAM using OEMGetExtensionDRAM() ? RRS feed

  • Question

  • I have physically 512MB DRAM on my platform. I plan to utilize 384MB DRAM and my settings in OEMAddressTable are as below:-
    DCD    0x80000000, 0x00000000, 128  ; mem
    DCD    0x88000000, 0x08000000, 256  ; extended memory
    DCD    0x98000000, 0xD4000000, 3      ; APB+AHB+SDH1+SDH2+ICU+NANDC+DTC+rsvd+SQUC
    DCD    0x98300000, 0xD1000000, 2      ; Configuration as internal memory, recommended for boot op.
    DCD    0x98500000, 0xB0000000, 1      ; dmc (repack)
    DCD    0x98600000, 0xC0000000, 9     ; CMU, MFU
    My system will hang after executed the OEMGetExtensionDRAM function to get 256MB extension. However, it will successful boot to OS if I modified the code to get only 128MB extension. I am wonder what has go wrong?
    Monday, October 10, 2011 9:30 AM

All replies

  • can you post your config.bib as well as the your OEMGetExtensionDRAM function source code?

    Vinoth.R http://vinoth-vinothblog.blogspot.com http://www.e-consystems.com
    Monday, October 10, 2011 9:47 AM
  • config.bib
    ========================================
        ARGS        80000000  00001000  RESERVED
        CHAIN       80001000  00001000  RESERVED
        XIPKERN     80002000  01000000  RAMIMAGE
        OEMDRIVER   81002000  01100000  NANDIMAGE
        NK          82102000  03DFE000  NANDIMAGE
        RAM         81002000  04EFE000  RAM
        HPM         85F00000  02000000  RESERVED
        USBKITL     87F00000  00100000  RESERVED    
    ========================================
    #define EXT_RAM_CA_START 0x88000000
    #define EXT_RAM_SIZE 0x10000000 //256MB
    BOOL OEMGetExtensionDRAM(LPDWORD pMemoryStart, LPDWORD pMemoryLength)
    {
        BOOL rc=FALSE;
        OALMSG(OAL_FUNC, (L"+OEMGetExtensionDRAM\r\n"));
       
        *pMemoryStart = EXT_RAM_CA_START;
        *pMemoryLength = EXT_RAM_SIZE;
        rc=TRUE;
        OALMSG(OAL_FUNC, (L"-OEMGetExtensionDRAM\r\n"));
        return rc;
    }

    • Edited by gcang Monday, October 10, 2011 10:34 AM
    Monday, October 10, 2011 10:33 AM
  • Monday, October 10, 2011 12:01 PM
  • With 128MB DRAM, I am able to call OEMGetExtensionDRAM function to get another 128MB extension DRAM, total 256MB DRAM can be utilized with no issue.

    When trying to call OEMGetExtensionDRAM function to get another 256MB extension DRAM, the system hang after calling OEMGetExtensionDRAM function.

    Total physical DRAM on my platform is 512MB.

     

    Tuesday, October 11, 2011 2:42 AM
  • On which platform are you working? Are you sure, that  the 256MB extension DRAM is initialized?

    Best regards,

    Andreas

    Tuesday, October 11, 2011 5:51 AM
  • I am working on Marvell Armada 168 platform. I am able to perform read/write to the 256MB extension DRAM.
    Tuesday, October 11, 2011 6:33 AM
  • You wrote, that your hardware has 512MB DRAM. But in your OEMAddressTable you have only entries for 384MB. Where are the last 256MB?

    And you wrote also, that it is working with 128MB extension memory. But on which address? 0x88000000? And the system hangs with 256MB, on the same address?

    Tuesday, October 11, 2011 7:24 AM
  • Yes, physically I have 512MB DRAM, I only map 384MB in OEMAddressTable because I have to reserve some of the virtual mapping for other purposes.

    The 128MB extension memory is working by changing only the EXT_RAM_SIZE as shown below:- 

    #define EXT_RAM_CA_START 0x88000000

    #define EXT_RAM_SIZE 0x08000000 //128MB
    //#define EXT_RAM_SIZE 0x10000000 //256MB
    BOOL OEMGetExtensionDRAM(LPDWORD pMemoryStart, LPDWORD pMemoryLength)
    {
        BOOL rc=FALSE;
        OALMSG(OAL_FUNC, (L"+OEMGetExtensionDRAM\r\n"));
       
        *pMemoryStart = EXT_RAM_CA_START;
        *pMemoryLength = EXT_RAM_SIZE;
        rc=TRUE;
        OALMSG(OAL_FUNC, (L"-OEMGetExtensionDRAM\r\n"));
        return rc;
    }

    Tuesday, October 11, 2011 8:07 AM
  • Check your config.bib, you have some overlap - might not matter depending on your other config.bib settings though.

    Then double check your physical addresses.   Is it possible that your two banks of 256 are not contiguous?


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com
    Tuesday, October 11, 2011 12:27 PM
    Moderator