none
Changes needed to be done for 1GB RAM support in WinCE2013 RRS feed

  • Question

  • Dear All,

    we are using WinCE2013 AM335xBSP. we are trying to configure 1GB contiguous RAM(2X512). The following changes I did

    In SRC/OAL/OALLIB/init.c

    RAMTableEntry ramEntry[]= {
        { (0xA0000000)>>8,(512)*1024*1024,0} };

    static RamTable g_oalRamTable= {
            MAKELONG (0,7),
            1,
            ramEntry
            };

    PCRamTable OEMGetOEMRamTable(void)
    {  
        return &g_oalRamTable;
    }

    In SRC/addrtab_cfg.inc

    This following table for 512RAM But for 1GB what are the changes required in this file..?
    like how much size have to give in g_oalAddressTable and g_oalEbootAddressTable
    g_oalCE7DeviceTable
            DCD     0x9EB02000, 0x9EB020,  0x1000000,  0x00C00  ; 16MB uncached memory for device buffers

    g_oalAddressTable    
            DCD     0x87654321, g_oalCE7DeviceTable,0  ; Flag to use new CE7 mapping scheme
            DCD     0x80000000, 0x80000000,  496       ; SDRAM
            DCD     0x00000000, 0x00000000,   0        ; end of table

    g_oalEbootAddressTable
            DCD     0x80000000, 0x80000000,  512      

            DCD     0x00000000, 0x00000000,   0        ; end of table

    and any changes required in config.bib and any else..?

    Thanks in advance, quick reply will be helpful.

           
    Tuesday, February 23, 2016 4:26 AM

Answers

  • There are no changes required in the OEMAddressTable. That table only maps the first 512 MB, no matter how much memory you have. Everything past the first 512 MB is indicated to the kernel by use of the RamTable (so also no changes required in config.bib).

    As a side note: I'm not sure why you think you need to reserve 16 MB uncached memory for device buffers. There are other (better) ways to get blocks of uncached memory using normal CE APIs.

    Also the device table is not terminated, so you may want to add DCD 0, 0, 0 at the end of that to make sure the kernel is not reading past it and making double mappings.

    Of course you will need to update your DDR init script in your bootloader to correctly initialize the full 1 GB of memory, but other than that your changes to the RamTable should work.

    What is not working?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Tuesday, February 23, 2016 4:43 AM
    Moderator

