Post Go back to editing

Remapping RAM base address to 0x0 on ezkit-sc589

Hi!

we are trying to attach PCIe device to the ezkit-sc589(with buildroot linux add-in). This device has broken DMA, it can only address 30-bit addresses. Since the ezkit-sc589 has a physical base address 0xC2000000, function pci_set_dma_mask fails with an error.

is there a way to move(remap) the ram to the first gigabyte of physical memory? what should we do for this? what is the best way to do this? any uboot/buildroot configuration?

  • As far as I understand, we cannot move the RAM area, since dmc0 and dmc1 have fixed areas.

    But it looks like we can use the iATU mechanism for our purposes. am i right? are there any examples of setting up and using iATU?

  • Hi Komarovdd,

    Sorry for the delay in response.

    you can find the documentation in the HRM page (29-25) (Internal Address Translation (iATU))

    Here I am attaching some bare-metal code which our engineer worked on sometime back.

    And the code tested between two ez kits (one as RC and another as EP).

    The codes shows an example of how the physical address range starting from 0x10000000 and 0x40000000 is translated to the L2 RAM address range starting from 0x20000000 and MMR address range starting from 0x30000000.

    Using this example, both RC and EP EZ-Kits can do direct writes/reads to the L2 memory of the processor on the other board over PCIe (memory mapped to PCIe memory space starting from 0x50000000)

    Please find the attached screenshots for reference.

    Thanks

    Vignesh R

    PCIe_Basic_Codes.zip