Experimental Physics and
| |||||||||||||||||
|
c:\Tornado2.2\target\proj\Prj_sis3301\default\C:\Tornado2.2\target\config\mv5100\univDma.c :240: undefined reference to `sysLocalToPciAdrs' Oops, I didn't realize I was using that routine here - add this function somewhere, I have it in sysLib.c:
STATUS sysLocalToPciAdrs ( int adrsSpace, /* whether I/O or Memory address */ void *adrs, /* local address to convert */ UINT32 *pPciAdrs /* where to return pci address */ ) { if (adrsSpace & PCI_BAR_SPACE_IO) { if ((adrs >= (void *) PCI_MSTR_IO_LOCAL) && (adrs < (void *) (PCI_MSTR_IO_LOCAL + PCI_MSTR_IO_SIZE))) { adrs += PCI_MSTR_IO_BUS - PCI_MSTR_IO_LOCAL; } else return ERROR; } else /* PCI Memory space */ { if ((adrs >= (void *) LOCAL_MEM_LOCAL_ADRS) && (adrs < (void *) sysPhysMemTop())) { adrs += PCI_SLV_MEM_LOCAL - LOCAL_MEM_LOCAL_ADRS; } else if ((adrs >= (void *) PCI_MSTR_MEM_LOCAL) && (adrs < (void *) (PCI_MSTR_MEM_LOCAL + PCI_MSTR_MEM_SIZE))) { adrs += PCI_MSTR_MEM_BUS - PCI_MSTR_MEM_LOCAL; } else return ERROR; } *pPciAdrs = (UINT32) adrs; return OK; } For completeness (although it's not needed by univDma.c) there is a companion function to the above which I also provide in my BSPs:
STATUS sysPciToLocalAdrs ( int adrsSpace, /* whether I/O or Memory address */ UINT32 adrs, /* pci address to convert */ void **pLocalAdrs /* where to return local address */ ) { if (adrsSpace & PCI_BAR_SPACE_IO) { if ((adrs >= PCI_MSTR_IO_BUS) && (adrs < (PCI_MSTR_IO_BUS + PCI_MSTR_IO_SIZE))) { adrs += PCI_MSTR_IO_LOCAL - PCI_MSTR_IO_BUS; } else return ERROR; } else /* PCI Memory space */ { if ((adrs >= PCI2DRAM_BASE_ADRS) && (adrs < (PCI2DRAM_BASE_ADRS + DRAM_SIZE))) { adrs += LOCAL_MEM_LOCAL_ADRS - PCI2DRAM_BASE_ADRS; } else if ((adrs >= PCI_MSTR_MEM_BUS) && (adrs < (PCI_MSTR_MEM_BUS + PCI_MSTR_MEM_SIZE))) { adrs += PCI_MSTR_MEM_LOCAL - PCI_MSTR_MEM_BUS; } else return ERROR; } *pLocalAdrs = (void *) adrs; return OK; }
| ||||||||||||||||
ANJ, 10 Aug 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |