File indexing completed on 2025-05-11 08:23:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #if defined(__rtems__) || defined(MPC5200_BAPI_LIBC_HEADERS)
0026 #include <string.h>
0027 #endif
0028
0029 #include <bsp/bestcomm/include/ppctypes.h>
0030 #include <bsp/bestcomm/include/mgt5200/sdma.h>
0031 #include <bsp/bestcomm/include/mgt5200/mgt5200.h>
0032
0033 #include <bsp/bestcomm/dma_image.h>
0034 #include <bsp/bestcomm/bestcomm_api.h>
0035
0036 #ifdef __MWERKS__
0037 __declspec(section ".text") extern const uint32 taskTable;
0038 __declspec(section ".text") extern const uint32 taskTableBytes;
0039 __declspec(section ".text") extern const uint32 taskTableTasks;
0040 __declspec(section ".text") extern const uint32 offsetEntry;
0041 #else
0042 extern const uint32 taskTable [];
0043 extern const uint32 taskTableBytes;
0044 extern const uint32 taskTableTasks;
0045 extern const uint32 offsetEntry;
0046 #endif
0047
0048 typedef struct SCTDT {
0049 uint32 start;
0050 uint32 stop;
0051 uint32 var;
0052 uint32 fdt;
0053 uint32 rsvd1;
0054 uint32 rsvd2;
0055 uint32 context;
0056 uint32 litbase;
0057 } SCTDT_T;
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068 void TasksLoadImage(sdma_regs *sdma)
0069 {
0070 uint32 i;
0071 SCTDT_T *tt;
0072
0073
0074 memcpy((void *)((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal), taskTable, taskTableBytes);
0075
0076 for (i=0; i < (uint32) taskTableTasks; i++) {
0077 tt = (SCTDT_T *)(((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal) + (uint32) offsetEntry + (i * sizeof (SCTDT_T)));
0078 tt->start += sdma->taskBar;
0079 tt->stop += sdma->taskBar;
0080 tt->var += sdma->taskBar;
0081 tt->fdt = (sdma->taskBar & 0xFFFFFF00) + tt->fdt;
0082 tt->context += sdma->taskBar;
0083 }
0084 }