2 Replies Latest reply on Apr 15, 2016 6:48 PM by FGT

    meminit.c: question regarding multiple functions

    an.schall

      I was studying the memini.c (found in {BSP_DIR}/Quark_EDKII/QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei/) and I don't quite understand the purpose of several functions.

       

      1. cpu_memory_test:

      As far as I understand it first writes values to memory range of 0x100000-0x10000000 and tries to read them back afterwards in order to see if the read values correspond to the written ones.

      1. Why is this memory range chosen? Why is the limit 0x10000000 (does such a large address even exist)? I tried to find a memory map of the device but couldn't find anything, also not in the Quark datasheet.

      2. Commenting out the upper loop that writes to the addresses, the bottom loop that reads from it always stalls during the first iteration, basically stalling the whole board.

       

      2. cpu_read:

      It basically reads the values stored in the memory range of 0x0000000-0x0002000 (i.e. the first 32 KB). Again, what is supposed to reside at these addresses?

       

      Thanks

        • 1. Re: meminit.c: question regarding multiple functions
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi an.schall,

          Let us investigate this a little bit more so we can provide a more accurate answer. We appreciate your patience.

          Regards,
          Pablo

          • 2. Re: meminit.c: question regarding multiple functions
            FGT

            Hi an.schall,

             

            I'm not an expert, but I can guess...

             

            About:

            1. cpu_memory_test:

            As far as I understand it first writes values to memory range of 0x100000-0x10000000 and tries to read them back afterwards in order to see if the read values correspond to the written ones.

            1. Why is this memory range chosen? Why is the limit 0x10000000 (does such a large address even exist)? I tried to find a memory map of the device but couldn't find anything, also not in the Quark datasheet.

             

            2. cpu_read:

            It basically reads the values stored in the memory range of 0x0000000-0x0002000 (i.e. the first 32 KB). Again, what is supposed to reside at these addresses?

             

            If I did the math correctly: 0x10000000 = 2^29 = 256 MB, which is the installed RAM in the Galileo Boards. And I would not expect to find it in any Quark datasheet, since the installed RAM is beyond Quark. it's up to the card manufacturer... or I'm missing something...

             

            Actually, I have more "problems" with the limit 0x100000 = 2^21 = 2 MB, and this is a figure I'm not able to associate to anything in Galileo... I would expect something like 0x80000 = 2^19 = 512KB, which is the amount of Quark embedded SRAM.

             

            0x0x0002000 = 2^13 = 8KB.... ¿Read the EEPROM?

             

            Just my 2 cents...

             

            HTH,

             

            Fernando.