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.

Linux/EVMK2GX: Remapping L3 to an uncached region

Part Number: EVMK2GX

Tool/software: Linux

I have a PCIe device writing into L3.  I want to remap L3 to an uncached address range.  Which ranges are valid to use and what do I need to do to keep linux from trampling my chosen range.

I've tried using 0xC0000000 (and other base addresses), and adding a carveout in the resource table, but the mapped addresses don't read back correctly.

	uintptr_t L3 = 0x0C000000;
	uintptr_t mapped = 0xC0000000;
	CSL_XMC_XMPAXH high = { mapped >> CSL_XMC_XMPAXH_BADDR_SHIFT, 0x1B };
	CSL_XMC_XMPAXL low = {  L3 >> CSL_XMC_XMPAXL_RADDR_SHIFT, 1, 1, 0, 1, 1, 0 };
	CSL_XMC_setXMPAXH(2, &high);
	CSL_XMC_setXMPAXL(2, &low);
	CACHE_disableCaching(mapped >> 24);

Thanks

  • Hi Elron,

    Are you using TI Linux or TI RTOS on your EVMK2GX? Which version?

    Best Regards,
    Yordan
  • TI-RTOS on the C66 and linux on the ARM.

    bios_6_52_00_12

    ti-processor-sdk-linux-k2g-evm-04.03.00.05

    ipc_3_47_01_00

  • I made three mistakes:
    The mapping is from a logical address to a 36-bit address, so raddr should have been (L3 >> 4) >> CSL_XMC_XMPAXL_RADDR_SHIFT
    I mapped more than I needed, and it happens that if you map more than 64MB starting at 0x0C000000 the translation doesn't work even for addresses that are in within the MSMC SRAM.
    I need not have worried about linux and my arbitrarily chosen baddr, since it's a logical address.