This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

K2HK: mem_lpae variable in U-boot and DMA

Expert 1800 points

Hi,

We have a custom board based on K2HK and PCIE devices connected over PCIE interface.  We use kernel driver from the device vendor for accessing and configuring the device over PCIE interface.

We are facing issues while using PCI DMA transfers and see that there might be cache coherency issue and needs to be flushed.  We make use of  pci_dma_sync_single_for_device and pci_dma_sync_single_for_cpu to ensure that cache is cleared.  But this does not help to solve the issue. The vendor driver  can handle only 32 bit DMA address.

We tried to clear the mem_lpae u-boot environment variable just to check the behaviour and ran our tests.  We did not see issues with DMA transfers.  If our understanding is right, with mem_lpae variable set , the kernel DDR load addresses are in 36 bit limits and if mem_lpae is cleared, then u-boot uses 32 bit load addresses for the kernel. But in the linux kernel configuration, CONFIG_ARM_LPAE is always enabled for keystone 2 system and cannot be disabled. 

Our DDR3A and DDR3B sizes are below 2GB ranges.  Is there any real use of having mem_lpae env variable? What potential issues can arise if mem_lpae is disabled? 

 

Regards

Rams

  • Hi Rams,

    From my understanding, If the size of DDR3A is less than 2GB then there is no real use of having mem_lape evn.

    Thank you.

  • Hi Rajasekaran ,

    Thanks for the response.  So, if DDR3A is less than 2GB, then this variable need not be set, is there any dependency on CONFIG_ARM_LPAE in linux kernel?

    It seems like that mem_lpae variable  controls the LPAE enable /disable for the system and we cant disable LPAE in kernel configuration for keystone.  There is no need to disable this in kernel? Is our understanding correct?

     

    Thanks

    Rams

     

  • Rams,

    Yes however I have not experimented. Feel free to experiment and let us know if you have issues.

    Thank you.