All replies

  • There are no changes required in the OEMAddressTable. That table only maps the first 512 MB, no matter how much memory you have. Everything past the first 512 MB is indicated to the kernel by use of the RamTable (so also no changes required in config.bib).

    As a side note: I'm not sure why you think you need to reserve 16 MB uncached memory for device buffers. There are other (better) ways to get blocks of uncached memory using normal CE APIs.

    Also the device table is not terminated, so you may want to add DCD 0, 0, 0 at the end of that to make sure the kernel is not reading past it and making double mappings.

    Of course you will need to update your DDR init script in your bootloader to correctly initialize the full 1 GB of memory, but other than that your changes to the RamTable should work.

    What is not working?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Tuesday, February 23, 2016 4:43 AM
    Moderator
  • Thanks Michel Verhagen,

    By mistake I didn't add device table terminated entry while posting thread.

    after booting board, ram size was showing 512MB only.


    • Edited by vamsikolla Tuesday, February 23, 2016 6:38 AM
    Tuesday, February 23, 2016 6:33 AM
  • Your function definition is wrong, it should be 

    PCRamTable OEMGetRamTable(void)

    and not

    PCRamTable OEMGetOEMRamTable(void)


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, February 23, 2016 9:11 AM
    Moderator
  • With this below function my default BSP working good.

    PCRamTable OEMGetOEMRamTable(void)

    Here is the my init.c file statements for 512MB RAM, which is working good.

    VOID OEMInit()
    {

        g_pOemGlobal->pfnGetOEMRamTable      = OEMGetOEMRamTable;

    }

    PCRamTable OEMGetOEMRamTable(void)
    {  
        return &g_oalRamTable;
    }

    I hope with the function name is not a issue.

    maybe I am doing wrong in some other place.

    could you please help me to find out, where i am doing wrong ?

    any configuration required in Image_cfg.h ?

    Regards,
    vamsi

    Tuesday, February 23, 2016 1:15 PM
  • The function name is no issue since you set it correctly in g_pOemGlobal.

    There shouldn't be any changes required in image_cfg.h.

    I really can't see any issue with your code. Are you sure you rebuild your BSP, copy files to reldir and build all project/makimg?

    Run a debug build of a tiny kernel and show us the debug output.


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Tuesday, February 23, 2016 8:27 PM
    Moderator
  • Hi Michel Verhagen,

    please find the below Debug messages

    *****************************

          0 PID:0 TID:2 NKStartup done, starting up kernel. nCpus = 1
          0 PID:0 TID:2 Windows CE KernelInit
          0 PID:0 TID:2 ++OEMGetOEMRamTable
          0 PID:0 TID:2 CONFIG_DDR3_256M16
          0 PID:0 TID:2 dwConfigDDR3= -1
          0 PID:0 TID:2 -=OEMGetOEMRamTable, dwNumEntries=1
          0 PID:0 TID:2 Error Reporting Memory Reserved, dump size = 0004b000
          0 PID:0 TID:2 Booting Windows CE version 8.00 for (ARM)
          0 PID:0 TID:2 Memory Configuring: Total pages: 224659, Filesystem pages = 32751
          0 PID:0 TID:2 Booting kernel with clean memory configuration:
          0 PID:0 TID:2 Total Memory Sections:4
          0 PID:0 TID:2 [0] (static): start: 85d20000, extension/attributes: 00040000, length: 10000000
          0 PID:0 TID:2 [1] (static): start: 95d20000, extension/attributes: 0001c000, length: 06d93000
          0 PID:0 TID:2 [2] (dynamic): start: 00800000, extension/attributes: 00040800, length: 10000000
          0 PID:0 TID:2 [3] (dynamic): start: 00900000, extension/attributes: 00040800, length: 10000000

    *********************

    After this the board stop booting. in platform builder continue option also not coming

    Wednesday, February 24, 2016 9:22 AM
  •       0 PID:0 TID:2 Total Memory Sections:4
          0 PID:0 TID:2 [0] (static): start: 85d20000, extension/attributes: 00040000, length: 10000000
          0 PID:0 TID:2 [1] (static): start: 95d20000, extension/attributes: 0001c000, length: 06d93000
          0 PID:0 TID:2 [2] (dynamic): start: 00800000, extension/attributes: 00040800, length: 10000000
          0 PID:0 TID:2 [3] (dynamic): start: 00900000, extension/attributes: 00040800, length: 10000000

    This shows you have an overlap with already mapped memory in your extension RAM.

    The memory on your processor starts at physical 0x80000000, which also happens to be the exact virtual address CE wants that mapped to. This makes it all a lot more difficult to distinguish between PA and VA and I now see why you need to separately map uncached memory for device drivers... What an unfortunate mapping!

    The first 512 MB is mapped in the OEMAddressTable, so memory is mapped from 0x80000000 to 0xA0000000 (-1: 0x9FFFFFFF).

    The dynamic extension memory shows "extra" memory at 0x80000000 (the value << 8) with length 0x10000000 (256 MB) and another block of 256M starting at 0x90000000.

    This is overlapping what is already mapped in the OEMAddressTable!

    Very strange, because you do indicate in your RamTable that your extension DRAM starts at 0xA0000000 (which is 0x80000000 + 512MB).

    Can you double check you did not by accident change 0xA0000000 to 0x80000000 in your RamTable?


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.


    Wednesday, February 24, 2016 6:33 PM
    Moderator
  • Thanks Michel Verhagen,

    I did mistake in ram table physical address.

    now i am able to boot but in system properties ram memory is showing according my 512 configuration only.

    for more information please check below picture

                                         

    Thursday, February 25, 2016 8:41 AM
  • What is the debug output after "Total Memory Sections" now?

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.

    Thursday, February 25, 2016 10:52 AM
    Moderator
  • Thanks Michel Verhagen,

    1GB RAM working good. Now I am able see according to my memory configuration in system properties.

    Friday, February 26, 2016 4:24 AM