summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/powerpc/gen5200/bestcomm
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2005-12-31 05:09:26 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2005-12-31 05:09:26 +0000
commitca680bc5890abe0d6bfe7eb4a40a0229f1b6bd36 (patch)
tree805a5ddce1250235d6133376ddabb5543eb2cf82 /c/src/lib/libbsp/powerpc/gen5200/bestcomm
parentAdd BuildRoot. (diff)
downloadrtems-ca680bc5890abe0d6bfe7eb4a40a0229f1b6bd36.tar.bz2
New (CVS import Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>'s
submission).
Diffstat (limited to 'c/src/lib/libbsp/powerpc/gen5200/bestcomm')
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c512
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h457
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c279
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h122
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h45
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.c624
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.capi.h84
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.h472
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.reloc.c1453
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/mgt5200.h67
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/sdma.h159
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c92
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_api_mem.h73
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h280
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_bdtable.h92
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_general.h628
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_ata.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c126
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_0.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_1.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_rx_bd.c39
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_tx_bd.c39
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_0.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_1.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_2.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_3.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_0.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_1.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_rx_bd.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_tx_bd.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_lpc.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_rx.c38
-rw-r--r--c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_tx.c38
33 files changed, 6175 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c
new file mode 100644
index 0000000000..ad7471cdbb
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.c
@@ -0,0 +1,512 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*!
+ * \mainpage Introduction
+ *
+ * \author Motorola Semiconductor Products Sector
+ * \date 2 Apr 2004
+ */
+
+/*!
+ * \file bestcomm_api.c
+ *
+ * Bestcomm_api.c implements most of the BestComm C API. The
+ * TaskSetup() function is generated by the BestComm Task API tools
+ * in capi/task_api/tasksetup_general.h as configured and included by
+ * code_dma/image_rtos?/task_capi/(*).c. Other functions are defined as
+ * inline in capi/bestcomm_api.h.
+ */
+
+#include "../bestcomm/include/ppctypes.h"
+#include "../bestcomm/bestcomm_api.h"
+#include "../bestcomm/task_api/bestcomm_cntrl.h"
+#include "../bestcomm/task_api/bestcomm_api_mem.h"
+#include "../bestcomm/task_api/tasksetup_bdtable.h"
+
+/***********************************************************************
+ */
+static const char* const TaskVersionString = "BestComm API v2.2 20041209";
+
+/*
+ * Hidden API data per task.
+ */
+
+static BDIdx BDHead[MAX_TASKS];
+static BDIdx BDTail[MAX_TASKS];
+
+/*
+ * Virtual memory location of the MBAR. System registers and SRAM are
+ * offset from this address.
+ */
+uint8 *MBarGlobal;
+
+/*
+ * Offset from MBarGlobal to get the physical memory address of the
+ * MBAR. This will be zero for systems that do not use virtual memory in
+ * their device driver model.
+ */
+sint64 MBarPhysOffsetGlobal;
+
+/*
+ * Offset to free space in SRAM after task code and buffer descriptors.
+ */
+uint32 SramOffsetGlobal = 0;
+
+/*
+ * This flag is false when TaskStart() has not yet been called on a
+ * task newly configured by TaskSetup() or TaskStop() has been called.
+ * Otherwise it is true. It is possible that a task disabled itself
+ * (transfer complete or BD ring empty) which will not show up in this
+ * flag.
+ *
+ * It is really only useful for BD tasks that assign buffers (via
+ * TaskBDAssign()) before TaskStart() or after TaskStop() are called.
+ */
+int TaskRunning[MAX_TASKS];
+
+/*!
+ * \brief Get a string containing API version information.
+ * \returns Pointer to the API version string
+ */
+const char *TaskVersion(void)
+{
+ return TaskVersionString;
+}
+
+/*!
+ * \brief Initialize the API.
+ * \param MBarRef Reference pointer to the device register memory
+ * map.
+ *
+ * \returns TASK_ERR_NO_ERR on successful initialization.
+ * or TASK_ERR_API_ALREADY_INITIALIZED.
+ *
+ * This function is only used with physical addresses.
+ *
+ * This function will also initialize API internal variables. The return
+ * value TASK_ERR_API_ALREADY_INITIALIZED is intended to help determine if
+ * another process has already instantiated a version of the API.
+ */
+int TasksInitAPI(uint8 *MBarRef)
+{
+ /*
+ * Copy pointer of register space to global variable.
+ * for use by other functions.
+ */
+ MBarGlobal = MBarRef;
+
+ /*
+ * The offset is 0 if physical and virtual are the same.
+ */
+ MBarPhysOffsetGlobal = 0;
+
+ /*
+ * IF API has not been initialized yet then...
+ * Make sure all BestComm interrupts are disabled and not pending.
+ * Make sure all tasks are disabled.
+ * This feature can only be put in after a way has been found to
+ * communicaticate with other processes.
+ */
+ return TASK_ERR_NO_ERR;
+}
+
+/*!
+ * \brief Initialize the API when virtual memory is used.
+ * \param MBarRef Reference pointer to the device register memory
+ * map.
+ * \param MBarPhys Actual physical location of MBAR device register
+ * memory map.
+ *
+ * \returns TASK_ERR_NO_ERR on successful initialization.
+ * or TASK_ERR_API_ALREADY_INITIALIZED.
+ *
+ * This function allows using virtual memory addresses as well as physical
+ * addresses. All device registers are offset to the address supplied here,
+ * so the virtual memory space should include enough space for the entire
+ * register set of the device to include the SRAM space.
+ *
+ * This function will also initialize API internal variables. The return
+ * value TASK_ERR_API_ALREADY_INITIALIZED is intended to help determine if
+ * another process has already instantiated a version of the API.
+ */
+int TasksInitAPI_VM(uint8 *MBarRef, uint8 *MBarPhys)
+{
+ /*
+ * Copy pointer of register space to global variable.
+ * for use by other functions.
+ */
+ MBarGlobal = MBarRef;
+ MBarPhysOffsetGlobal = MBarPhys - MBarRef;
+
+ /*
+ * If API has not been initialized yet then...
+ * Make sure all BestComm interrupts are disabled and not pending.
+ * Make sure all tasks are disabled.
+ * This feature can only be put in after a way has been found to
+ * communicaticate with other processes.
+ */
+ return TASK_ERR_NO_ERR;
+}
+
+/*!
+ * \brief \em Deprecated
+ * \param sdma Base address of the BestComm register set
+ *
+ * \returns TASK_ERR_NO_ERR
+ *
+ * Use of this function is no longer necessary. It is retained for
+ * compatibility with previous versions of the API.
+ */
+int TasksAttachImage(sdma_regs *sdma)
+{
+ return TASK_ERR_NO_ERR;
+}
+
+/*!
+ * \brief This function returns the value of the internal variable
+ * used to keep track of used space in SRAM.
+ *
+ * \returns The number of bytes from the beginning of SRAM to the end
+ * used space in the SRAM.
+ *
+ * This function will return the offset to free space in the SRAM
+ * not used by the CAPI. \b Note: The returned value is based
+ * on what is in TasksSetSramOffset. This function can
+ * not determine what SRAM space was used by another process. There must
+ * be some way external to the CAPI to keep track of SRAM space. This
+ * function only returns the internal variable used to keep track of buffer
+ * descriptors.
+ */
+uint32 TasksGetSramOffset(void)
+{
+ return SramOffsetGlobal;
+}
+
+/*!
+ * \brief This function stores the number of bytes from the
+ * beginning of SRAM to the end of the used space.
+ *
+ * \param sram_offset Number of bytes until the beginning of
+ * free space in the SRAM.
+ *
+ * This function sets the free space offset in SRAM. It must be called
+ * before setup in multi-task environments. It is the application's
+ * job to determine where the free space in SRAM is. This sets the
+ * base offset for the buffer descriptor variables during setup, so to
+ * deallocate buffers that have already been set this function should be
+ * called with a new offset.
+ */
+void TasksSetSramOffset(uint32 sram_offset)
+{
+ /*
+ * Set the SramOffsetGlobal variable to be used by TaskSetup_BDTable
+ */
+ SramOffsetGlobal = sram_offset;
+}
+
+/*!
+ * \brief Start an initialized task running.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \param autoStartEnable Boolean for whether autostart bit is enabled.
+ * If this is set then the parameter autoStartTask
+ * defines the task to auto start.
+ * \param autoStartTask TaskId for task to autostart. If autoStartEnable
+ * is not set then this parameter is a don't care.
+ * \param intrEnable Boolean for interrupt enable for this task.
+ * \returns TASK_ERR_NO_ERR on success or TASK_ERR_INVALID_ARG if taskId
+ * is invalid.
+ */
+int TaskStart(TaskId taskId, uint32 autoStartEnable, TaskId autoStartTask,
+ uint32 intrEnable)
+{
+ if (intrEnable) {
+ SDMA_INT_ENABLE(SDMA_INT_MASK, taskId);
+ } else {
+ SDMA_INT_DISABLE(SDMA_INT_MASK, taskId);
+ }
+ SDMA_TASK_AUTO_START(SDMA_TCR, taskId, autoStartEnable, autoStartTask)
+ SDMA_TASK_ENABLE(SDMA_TCR, taskId);
+
+ TaskRunning[taskId] = 1;
+ return TASK_ERR_NO_ERR;
+}
+
+/*!
+ * \brief Stop a running task.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns TASK_ERR_NO_ERR on success or TASK_ERR_INVALID_ARG if taskId
+ * is invalid.
+ *
+ * \em Note: Stopping a polling buffer descriptor task is a catastrophic
+ * operation. It does not merely pause execution. Context is not
+ * saved. The task's pointer into the BD ring is reset back to the
+ * beginning.
+ *
+ * \em Note: This is not the case for the new "fall-through" BD tasks.
+ * They save the BD ring pointer across stop/start boundaries. The
+ * previous polling tasks are considered deprecated.
+ */
+int TaskStop(TaskId taskId)
+{
+ SDMA_INT_DISABLE(SDMA_INT_MASK, taskId);
+ SDMA_TASK_DISABLE(SDMA_TCR, taskId);
+
+ TaskRunning[taskId] = 0;
+ return TASK_ERR_NO_ERR;
+}
+
+/*!
+ * \brief Assign a buffer to a buffer descriptor.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \param buffer0 A buffer to send data from or receive data into a device
+ * \param buffer1 A second buffer to send data from or receive data into
+ * a device for use with double-buffer tasks.
+ * \param size Size of the buffer in bytes.
+ * \param bdFlags Buffer descriptor flags to set. Used by ethernet BD tasks.
+ * \returns Handle to the buffer descriptor used by this DMA transfer.
+ * Error is indicated by a negative return value (see TaskErr_t).
+ *
+ * This function is used for both transmit and receive buffer descriptor
+ * tasks. The buffer may be freed by the TaskBDRelease() function.
+ * In the case of tasks with a buffer descriptor with two buffer pointers
+ * this function uses both buffer0 and buffer1 where buffer0 is a source
+ * and buffer1 is a destination. When the buffer descriptor is a single
+ * pointer type, the buffer0 is the only pointer used and buffer1 is ignored.
+ *
+ * Using this function on non-buffer descriptor tasks will produce
+ * unpredictable results.
+ */
+BDIdx TaskBDAssign(TaskId taskId, void *buffer0, void *buffer1, int size, uint32 bdFlags)
+{
+ BDIdx *bdHead;
+ TaskBD_t *bd;
+ BDIdx r = TASK_ERR_NO_ERR;
+
+ if (TaskBDIdxTable[taskId].currBDInUse == TaskBDIdxTable[taskId].numBD) {
+ /*
+ * The buffer ring is full.
+ */
+ r = TASK_ERR_BD_RING_FULL;
+
+ } else if ( (TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG)
+ && ((uint32)size & (uint32)(~SDMA_DRD_MASK_LENGTH))) {
+ r = TASK_ERR_SIZE_TOO_LARGE;
+
+ } else if ( !(TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG)
+ && ((uint32)size & (uint32)(0xffffffff<<SDMA_BD_BIT_READY))) {
+ r = TASK_ERR_SIZE_TOO_LARGE;
+
+ } else {
+ bdHead = &BDHead[taskId];
+
+ /*
+ * Increase Buffer Descriptor in-use variable.
+ */
+ ++TaskBDIdxTable[taskId].currBDInUse;
+
+ /*
+ * Get a generic TaskBD_t pointer to the BD to be assigned.
+ * Assign the buffer pointers.
+ */
+ bd = TaskBDIdxTable[taskId].BDTablePtr;
+ if (TaskBDIdxTable[taskId].numPtr == 1) {
+ bd = (TaskBD_t *)&(((TaskBD1_t *)bd)[*bdHead]);
+
+ ((TaskBD1_t *)bd)->DataPtr[0] = (uint32)buffer0;
+ } else {
+ bd = (TaskBD_t *)&(((TaskBD2_t *)bd)[*bdHead]);
+
+ ((TaskBD2_t *)bd)->DataPtr[0] = (uint32)buffer0;
+ ((TaskBD2_t *)bd)->DataPtr[1] = (uint32)buffer1;
+ }
+
+
+ if (bd->Status & SDMA_BD_MASK_READY) {
+ /*
+ * This BD is in use.
+ */
+ r = TASK_ERR_BD_BUSY;
+
+ } else {
+
+ /*
+ * Set status bits and length. As soon as Status is written, the
+ * BestComm may perform the transfer.
+ */
+ if (TaskBDIdxTable[taskId].apiConfig & API_CONFIG_BD_FLAG) {
+ bd->Status = ( ((uint32)SDMA_DRD_MASK_FLAGS & bdFlags)
+ | ((uint32)SDMA_DRD_MASK_LENGTH & (uint32)size)
+ | ((uint32)SDMA_BD_MASK_READY));
+ } else {
+ bd->Status = ( ((uint32)SDMA_BD_MASK_SIGN & (uint32)size)
+ | ((uint32)SDMA_BD_MASK_READY));
+ }
+
+ /*
+ * Return the current BD index and increment.
+ */
+ r = *bdHead;
+ *bdHead = (BDIdx)((*bdHead + 1) % (BDIdx)TaskBDIdxTable[taskId].numBD);
+ }
+ }
+
+ /*
+ * Reenable a fall-through BD tasks that might have exited.
+ */
+ if (TaskRunning[taskId]) {
+ SDMA_TASK_ENABLE(SDMA_TCR, taskId);
+ }
+ return r;
+}
+
+/*!
+ * \brief Release last buffer in the buffer descriptor ring.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ *
+ * \returns Buffer descriptor index of next buffer index that will be released
+ * by another call of this function.
+ * TASK_ERR_BD_RING_EMPTY is returned if the ring is already empty.
+ *
+ * This function allows the system to reallocate the memory used by
+ * the buffer. It also cleans up the structure in the BD ring by
+ * removing the tail buffer in the ring. The buffer descriptor tasks
+ * are designed around this. Non-BD tasks do not use this function.
+ *
+ * Using this function on non-buffer descriptor tasks will produce
+ * unpredictable results.
+ */
+BDIdx TaskBDRelease(TaskId taskId)
+{
+ BDIdx *bdTail;
+ TaskBD_t *bd;
+
+ bdTail = &BDTail[taskId];
+
+ if (TaskBDIdxTable[taskId].currBDInUse == 0) {
+ /*
+ * Buffer Descriptor ring is empty, Can't Release!
+ */
+ return TASK_ERR_BD_RING_EMPTY;
+ }
+
+ /*
+ * Get a generic TaskBD_t pointer to the next BD to be released.
+ */
+ bd = TaskGetBD(taskId, *bdTail);
+
+ /*
+ * Verify the ready bit is clear.
+ */
+ if (bd->Status & SDMA_BD_MASK_READY) {
+ return TASK_ERR_BD_BUSY;
+ }
+
+ /*
+ * Increment the tail pointer around the ring, decrement in-use.
+ */
+ *bdTail = (BDIdx)((*bdTail + 1) % (BDIdx)TaskBDIdxTable[taskId].numBD);
+ --TaskBDIdxTable[taskId].currBDInUse;
+
+ return *bdTail;
+}
+
+
+/*!
+ * \brief Release all buffers.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ *
+ * \returns Buffer descriptor index of next buffer that will be
+ * assigned by TaskBDAssign() which will also be the first
+ * released by the next call to TaskBDRelease() or
+ * TASK_ERR_TASK_RUNNING if the task has not been stopped.
+ *
+ * This function is similar to TaskBDRelease() except that it releases
+ * all assigned buffers including those not yet processed by the BestComm
+ * task; i.e. SDMA_BD_MASK_READY is set.
+ * Non-BD tasks do not use this
+ * function.
+ *
+ * The task should not be running. Call TaskStop() first.
+ *
+ * \em Note: Partially transmitted buffers are up to the user to handle.
+ *
+ * Using this function on non-buffer descriptor tasks will produce
+ * unpredictable results.
+ */
+BDIdx TaskBDReset(TaskId taskId)
+{
+ BDIdx i;
+ TaskBD_t *bd, *bdTab;
+
+ if (TaskRunning[taskId]) {
+ return TASK_ERR_TASK_RUNNING;
+ }
+
+ bdTab = TaskBDIdxTable[taskId].BDTablePtr;
+
+ for (i = (BDIdx)TaskBDIdxTable[taskId].numBD - 1; i >= 0; --i) {
+
+ if (TaskBDIdxTable[taskId].numPtr == 1) {
+ bd = (TaskBD_t *)&(((TaskBD1_t *)bdTab)[i]);
+ } else {
+ bd = (TaskBD_t *)&(((TaskBD2_t *)bdTab)[i]);
+ }
+
+ bd->Status = 0x0;
+ }
+
+ TaskBDIdxTable[taskId].currBDInUse = 0;
+ *TaskBDIdxTable[taskId].BDStartPtr =
+ (volatile uint32)((volatile uint32)TaskBDIdxTable[taskId].BDTablePtr
+ + MBarPhysOffsetGlobal);
+ return BDHead[taskId] = BDTail[taskId] = 0;
+}
+
+
+/*!
+ * \brief Return BestComm debug information.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \param paramSet TBD
+ * \returns TBD
+ *
+ * The implementation of this function is yet to be determined.
+ */
+int TaskDebug(TaskId taskId, TaskDebugParamSet_t *paramSet)
+{
+ if ((taskId < 0) || (taskId >= MAX_TASKS)) {
+ return TASK_ERR_INVALID_ARG;
+ }
+ if (paramSet == NULL) {
+ return TASK_ERR_INVALID_ARG;
+ }
+
+ return TASK_ERR_NO_ERR;
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h
new file mode 100644
index 0000000000..3aacf14f8f
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_api.h
@@ -0,0 +1,457 @@
+#ifndef __BESTCOMM_API_H
+#define __BESTCOMM_API_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*!
+ * \file bestcomm_api.h
+ *
+ * Bestcomm_api.h is the only header necessary for inclusion by user
+ * code. The include path the C compiler searches to find .h files
+ * should contain bestcomm/capi and one of bestcomm/code_dma/image_*.
+ * This second entry selects which set of BestComm tasks will be used.
+ * Of course the appropriate files in image_* must also be compiled and
+ * linked.
+ */
+
+#include "../bestcomm/include/ppctypes.h"
+#include "../bestcomm/include/mgt5200/sdma.h"
+#include "../bestcomm/task_api/tasksetup_bdtable.h"
+#include "../bestcomm/task_api/bestcomm_cntrl.h"
+#include "../bestcomm/task_api/bestcomm_api_mem.h"
+
+/*!
+ * \brief TaskSetup() debugging
+ *
+ * Define this macro as follows for debugging printf()s to see
+ * what the API receives and sets from the TaskSetupParamSet_t
+ * struct. Implemented in capi/task_api/tasksetup_general.h.
+ *
+ * \verbatim
+ * >0 : print basic debug messages
+ * >=10: also print C-API interface variables
+ * >=20: also print task API interface variables
+ * else: do nothing
+ * \endverbatim
+ */
+#define DEBUG_BESTCOMM_API 0
+
+/*!
+ * \brief Maximum number of tasks in the system.
+ * This number is hardware-dependent and not user configuration.
+ */
+#define MAX_TASKS 16
+
+/*
+ * This may need to be removed in certain implementations.
+ */
+#ifndef NULL
+# define NULL ((void *)0)
+#endif /* NULL */
+
+typedef sint8 TaskId;
+typedef sint32 BDIdx;
+
+/*
+ * Special "task IDs" for interrupt handling API functions
+ */
+/*! \brief Debug interrupt "task ID" */
+#define DEBUG_INTR_ID SDMA_INT_BIT_DBG
+
+/*! \brief TEA interrupt "task ID" */
+#define TEA_INTR_ID SDMA_INT_BIT_TEA
+
+/*! \brief Task start autostart enable */
+#define TASK_AUTOSTART_ENABLE 1
+
+/*! \brief Task start autostart disable */
+#define TASK_AUTOSTART_DISABLE 0
+
+/*! \brief Task start interrupt enable */
+#define TASK_INTERRUPT_ENABLE 1
+
+/*! \brief Task start interrupt disable */
+#define TASK_INTERRUPT_DISABLE 0
+
+/*
+ * Buffer descriptor flags to pass to TaskBDAssign().
+ */
+/*! \brief Transmit frame done */
+#define TASK_BD_TFD (1 << SDMA_DRD_BIT_TFD)
+
+/*! \brief Interrupt on frame done */
+#define TASK_BD_INT (1 << SDMA_DRD_BIT_INT)
+
+/*!
+ * \brief Data transfer size
+ */
+typedef enum {
+ SZ_FLEX = 3, /*!< invalid for TaskSetupParamSet_t */
+ SZ_UINT8 = 1, /*!< 1-byte */
+ SZ_UINT16 = 2, /*!< 2-byte */
+ SZ_UINT32 = 4 /*!< 4-byte */
+} Sz_t;
+
+/*!
+ * \brief API error codes
+ */
+typedef enum {
+ TASK_ERR_NO_ERR = -1, /*!< No error */
+ TASK_ERR_NO_INTR = TASK_ERR_NO_ERR,
+ /*!< No interrupt */
+ TASK_ERR_INVALID_ARG = -2, /*!< Invalid function argument */
+ TASK_ERR_BD_RING_FULL = -3, /*!< Buffer descriptor ring full*/
+ TASK_ERR_API_ALREADY_INITIALIZED
+ = -4, /*!< API has already been initialized */
+ TASK_ERR_SIZE_TOO_LARGE = -5, /*!< Buffer descriptor cannot support size parameter */
+ TASK_ERR_BD_RING_EMPTY = -6, /*!< Buffer descriptor ring is empty*/
+ TASK_ERR_BD_BUSY = -7, /*!< The buffer descriptor is in use
+ by the BestComm */
+ TASK_ERR_TASK_RUNNING = -8 /*!< The task is running. */
+
+} TaskErr_t;
+
+/*!
+ * \brief BestComm initiators
+ *
+ * These are assigned by TaskSetup().
+ */
+typedef enum {
+
+ INITIATOR_ALWAYS = 0,
+ INITIATOR_SCTMR_0 = 1,
+ INITIATOR_SCTMR_1 = 2,
+ INITIATOR_FEC_RX = 3,
+ INITIATOR_FEC_TX = 4,
+ INITIATOR_ATA_RX = 5,
+ INITIATOR_ATA_TX = 6,
+ INITIATOR_SCPCI_RX = 7,
+ INITIATOR_SCPCI_TX = 8,
+ INITIATOR_PSC3_RX = 9,
+ INITIATOR_PSC3_TX = 10,
+ INITIATOR_PSC2_RX = 11,
+ INITIATOR_PSC2_TX = 12,
+ INITIATOR_PSC1_RX = 13,
+ INITIATOR_PSC1_TX = 14,
+ INITIATOR_SCTMR_2 = 15,
+
+ INITIATOR_SCLPC = 16,
+ INITIATOR_PSC5_RX = 17,
+ INITIATOR_PSC5_TX = 18,
+ INITIATOR_PSC4_RX = 19,
+ INITIATOR_PSC4_TX = 20,
+ INITIATOR_I2C2_RX = 21,
+ INITIATOR_I2C2_TX = 22,
+ INITIATOR_I2C1_RX = 23,
+ INITIATOR_I2C1_TX = 24,
+ INITIATOR_PSC6_RX = 25,
+ INITIATOR_PSC6_TX = 26,
+ INITIATOR_IRDA_RX = 25,
+ INITIATOR_IRDA_TX = 26,
+ INITIATOR_SCTMR_3 = 27,
+ INITIATOR_SCTMR_4 = 28,
+ INITIATOR_SCTMR_5 = 29,
+ INITIATOR_SCTMR_6 = 30,
+ INITIATOR_SCTMR_7 = 31
+
+} MPC5200Initiator_t;
+
+/*!
+ * \brief Parameters for TaskSetup()
+ *
+ * All parameters can be hard-coded by the task API. Hard-coded values
+ * will be changed in the struct passed to TaskSetup() for the user to
+ * examine later.
+ */
+typedef struct {
+ uint32 NumBD; /*!< Number of buffer descriptors */
+
+ union {
+ uint32 MaxBuf; /*!< Maximum buffer size */
+ uint32 NumBytes; /*!< Number of bytes to transfer */
+ } Size; /*!< Buffer size union for BD and non-BD tasks */
+
+ MPC5200Initiator_t
+ Initiator; /*!< BestComm initiator (ignored if hard-wired) */
+ uint32 StartAddrSrc; /*!< Address of the DMA source (e.g. a FIFO) */
+ sint16 IncrSrc; /*!< Amount to increment source pointer */
+ Sz_t SzSrc; /*!< Size of source data access */
+ uint32 StartAddrDst; /*!< Address of the DMA destination (e.g. a FIFO) */
+ sint16 IncrDst; /*!< Amount to increment data pointer */
+ Sz_t SzDst; /*!< Size of destination data access */
+} TaskSetupParamSet_t;
+
+/*!
+ * \brief Parameters for TaskDebug()
+ *
+ * TaskDebug() and the contents of this data structure are yet to be
+ * determined.
+ */
+typedef struct {
+ int dummy; /* Some compilers don't like empty struct typedefs */
+} TaskDebugParamSet_t;
+
+/*!
+ * \brief Generic buffer descriptor.
+ *
+ * It is generally used as a pointer which should be cast to one of the
+ * other BD types based on the number of buffers per descriptor.
+ */
+typedef struct {
+ uint32 Status; /*!< Status and length bits */
+} TaskBD_t;
+
+/*!
+ * \brief Single buffer descriptor.
+ */
+typedef struct {
+ uint32 Status; /*!< Status and length bits */
+ uint32 DataPtr[1]; /*!< Pointer to data buffer */
+} TaskBD1_t;
+
+/*!
+ * \brief Dual buffer descriptor.
+ */
+typedef struct {
+ uint32 Status; /*!< Status and length bits */
+ uint32 DataPtr[2]; /*!< Pointer to data buffers */
+} TaskBD2_t;
+
+
+
+/***************************
+ * Start of API Prototypes
+ ***************************/
+
+#include "../bestcomm/bestcomm_priv.h"
+#include "../bestcomm/dma_image.capi.h"
+
+/*!
+ * \brief Initialize a single task.
+ * \param TaskName Type of task to initialize. E.g. PCI transmit,
+ * ethernet receive, general purpose dual-pointer.
+ * Values expected can be found in the TaskName_t
+ * enum defined in dma_image.capi.h.
+ * \param TaskSetupParams Task-specific parameters. The user must fill out
+ * the pertinent parts of a TaskSetupParamSet_t
+ * data structure.
+ * \returns TaskId task identification token which is a required
+ * parameter for most other API functions.
+ *
+ * This function returns a task identification token which is a required
+ * parameter for most other API functions.
+ *
+ * Certain values of the structure pointed to by TaskParams are set
+ * as a side-effect based on task type. These may be examined after
+ * a successful call to TaskSetup(). User-specified values may be
+ * overridden.
+ *
+ * TaskId TaskSetup( TaskName_t TaskName,
+ * TaskSetupParamSet_t *TaskSetupParams );
+ */
+#define TaskSetup(TaskName, TaskSetupParams) \
+ TaskSetup_ ## TaskName (TaskName ## _api, TaskSetupParams)
+
+const char *TaskVersion(void);
+
+int TasksInitAPI(uint8 *MBarRef);
+
+int TasksInitAPI_VM(uint8 *MBarRef, uint8 *MBarPhys);
+
+void TasksLoadImage(sdma_regs *sdma);
+int TasksAttachImage(sdma_regs *sdma);
+
+uint32 TasksGetSramOffset(void);
+void TasksSetSramOffset(uint32 sram_offset);
+
+int TaskStart(TaskId taskId, uint32 autoStartEnable,
+ TaskId autoStartTask, uint32 intrEnable);
+int TaskStop(TaskId taskId);
+static int TaskStatus(TaskId taskId);
+BDIdx TaskBDAssign(TaskId taskId, void *buffer0, void *buffer1,
+ int size, uint32 bdFlags);
+BDIdx TaskBDRelease(TaskId taskId);
+BDIdx TaskBDReset(TaskId taskId);
+static TaskBD_t *TaskGetBD(TaskId taskId, BDIdx bd);
+static TaskBD_t *TaskGetBDRing(TaskId taskId);
+int TaskDebug(TaskId taskId, TaskDebugParamSet_t *paramSet);
+static int TaskIntClear(TaskId taskId);
+static TaskId TaskIntStatus(TaskId taskId);
+static int TaskIntPending(TaskId taskId);
+static TaskId TaskIntSource(void);
+static uint16 TaskBDInUse(TaskId taskId);
+
+
+/*!
+ * \brief Get the enable/disable status of a task.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns Boolean true indicates enabled or false indicates disabled
+ * or invalid taskId.
+ */
+static inline int TaskStatus(TaskId taskId)
+{
+ return SDMA_TASK_STATUS(SDMA_TCR, taskId) & 0x8000;
+}
+
+/*!
+ * \brief Return a pointer to a buffer descriptor at index BDIdx
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \param bd Buffer descriptor handle returned by
+ * TaskBDAssign() or TaskBDRelease().
+ * \returns Pointer to the requested buffer descriptor or NULL on error.
+ *
+ * The returned pointer should be cast to the appropriate buffer
+ * descriptor type, TaskBD1_t or TaskBD2_t.
+ */
+static inline TaskBD_t *TaskGetBD(TaskId taskId, BDIdx bd)
+{
+ TaskBD_t *bdTab;
+
+ bdTab = TaskBDIdxTable[taskId].BDTablePtr;
+ if (TaskBDIdxTable[taskId].numPtr == 1) {
+ return (TaskBD_t *)&(((TaskBD1_t *)bdTab)[bd]);
+ } else {
+ return (TaskBD_t *)&(((TaskBD2_t *)bdTab)[bd]);
+ }
+}
+
+/*!
+ * \brief Return a pointer to the first buffer descriptor in the ring.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns Pointer to the array of buffer descriptors making up the
+ * ring or NULL on error.
+ *
+ * A device driver author may choose to use this in lieu of
+ * TaskBDAssign()/TaskBDRelease() to get direct access to the
+ * BD ring with the warning that the underlying data structure may change.
+ * Use at one's own discretion.
+ */
+static inline TaskBD_t *TaskGetBDRing(TaskId taskId)
+{
+ return TaskBDIdxTable[taskId].BDTablePtr;
+}
+
+/*!
+ * \brief Clear the interrupt for a given BestComm task.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns TASK_ERR_NO_ERR (which is not really an error) for success
+ */
+static inline int TaskIntClear(TaskId taskId)
+{
+ SDMA_CLEAR_IEVENT(SDMA_INT_PEND, taskId);
+ return TASK_ERR_NO_ERR; /* success */
+}
+
+/*!
+ * \brief Get the interrupt status for a given task.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns TASK_ERR_NO_INTR (which is not really an error) for no interrupt
+ * pending, taskId for a regular interrupt, DEBUG_INTR_ID for
+ * a debug interrupt and TEA_INTR_ID for a TEA interrupt.
+ * \b Note: TaskIntStatus() may return 0, but this means that that
+ * taskId 0 is interrupt pending.
+ */
+static inline TaskId TaskIntStatus(TaskId taskId)
+{
+ uint32 pending;
+
+ pending = SDMA_INT_PENDING(SDMA_INT_PEND, SDMA_INT_MASK);
+
+ if (SDMA_INT_TEST(pending, taskId)) {
+ return taskId;
+ } else if (SDMA_INT_TEST(pending, DEBUG_INTR_ID)) {
+ return DEBUG_INTR_ID;
+ } else if (SDMA_INT_TEST(pending, TEA_INTR_ID)) {
+ return TEA_INTR_ID;
+ }
+
+ return TASK_ERR_NO_INTR;
+}
+
+/*!
+ * \brief Get the interrupt pending status for a given task.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns 0 if task does not have a pending interrupt. 1 if the task
+ * has an interrupt pending.
+ */
+static inline int TaskIntPending(TaskId taskId)
+{
+ uint32 pending;
+
+ pending = SDMA_INT_PENDING(SDMA_INT_PEND, SDMA_INT_MASK);
+ if (SDMA_INT_TEST(pending, taskId)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+/*!
+ * \brief Returns the task ID of an interrupting BestComm task.
+ * \returns TASK_ERR_NO_INTR (which is not really an error) for no interrupt
+ * pending or the taskId of the interrupting task.
+ *
+ * The user must query TaskIntStatus() to discover if this is a debug
+ * or TEA interrupt. This function is designed for use by an operating
+ * system interrupt handler.
+ */
+static inline TaskId TaskIntSource(void)
+{
+ uint32 pending;
+ uint32 mask = 1 << (MAX_TASKS - 1);
+ TaskId i;
+
+ pending = SDMA_INT_PENDING(SDMA_INT_PEND, SDMA_INT_MASK);
+
+ if (SDMA_INT_TEST(pending, SDMA_INT_BIT_TEA)) {
+ return (TaskId)SDMA_TEA_SOURCE(SDMA_INT_PEND);
+ }
+
+ for (i = (MAX_TASKS - 1); i >= 0; --i, mask >>= 1) {
+ if (pending & mask) {
+ return i;
+ }
+ }
+
+ return TASK_ERR_NO_INTR;
+}
+
+/*!
+ * \brief Get a count of in-use buffer descriptors.
+ * \param taskId Task handle passed back from a successful TaskSetup()
+ * \returns Count of the current number of BDs in use by the given task.
+ */
+static inline uint16 TaskBDInUse(TaskId taskId)
+{
+ return TaskBDIdxTable[taskId].currBDInUse;
+}
+
+#endif /* __BESTCOMM_API_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c
new file mode 100644
index 0000000000..05205e7b13
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.c
@@ -0,0 +1,279 @@
+/*===============================================================*\
+| Project: RTEMS generic MPC5200 BSP |
++-----------------------------------------------------------------+
+| File: bestcomm_glue.c
++-----------------------------------------------------------------+
+| Copyright (c) 2004-2005 |
+| Embedded Brains GmbH |
+| Obere Lagerstr. 30 |
+| D-82178 Puchheim |
+| Germany |
+| rtems@embedded-brains.de |
++-----------------------------------------------------------------+
+| The license and distribution terms for this file may be |
+| found in the file LICENSE in this distribution or at |
+| |
+| http://www.rtems.com/license/LICENSE. |
+| |
++-----------------------------------------------------------------+
+| this file contains glue functions to the Freescale BestComm API |
++-----------------------------------------------------------------+
+| date history ID |
+| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
+| 01.12.05 creation doe |
+|*****************************************************************|
+|*CVS information: |
+|*(the following information is created automatically, |
+|*do not edit here) |
+|*****************************************************************|
+|* $Log$
+|* Revision 1.10 2005/12/09 08:57:03 thomas
+|* added/modifed file headers
+|*
+|* Revision 1.9 2005/12/06 14:30:42 thomas
+|* updated name for peripheral register block
+|*
+|* Revision 1.8 2005/12/06 14:11:11 thomas
+|* added EB file headers
+|*
+ *
+|*****************************************************************|
+\*===============================================================*/
+#include <rtems.h>
+#include <rtems/error.h>
+#include "../include/bsp.h"
+#include "../irq/irq.h"
+#include "../include/mpc5200.h"
+#include "../bestcomm/include/ppctypes.h" /* uint32, et. al. */
+#include "../bestcomm/dma_image.h"
+#include "../bestcomm/task_api/bestcomm_cntrl.h"
+#include "../bestcomm/bestcomm_api.h"
+#include "../bestcomm/bestcomm_glue.h"
+#include "../bestcomm/include/mgt5200/sdma.h"
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_enable
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| enable interrupt for given task number |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno /* task number to enable */
+)
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+{
+ if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
+ /*
+ * valid task number
+ * enable interrupt in bestcomm mask
+ */
+ SDMA_INT_ENABLE(&mpc5200.IntMask,bestcomm_taskno);
+ }
+}
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_disable
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| disable interrupt for given task number |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno /* task number to disable */
+)
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+{
+ if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
+ /*
+ * valid task number
+ * disable interrupt in bestcomm mask
+ */
+ SDMA_INT_DISABLE(&mpc5200.IntMask,bestcomm_taskno);
+ }
+}
+
+typedef struct {
+ void (*the_handler)(rtems_irq_hdl_param);
+ rtems_irq_hdl_param the_param;
+} bestcomm_glue_irq_handlers_t;
+
+bestcomm_glue_irq_handlers_t bestcomm_glue_irq_handlers[32];
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_install
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| install given function as bestcomm interrupt handler |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno, /* task number for handler */
+ void (*the_handler)(rtems_irq_hdl_param), /* function to call */
+ rtems_irq_hdl_param the_param
+)
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+{
+ if (0 != ((1UL<<bestcomm_taskno) & SDMA_INT_BIT_IMPL)) {
+ /*
+ * valid task number
+ * install handler
+ */
+ bestcomm_glue_irq_handlers[bestcomm_taskno].the_handler = the_handler;
+ bestcomm_glue_irq_handlers[bestcomm_taskno].the_param = the_param;
+ }
+}
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_dispatcher
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| general bestcomm interrupt handler/dispatcher |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ rtems_irq_hdl_param handle /* irq specific handle (not used) */
+
+)
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+{
+ uint32_t pending;
+ int curr_taskno;
+
+ pending = mpc5200.IntPend & ~mpc5200.IntMask;
+ curr_taskno = 0;
+ while (pending != 0) {
+ if ((pending & (1UL<<curr_taskno)) != 0) {
+ if (bestcomm_glue_irq_handlers[curr_taskno].the_handler == NULL) {
+ /*
+ * This should never happen. we have a pending IRQ but no handler
+ * let's clear this pending bit
+ */
+ SDMA_CLEAR_IEVENT(&mpc5200.IntPend,curr_taskno);
+ }
+ else {
+ /*
+ * call proper handler
+ */
+ bestcomm_glue_irq_handlers[curr_taskno].the_handler
+ (bestcomm_glue_irq_handlers[curr_taskno].the_param);
+ }
+ /*
+ * clear this bit in our pending copy
+ * and go to next bit
+ */
+ pending &= ~(1<<curr_taskno);
+ }
+ curr_taskno++;
+ }
+}
+
+void bestcomm_glue_on(const rtems_irq_connect_data* ptr)
+ {
+ }
+
+
+void bestcomm_glue_isOn(const rtems_irq_connect_data* ptr)
+ {
+ /*return BSP_irq_enabled_at_cpm(ptr->name);*/
+ }
+
+
+void bestcomm_glue_off(const rtems_irq_connect_data* ptr)
+ {
+ }
+
+static rtems_irq_connect_data bestcomm_glue_irq_data =
+ {
+
+ BSP_SIU_IRQ_SMARTCOMM,
+ (rtems_irq_hdl) bestcomm_glue_irq_dispatcher,
+ (rtems_irq_hdl_param) NULL,
+ (rtems_irq_enable) bestcomm_glue_on,
+ (rtems_irq_disable) bestcomm_glue_off,
+ (rtems_irq_is_enabled) bestcomm_glue_isOn
+ };
+
+static boolean bestcomm_glue_is_initialized = FALSE;
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_init
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| initialize the bestcomm module (if not yet done): |
+| - load code |
+| - initialize registers |
+| - initialize bus arbiter |
+| - initialize interrupt control |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ void /* none */
+)
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+{
+ if (!bestcomm_glue_is_initialized) {
+ bestcomm_glue_is_initialized = TRUE;
+ /*
+ * Set task bar to begin of sram
+ */
+ mpc5200.taskBar = (uint32_t)(&(mpc5200.sram[0]));
+
+#if 0
+ /*
+ * Set core and BestComm XLB priority the same.
+ */
+ mpc5200.priority_enable |= 0x5;
+ mpc5200.priority = 0x77777171;
+#endif
+
+ /*
+ * Turn off COMM bus prefetch. This affects all data movements on
+ * the COMM bus. (Yes, _PE -- prefetch enable -- should probably be
+ * named _PD.)
+ */
+ mpc5200.PtdCntrl |= SDMA_PTDCNTRL_PE;
+
+ TasksInitAPI((uint8*)&mpc5200);
+
+ TasksLoadImage( (void *)&(mpc5200.taskBar));
+
+ /*
+ * FIXME: initialize interrupt dispatcher
+ */
+ if(!BSP_install_rtems_irq_handler (&bestcomm_glue_irq_data)) {
+ rtems_panic ("Can't attach MPC5x00 BestComm interrupt handler\n");
+ }
+
+ }
+}
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h
new file mode 100644
index 0000000000..1bd68cf143
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_glue.h
@@ -0,0 +1,122 @@
+/*===============================================================*\
+| Project: RTEMS generic MPC5200 BSP |
++-----------------------------------------------------------------+
+| File: bestcomm_glue.h
++-----------------------------------------------------------------+
+| Copyright (c) 2004-2005 |
+| Embedded Brains GmbH |
+| Obere Lagerstr. 30 |
+| D-82178 Puchheim |
+| Germany |
+| rtems@embedded-brains.de |
++-----------------------------------------------------------------+
+| The license and distribution terms for this file may be |
+| found in the file LICENSE in this distribution or at |
+| |
+| http://www.rtems.com/license/LICENSE. |
+| |
++-----------------------------------------------------------------+
+| this file declares glue functions to the Freescale BestComm API |
++-----------------------------------------------------------------+
+| date history ID |
+| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
+| 01.12.05 creation doe |
+|*****************************************************************|
+|*CVS information: |
+|*(the following information is created automatically, |
+|*do not edit here) |
+|*****************************************************************|
+|* $Log$
+|* Revision 1.4 2005/12/09 08:57:03 thomas
+|* added/modifed file headers
+|*
+|* Revision 1.3 2005/12/06 14:11:11 thomas
+|* added EB file headers
+|*
+ *
+|*****************************************************************|
+\*===============================================================*/
+#ifndef _BESTCOMM_GLUE_H
+#define _BESTCOMM_GLUE_H
+
+#include <rtems.h>
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_enable
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| enable interrupt for given task number |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno /* task number to enable */
+ );
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_disable
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| disable interrupt for given task number |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno /* task number to disable */
+ );
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_irq_install
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| install given function as bestcomm interrupt handler |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ int bestcomm_taskno, /* task number for handler */
+ void (*the_handler)(rtems_irq_hdl_param), /* function to call */
+ rtems_irq_hdl_param the_param
+ );
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+
+/*=========================================================================*\
+| Function: |
+\*-------------------------------------------------------------------------*/
+void bestcomm_glue_init
+(
+/*-------------------------------------------------------------------------*\
+| Purpose: |
+| initialize the bestcomm module (if not yet done): |
+| - load code |
+| - initialize registers |
+| - initialize bus arbiter |
+| - initialize interrupt control |
++---------------------------------------------------------------------------+
+| Input Parameters: |
+\*-------------------------------------------------------------------------*/
+ void /* none */
+ );
+/*-------------------------------------------------------------------------*\
+| Return Value: |
+| none |
+\*=========================================================================*/
+
+#endif /* _BESTCOMM_GLUE_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h
new file mode 100644
index 0000000000..f26ffdfa26
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/bestcomm_priv.h
@@ -0,0 +1,45 @@
+#ifndef __BESTCOMM_PRIV_H
+#define __BESTCOMM_PRIV_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*
+ * Global variables necessitated by the TaskSetup_*() location in
+ * separate files from the main code and the inline functions. These are
+ * private data structures that should not be manipulated by API users.
+ */
+
+extern uint32 SramOffsetGlobal;
+extern TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
+extern int TaskRunning[MAX_TASKS];
+extern sint64 MBarPhysOffsetGlobal;
+
+#endif /* __BESTCOMM_PRIV_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.c
new file mode 100644
index 0000000000..7c1f55b3d6
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.c
@@ -0,0 +1,624 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+******************************************************************************/
+
+#include "../bestcomm/dma_image.h"
+
+TASK_PCI_TX_api_t TASK_PCI_TX_storage;
+TASK_PCI_TX_api_t *TASK_PCI_TX_api=&TASK_PCI_TX_storage;
+
+TASK_PCI_RX_api_t TASK_PCI_RX_storage;
+TASK_PCI_RX_api_t *TASK_PCI_RX_api=&TASK_PCI_RX_storage;
+
+TASK_FEC_TX_api_t TASK_FEC_TX_storage;
+TASK_FEC_TX_api_t *TASK_FEC_TX_api=&TASK_FEC_TX_storage;
+
+TASK_FEC_RX_api_t TASK_FEC_RX_storage;
+TASK_FEC_RX_api_t *TASK_FEC_RX_api=&TASK_FEC_RX_storage;
+
+TASK_LPC_api_t TASK_LPC_storage;
+TASK_LPC_api_t *TASK_LPC_api=&TASK_LPC_storage;
+
+TASK_ATA_api_t TASK_ATA_storage;
+TASK_ATA_api_t *TASK_ATA_api=&TASK_ATA_storage;
+
+TASK_CRC16_DP_0_api_t TASK_CRC16_DP_0_storage;
+TASK_CRC16_DP_0_api_t *TASK_CRC16_DP_0_api=&TASK_CRC16_DP_0_storage;
+
+TASK_CRC16_DP_1_api_t TASK_CRC16_DP_1_storage;
+TASK_CRC16_DP_1_api_t *TASK_CRC16_DP_1_api=&TASK_CRC16_DP_1_storage;
+
+TASK_GEN_DP_0_api_t TASK_GEN_DP_0_storage;
+TASK_GEN_DP_0_api_t *TASK_GEN_DP_0_api=&TASK_GEN_DP_0_storage;
+
+TASK_GEN_DP_1_api_t TASK_GEN_DP_1_storage;
+TASK_GEN_DP_1_api_t *TASK_GEN_DP_1_api=&TASK_GEN_DP_1_storage;
+
+TASK_GEN_DP_2_api_t TASK_GEN_DP_2_storage;
+TASK_GEN_DP_2_api_t *TASK_GEN_DP_2_api=&TASK_GEN_DP_2_storage;
+
+TASK_GEN_DP_3_api_t TASK_GEN_DP_3_storage;
+TASK_GEN_DP_3_api_t *TASK_GEN_DP_3_api=&TASK_GEN_DP_3_storage;
+
+TASK_GEN_TX_BD_api_t TASK_GEN_TX_BD_storage;
+TASK_GEN_TX_BD_api_t *TASK_GEN_TX_BD_api=&TASK_GEN_TX_BD_storage;
+
+TASK_GEN_RX_BD_api_t TASK_GEN_RX_BD_storage;
+TASK_GEN_RX_BD_api_t *TASK_GEN_RX_BD_api=&TASK_GEN_RX_BD_storage;
+
+TASK_GEN_DP_BD_0_api_t TASK_GEN_DP_BD_0_storage;
+TASK_GEN_DP_BD_0_api_t *TASK_GEN_DP_BD_0_api=&TASK_GEN_DP_BD_0_storage;
+
+TASK_GEN_DP_BD_1_api_t TASK_GEN_DP_BD_1_storage;
+TASK_GEN_DP_BD_1_api_t *TASK_GEN_DP_BD_1_api=&TASK_GEN_DP_BD_1_storage;
+
+
+
+
+void init_dma_image_TASK_PCI_TX(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_PCI_TX_api->TaskNum = 0;
+ TASK_PCI_TX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0000UL);
+ TASK_PCI_TX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0004UL);
+ TASK_PCI_TX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0008UL);
+ TASK_PCI_TX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x000cUL);
+ TASK_PCI_TX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0018UL);
+ TASK_PCI_TX_api->TaskPragma = (volatile uint8 *)(TASK_PCI_TX_api->PtrFDT)+3;
+ TASK_PCI_TX_api->NumDRD = 7;
+ TASK_PCI_TX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
+ TASK_PCI_TX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_PCI_TX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_PCI_TX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_PCI_TX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_PCI_TX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_PCI_TX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
+ TASK_PCI_TX_api->NumVar = 12;
+ TASK_PCI_TX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrVarTab) - vMemOffset);
+ TASK_PCI_TX_api->NumInc = 5;
+ TASK_PCI_TX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_TX_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_PCI_TX_api->AddrDstFIFO = &(TASK_PCI_TX_api->var[0]);
+ TASK_PCI_TX_api->IncrBytes = (volatile sint16 *)&(TASK_PCI_TX_api->inc[0])+1;
+ TASK_PCI_TX_api->AddrPktSizeReg = &(TASK_PCI_TX_api->var[1]);
+ TASK_PCI_TX_api->IncrSrc = (volatile sint16 *)&(TASK_PCI_TX_api->inc[1])+1;
+ TASK_PCI_TX_api->AddrSCStatusReg = &(TASK_PCI_TX_api->var[2]);
+ TASK_PCI_TX_api->Bytes = &(TASK_PCI_TX_api->var[3]);
+ TASK_PCI_TX_api->IterExtra = &(TASK_PCI_TX_api->var[4]);
+ TASK_PCI_TX_api->StartAddrSrc = &(TASK_PCI_TX_api->var[7]);
+}
+
+
+void init_dma_image_TASK_PCI_RX(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_PCI_RX_api->TaskNum = 1;
+ TASK_PCI_RX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0020UL);
+ TASK_PCI_RX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0024UL);
+ TASK_PCI_RX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0028UL);
+ TASK_PCI_RX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x002cUL);
+ TASK_PCI_RX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0038UL);
+ TASK_PCI_RX_api->TaskPragma = (volatile uint8 *)(TASK_PCI_RX_api->PtrFDT)+3;
+ TASK_PCI_RX_api->NumDRD = 5;
+ TASK_PCI_RX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
+ TASK_PCI_RX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_PCI_RX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_PCI_RX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_PCI_RX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_PCI_RX_api->NumVar = 9;
+ TASK_PCI_RX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrVarTab) - vMemOffset);
+ TASK_PCI_RX_api->NumInc = 4;
+ TASK_PCI_RX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_PCI_RX_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_PCI_RX_api->AddrPktSizeReg = &(TASK_PCI_RX_api->var[0]);
+ TASK_PCI_RX_api->IncrBytes = (volatile sint16 *)&(TASK_PCI_RX_api->inc[0])+1;
+ TASK_PCI_RX_api->AddrSrcFIFO = &(TASK_PCI_RX_api->var[1]);
+ TASK_PCI_RX_api->IncrDst = (volatile sint16 *)&(TASK_PCI_RX_api->inc[1])+1;
+ TASK_PCI_RX_api->Bytes = &(TASK_PCI_RX_api->var[2]);
+ TASK_PCI_RX_api->IterExtra = &(TASK_PCI_RX_api->var[3]);
+ TASK_PCI_RX_api->StartAddrDst = &(TASK_PCI_RX_api->var[6]);
+}
+
+
+void init_dma_image_TASK_FEC_TX(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_FEC_TX_api->TaskNum = 2;
+ TASK_FEC_TX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0040UL);
+ TASK_FEC_TX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0044UL);
+ TASK_FEC_TX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0048UL);
+ TASK_FEC_TX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x004cUL);
+ TASK_FEC_TX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0058UL);
+ TASK_FEC_TX_api->TaskPragma = (volatile uint8 *)(TASK_FEC_TX_api->PtrFDT)+3;
+ TASK_FEC_TX_api->NumDRD = 22;
+ TASK_FEC_TX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0008UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x001cUL - vMemOffset);
+ TASK_FEC_TX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_FEC_TX_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0030UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0034UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[9] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[10] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0044UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[11] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0048UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[12] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x004cUL - vMemOffset);
+ TASK_FEC_TX_api->DRD[13] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0054UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[14] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0060UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[15] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0064UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[16] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0068UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[17] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x006cUL - vMemOffset);
+ TASK_FEC_TX_api->DRD[18] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0074UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[19] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x007cUL - vMemOffset);
+ TASK_FEC_TX_api->DRD[20] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0084UL - vMemOffset);
+ TASK_FEC_TX_api->DRD[21] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrStartTDT) + 0x0088UL - vMemOffset);
+ TASK_FEC_TX_api->NumVar = 20;
+ TASK_FEC_TX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrVarTab) - vMemOffset);
+ TASK_FEC_TX_api->NumInc = 7;
+ TASK_FEC_TX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_TX_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_FEC_TX_api->AddrDRD = &(TASK_FEC_TX_api->var[0]);
+ TASK_FEC_TX_api->AddrDRDIdx = 19;
+ *TASK_FEC_TX_api->AddrDRD = (volatile uint32)(TASK_FEC_TX_api->DRD[19]);
+ TASK_FEC_TX_api->IncrBytes = (volatile sint16 *)&(TASK_FEC_TX_api->inc[0])+1;
+ TASK_FEC_TX_api->AddrDstFIFO = &(TASK_FEC_TX_api->var[1]);
+ TASK_FEC_TX_api->IncrSrc = (volatile sint16 *)&(TASK_FEC_TX_api->inc[1])+1;
+ TASK_FEC_TX_api->AddrEnable = &(TASK_FEC_TX_api->var[2]);
+ TASK_FEC_TX_api->IncrSrcMA = (volatile sint16 *)&(TASK_FEC_TX_api->inc[2])+1;
+ TASK_FEC_TX_api->BDTableBase = &(TASK_FEC_TX_api->var[3]);
+ TASK_FEC_TX_api->BDTableLast = &(TASK_FEC_TX_api->var[4]);
+ TASK_FEC_TX_api->BDTableStart = &(TASK_FEC_TX_api->var[5]);
+ TASK_FEC_TX_api->Bytes = &(TASK_FEC_TX_api->var[6]);
+}
+
+
+void init_dma_image_TASK_FEC_RX(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_FEC_RX_api->TaskNum = 3;
+ TASK_FEC_RX_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0060UL);
+ TASK_FEC_RX_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0064UL);
+ TASK_FEC_RX_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0068UL);
+ TASK_FEC_RX_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x006cUL);
+ TASK_FEC_RX_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0078UL);
+ TASK_FEC_RX_api->TaskPragma = (volatile uint8 *)(TASK_FEC_RX_api->PtrFDT)+3;
+ TASK_FEC_RX_api->NumDRD = 13;
+ TASK_FEC_RX_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_FEC_RX_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_FEC_RX_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0038UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x003cUL - vMemOffset);
+ TASK_FEC_RX_api->DRD[9] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0040UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[10] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0048UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[11] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0050UL - vMemOffset);
+ TASK_FEC_RX_api->DRD[12] = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrStartTDT) + 0x0058UL - vMemOffset);
+ TASK_FEC_RX_api->NumVar = 15;
+ TASK_FEC_RX_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrVarTab) - vMemOffset);
+ TASK_FEC_RX_api->NumInc = 7;
+ TASK_FEC_RX_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_FEC_RX_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_FEC_RX_api->AddrEnable = &(TASK_FEC_RX_api->var[0]);
+ TASK_FEC_RX_api->IncrBytes = (volatile sint16 *)&(TASK_FEC_RX_api->inc[0])+1;
+ TASK_FEC_RX_api->AddrSrcFIFO = &(TASK_FEC_RX_api->var[1]);
+ TASK_FEC_RX_api->IncrDst = (volatile sint16 *)&(TASK_FEC_RX_api->inc[1])+1;
+ TASK_FEC_RX_api->BDTableBase = &(TASK_FEC_RX_api->var[2]);
+ TASK_FEC_RX_api->IncrDstMA = (volatile sint16 *)&(TASK_FEC_RX_api->inc[2])+1;
+ TASK_FEC_RX_api->BDTableLast = &(TASK_FEC_RX_api->var[3]);
+ TASK_FEC_RX_api->BDTableStart = &(TASK_FEC_RX_api->var[4]);
+ TASK_FEC_RX_api->Bytes = &(TASK_FEC_RX_api->var[5]);
+}
+
+
+void init_dma_image_TASK_LPC(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_LPC_api->TaskNum = 4;
+ TASK_LPC_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0080UL);
+ TASK_LPC_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0084UL);
+ TASK_LPC_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0088UL);
+ TASK_LPC_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x008cUL);
+ TASK_LPC_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0098UL);
+ TASK_LPC_api->TaskPragma = (volatile uint8 *)(TASK_LPC_api->PtrFDT)+3;
+ TASK_LPC_api->NumDRD = 4;
+ TASK_LPC_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_LPC_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_LPC_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_LPC_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_LPC_api->NumVar = 9;
+ TASK_LPC_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrVarTab) - vMemOffset);
+ TASK_LPC_api->NumInc = 8;
+ TASK_LPC_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_LPC_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_LPC_api->Bytes = &(TASK_LPC_api->var[0]);
+ TASK_LPC_api->IncrBytes = (volatile sint16 *)&(TASK_LPC_api->inc[0])+1;
+ TASK_LPC_api->IterExtra = &(TASK_LPC_api->var[1]);
+ TASK_LPC_api->IncrDst = (volatile sint16 *)&(TASK_LPC_api->inc[1])+1;
+ TASK_LPC_api->IncrDstMA = (volatile sint16 *)&(TASK_LPC_api->inc[2])+1;
+ TASK_LPC_api->IncrSrc = (volatile sint16 *)&(TASK_LPC_api->inc[3])+1;
+ TASK_LPC_api->StartAddrDst = &(TASK_LPC_api->var[4]);
+ TASK_LPC_api->IncrSrcMA = (volatile sint16 *)&(TASK_LPC_api->inc[4])+1;
+ TASK_LPC_api->StartAddrSrc = &(TASK_LPC_api->var[5]);
+}
+
+
+void init_dma_image_TASK_ATA(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_ATA_api->TaskNum = 5;
+ TASK_ATA_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00a0UL);
+ TASK_ATA_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00a4UL);
+ TASK_ATA_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00a8UL);
+ TASK_ATA_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00acUL);
+ TASK_ATA_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00b8UL);
+ TASK_ATA_api->TaskPragma = (volatile uint8 *)(TASK_ATA_api->PtrFDT)+3;
+ TASK_ATA_api->NumDRD = 7;
+ TASK_ATA_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_ATA_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_ATA_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_ATA_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_ATA_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_ATA_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_ATA_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrStartTDT) + 0x0030UL - vMemOffset);
+ TASK_ATA_api->NumVar = 12;
+ TASK_ATA_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrVarTab) - vMemOffset);
+ TASK_ATA_api->NumInc = 6;
+ TASK_ATA_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_ATA_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_ATA_api->AddrEnable = &(TASK_ATA_api->var[0]);
+ TASK_ATA_api->IncrBytes = (volatile sint16 *)&(TASK_ATA_api->inc[0])+1;
+ TASK_ATA_api->BDTableBase = &(TASK_ATA_api->var[1]);
+ TASK_ATA_api->IncrDst = (volatile sint16 *)&(TASK_ATA_api->inc[1])+1;
+ TASK_ATA_api->BDTableLast = &(TASK_ATA_api->var[2]);
+ TASK_ATA_api->IncrSrc = (volatile sint16 *)&(TASK_ATA_api->inc[2])+1;
+ TASK_ATA_api->BDTableStart = &(TASK_ATA_api->var[3]);
+ TASK_ATA_api->Bytes = &(TASK_ATA_api->var[4]);
+}
+
+
+void init_dma_image_TASK_CRC16_DP_0(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_CRC16_DP_0_api->TaskNum = 6;
+ TASK_CRC16_DP_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00c0UL);
+ TASK_CRC16_DP_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00c4UL);
+ TASK_CRC16_DP_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00c8UL);
+ TASK_CRC16_DP_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00ccUL);
+ TASK_CRC16_DP_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00d8UL);
+ TASK_CRC16_DP_0_api->TaskPragma = (volatile uint8 *)(TASK_CRC16_DP_0_api->PtrFDT)+3;
+ TASK_CRC16_DP_0_api->NumDRD = 9;
+ TASK_CRC16_DP_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0008UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0028UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0034UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0038UL - vMemOffset);
+ TASK_CRC16_DP_0_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrStartTDT) + 0x0040UL - vMemOffset);
+ TASK_CRC16_DP_0_api->NumVar = 10;
+ TASK_CRC16_DP_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrVarTab) - vMemOffset);
+ TASK_CRC16_DP_0_api->NumInc = 8;
+ TASK_CRC16_DP_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_0_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_CRC16_DP_0_api->Bytes = &(TASK_CRC16_DP_0_api->var[0]);
+ TASK_CRC16_DP_0_api->IncrBytes = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[0])+1;
+ TASK_CRC16_DP_0_api->IterExtra = &(TASK_CRC16_DP_0_api->var[1]);
+ TASK_CRC16_DP_0_api->IncrDst = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[1])+1;
+ TASK_CRC16_DP_0_api->IncrDstMA = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[2])+1;
+ TASK_CRC16_DP_0_api->IncrSrc = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[3])+1;
+ TASK_CRC16_DP_0_api->StartAddrDst = &(TASK_CRC16_DP_0_api->var[4]);
+ TASK_CRC16_DP_0_api->IncrSrcMA = (volatile sint16 *)&(TASK_CRC16_DP_0_api->inc[4])+1;
+ TASK_CRC16_DP_0_api->StartAddrSrc = &(TASK_CRC16_DP_0_api->var[5]);
+}
+
+
+void init_dma_image_TASK_CRC16_DP_1(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_CRC16_DP_1_api->TaskNum = 7;
+ TASK_CRC16_DP_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x00e0UL);
+ TASK_CRC16_DP_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x00e4UL);
+ TASK_CRC16_DP_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x00e8UL);
+ TASK_CRC16_DP_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x00ecUL);
+ TASK_CRC16_DP_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x00f8UL);
+ TASK_CRC16_DP_1_api->TaskPragma = (volatile uint8 *)(TASK_CRC16_DP_1_api->PtrFDT)+3;
+ TASK_CRC16_DP_1_api->NumDRD = 9;
+ TASK_CRC16_DP_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0008UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0028UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0034UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0038UL - vMemOffset);
+ TASK_CRC16_DP_1_api->DRD[8] = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrStartTDT) + 0x0040UL - vMemOffset);
+ TASK_CRC16_DP_1_api->NumVar = 10;
+ TASK_CRC16_DP_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrVarTab) - vMemOffset);
+ TASK_CRC16_DP_1_api->NumInc = 8;
+ TASK_CRC16_DP_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_CRC16_DP_1_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_CRC16_DP_1_api->Bytes = &(TASK_CRC16_DP_1_api->var[0]);
+ TASK_CRC16_DP_1_api->IncrBytes = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[0])+1;
+ TASK_CRC16_DP_1_api->IterExtra = &(TASK_CRC16_DP_1_api->var[1]);
+ TASK_CRC16_DP_1_api->IncrDst = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[1])+1;
+ TASK_CRC16_DP_1_api->IncrDstMA = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[2])+1;
+ TASK_CRC16_DP_1_api->IncrSrc = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[3])+1;
+ TASK_CRC16_DP_1_api->StartAddrDst = &(TASK_CRC16_DP_1_api->var[4]);
+ TASK_CRC16_DP_1_api->IncrSrcMA = (volatile sint16 *)&(TASK_CRC16_DP_1_api->inc[4])+1;
+ TASK_CRC16_DP_1_api->StartAddrSrc = &(TASK_CRC16_DP_1_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_0(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_0_api->TaskNum = 8;
+ TASK_GEN_DP_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0100UL);
+ TASK_GEN_DP_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0104UL);
+ TASK_GEN_DP_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0108UL);
+ TASK_GEN_DP_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x010cUL);
+ TASK_GEN_DP_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0118UL);
+ TASK_GEN_DP_0_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_0_api->PtrFDT)+3;
+ TASK_GEN_DP_0_api->NumDRD = 4;
+ TASK_GEN_DP_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_GEN_DP_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_0_api->NumVar = 9;
+ TASK_GEN_DP_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_0_api->NumInc = 8;
+ TASK_GEN_DP_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_0_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_0_api->Bytes = &(TASK_GEN_DP_0_api->var[0]);
+ TASK_GEN_DP_0_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[0])+1;
+ TASK_GEN_DP_0_api->IterExtra = &(TASK_GEN_DP_0_api->var[1]);
+ TASK_GEN_DP_0_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[1])+1;
+ TASK_GEN_DP_0_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[2])+1;
+ TASK_GEN_DP_0_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[3])+1;
+ TASK_GEN_DP_0_api->StartAddrDst = &(TASK_GEN_DP_0_api->var[4]);
+ TASK_GEN_DP_0_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_0_api->inc[4])+1;
+ TASK_GEN_DP_0_api->StartAddrSrc = &(TASK_GEN_DP_0_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_1(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_1_api->TaskNum = 9;
+ TASK_GEN_DP_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0120UL);
+ TASK_GEN_DP_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0124UL);
+ TASK_GEN_DP_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0128UL);
+ TASK_GEN_DP_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x012cUL);
+ TASK_GEN_DP_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0138UL);
+ TASK_GEN_DP_1_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_1_api->PtrFDT)+3;
+ TASK_GEN_DP_1_api->NumDRD = 4;
+ TASK_GEN_DP_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_GEN_DP_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_1_api->NumVar = 9;
+ TASK_GEN_DP_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_1_api->NumInc = 8;
+ TASK_GEN_DP_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_1_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_1_api->Bytes = &(TASK_GEN_DP_1_api->var[0]);
+ TASK_GEN_DP_1_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[0])+1;
+ TASK_GEN_DP_1_api->IterExtra = &(TASK_GEN_DP_1_api->var[1]);
+ TASK_GEN_DP_1_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[1])+1;
+ TASK_GEN_DP_1_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[2])+1;
+ TASK_GEN_DP_1_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[3])+1;
+ TASK_GEN_DP_1_api->StartAddrDst = &(TASK_GEN_DP_1_api->var[4]);
+ TASK_GEN_DP_1_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_1_api->inc[4])+1;
+ TASK_GEN_DP_1_api->StartAddrSrc = &(TASK_GEN_DP_1_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_2(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_2_api->TaskNum = 10;
+ TASK_GEN_DP_2_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0140UL);
+ TASK_GEN_DP_2_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0144UL);
+ TASK_GEN_DP_2_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0148UL);
+ TASK_GEN_DP_2_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x014cUL);
+ TASK_GEN_DP_2_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0158UL);
+ TASK_GEN_DP_2_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_2_api->PtrFDT)+3;
+ TASK_GEN_DP_2_api->NumDRD = 4;
+ TASK_GEN_DP_2_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_2_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_GEN_DP_2_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_2_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_2_api->NumVar = 9;
+ TASK_GEN_DP_2_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_2_api->NumInc = 8;
+ TASK_GEN_DP_2_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_2_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_2_api->Bytes = &(TASK_GEN_DP_2_api->var[0]);
+ TASK_GEN_DP_2_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[0])+1;
+ TASK_GEN_DP_2_api->IterExtra = &(TASK_GEN_DP_2_api->var[1]);
+ TASK_GEN_DP_2_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[1])+1;
+ TASK_GEN_DP_2_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[2])+1;
+ TASK_GEN_DP_2_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[3])+1;
+ TASK_GEN_DP_2_api->StartAddrDst = &(TASK_GEN_DP_2_api->var[4]);
+ TASK_GEN_DP_2_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_2_api->inc[4])+1;
+ TASK_GEN_DP_2_api->StartAddrSrc = &(TASK_GEN_DP_2_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_3(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_3_api->TaskNum = 11;
+ TASK_GEN_DP_3_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0160UL);
+ TASK_GEN_DP_3_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0164UL);
+ TASK_GEN_DP_3_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0168UL);
+ TASK_GEN_DP_3_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x016cUL);
+ TASK_GEN_DP_3_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0178UL);
+ TASK_GEN_DP_3_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_3_api->PtrFDT)+3;
+ TASK_GEN_DP_3_api->NumDRD = 4;
+ TASK_GEN_DP_3_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_3_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x0018UL - vMemOffset);
+ TASK_GEN_DP_3_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_3_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_3_api->NumVar = 9;
+ TASK_GEN_DP_3_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_3_api->NumInc = 8;
+ TASK_GEN_DP_3_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_3_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_3_api->Bytes = &(TASK_GEN_DP_3_api->var[0]);
+ TASK_GEN_DP_3_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[0])+1;
+ TASK_GEN_DP_3_api->IterExtra = &(TASK_GEN_DP_3_api->var[1]);
+ TASK_GEN_DP_3_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[1])+1;
+ TASK_GEN_DP_3_api->IncrDstMA = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[2])+1;
+ TASK_GEN_DP_3_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[3])+1;
+ TASK_GEN_DP_3_api->StartAddrDst = &(TASK_GEN_DP_3_api->var[4]);
+ TASK_GEN_DP_3_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_DP_3_api->inc[4])+1;
+ TASK_GEN_DP_3_api->StartAddrSrc = &(TASK_GEN_DP_3_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_TX_BD(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_TX_BD_api->TaskNum = 12;
+ TASK_GEN_TX_BD_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x0180UL);
+ TASK_GEN_TX_BD_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x0184UL);
+ TASK_GEN_TX_BD_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x0188UL);
+ TASK_GEN_TX_BD_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x018cUL);
+ TASK_GEN_TX_BD_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x0198UL);
+ TASK_GEN_TX_BD_api->TaskPragma = (volatile uint8 *)(TASK_GEN_TX_BD_api->PtrFDT)+3;
+ TASK_GEN_TX_BD_api->NumDRD = 8;
+ TASK_GEN_TX_BD_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0028UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0030UL - vMemOffset);
+ TASK_GEN_TX_BD_api->DRD[7] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrStartTDT) + 0x0034UL - vMemOffset);
+ TASK_GEN_TX_BD_api->NumVar = 13;
+ TASK_GEN_TX_BD_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_TX_BD_api->NumInc = 7;
+ TASK_GEN_TX_BD_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_TX_BD_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_TX_BD_api->AddrDstFIFO = &(TASK_GEN_TX_BD_api->var[0]);
+ TASK_GEN_TX_BD_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[0])+1;
+ TASK_GEN_TX_BD_api->AddrEnable = &(TASK_GEN_TX_BD_api->var[1]);
+ TASK_GEN_TX_BD_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[1])+1;
+ TASK_GEN_TX_BD_api->BDTableBase = &(TASK_GEN_TX_BD_api->var[2]);
+ TASK_GEN_TX_BD_api->IncrSrcMA = (volatile sint16 *)&(TASK_GEN_TX_BD_api->inc[2])+1;
+ TASK_GEN_TX_BD_api->BDTableLast = &(TASK_GEN_TX_BD_api->var[3]);
+ TASK_GEN_TX_BD_api->BDTableStart = &(TASK_GEN_TX_BD_api->var[4]);
+ TASK_GEN_TX_BD_api->Bytes = &(TASK_GEN_TX_BD_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_RX_BD(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_RX_BD_api->TaskNum = 13;
+ TASK_GEN_RX_BD_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01a0UL);
+ TASK_GEN_RX_BD_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01a4UL);
+ TASK_GEN_RX_BD_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01a8UL);
+ TASK_GEN_RX_BD_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01acUL);
+ TASK_GEN_RX_BD_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01b8UL);
+ TASK_GEN_RX_BD_api->TaskPragma = (volatile uint8 *)(TASK_GEN_RX_BD_api->PtrFDT)+3;
+ TASK_GEN_RX_BD_api->NumDRD = 7;
+ TASK_GEN_RX_BD_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0020UL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x0028UL - vMemOffset);
+ TASK_GEN_RX_BD_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_RX_BD_api->NumVar = 12;
+ TASK_GEN_RX_BD_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_RX_BD_api->NumInc = 5;
+ TASK_GEN_RX_BD_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_RX_BD_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_RX_BD_api->AddrEnable = &(TASK_GEN_RX_BD_api->var[0]);
+ TASK_GEN_RX_BD_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_RX_BD_api->inc[0])+1;
+ TASK_GEN_RX_BD_api->AddrSrcFIFO = &(TASK_GEN_RX_BD_api->var[1]);
+ TASK_GEN_RX_BD_api->IncrDst = (volatile sint16 *)&(TASK_GEN_RX_BD_api->inc[1])+1;
+ TASK_GEN_RX_BD_api->BDTableBase = &(TASK_GEN_RX_BD_api->var[2]);
+ TASK_GEN_RX_BD_api->BDTableLast = &(TASK_GEN_RX_BD_api->var[3]);
+ TASK_GEN_RX_BD_api->BDTableStart = &(TASK_GEN_RX_BD_api->var[4]);
+ TASK_GEN_RX_BD_api->Bytes = &(TASK_GEN_RX_BD_api->var[5]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_BD_0(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_BD_0_api->TaskNum = 14;
+ TASK_GEN_DP_BD_0_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01c0UL);
+ TASK_GEN_DP_BD_0_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01c4UL);
+ TASK_GEN_DP_BD_0_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01c8UL);
+ TASK_GEN_DP_BD_0_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01ccUL);
+ TASK_GEN_DP_BD_0_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01d8UL);
+ TASK_GEN_DP_BD_0_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_BD_0_api->PtrFDT)+3;
+ TASK_GEN_DP_BD_0_api->NumDRD = 7;
+ TASK_GEN_DP_BD_0_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrStartTDT) + 0x0030UL - vMemOffset);
+ TASK_GEN_DP_BD_0_api->NumVar = 12;
+ TASK_GEN_DP_BD_0_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_BD_0_api->NumInc = 6;
+ TASK_GEN_DP_BD_0_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_0_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_BD_0_api->AddrEnable = &(TASK_GEN_DP_BD_0_api->var[0]);
+ TASK_GEN_DP_BD_0_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[0])+1;
+ TASK_GEN_DP_BD_0_api->BDTableBase = &(TASK_GEN_DP_BD_0_api->var[1]);
+ TASK_GEN_DP_BD_0_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[1])+1;
+ TASK_GEN_DP_BD_0_api->BDTableLast = &(TASK_GEN_DP_BD_0_api->var[2]);
+ TASK_GEN_DP_BD_0_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_BD_0_api->inc[2])+1;
+ TASK_GEN_DP_BD_0_api->BDTableStart = &(TASK_GEN_DP_BD_0_api->var[3]);
+ TASK_GEN_DP_BD_0_api->Bytes = &(TASK_GEN_DP_BD_0_api->var[4]);
+}
+
+
+void init_dma_image_TASK_GEN_DP_BD_1(uint8 *taskBar, sint64 vMemOffset)
+{
+ uint8 *vMem_taskBar = (taskBar - vMemOffset);
+ TASK_GEN_DP_BD_1_api->TaskNum = 15;
+ TASK_GEN_DP_BD_1_api->PtrStartTDT = (volatile uint32 *)(vMem_taskBar + 0x01e0UL);
+ TASK_GEN_DP_BD_1_api->PtrEndTDT = (volatile uint32 *)(vMem_taskBar + 0x01e4UL);
+ TASK_GEN_DP_BD_1_api->PtrVarTab = (volatile uint32 *)(vMem_taskBar + 0x01e8UL);
+ TASK_GEN_DP_BD_1_api->PtrFDT = (volatile uint32 *)(vMem_taskBar + 0x01ecUL);
+ TASK_GEN_DP_BD_1_api->PtrCSave = (volatile uint32 *)(vMem_taskBar + 0x01f8UL);
+ TASK_GEN_DP_BD_1_api->TaskPragma = (volatile uint8 *)(TASK_GEN_DP_BD_1_api->PtrFDT)+3;
+ TASK_GEN_DP_BD_1_api->NumDRD = 7;
+ TASK_GEN_DP_BD_1_api->DRD[0] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0004UL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[1] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x000cUL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[2] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0010UL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[3] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0014UL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[4] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0024UL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[5] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x002cUL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->DRD[6] = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrStartTDT) + 0x0030UL - vMemOffset);
+ TASK_GEN_DP_BD_1_api->NumVar = 12;
+ TASK_GEN_DP_BD_1_api->var = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrVarTab) - vMemOffset);
+ TASK_GEN_DP_BD_1_api->NumInc = 6;
+ TASK_GEN_DP_BD_1_api->inc = (volatile uint32 *)(volatile uint32)(*(TASK_GEN_DP_BD_1_api->PtrVarTab) + (4*24) - vMemOffset);
+ TASK_GEN_DP_BD_1_api->AddrEnable = &(TASK_GEN_DP_BD_1_api->var[0]);
+ TASK_GEN_DP_BD_1_api->IncrBytes = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[0])+1;
+ TASK_GEN_DP_BD_1_api->BDTableBase = &(TASK_GEN_DP_BD_1_api->var[1]);
+ TASK_GEN_DP_BD_1_api->IncrDst = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[1])+1;
+ TASK_GEN_DP_BD_1_api->BDTableLast = &(TASK_GEN_DP_BD_1_api->var[2]);
+ TASK_GEN_DP_BD_1_api->IncrSrc = (volatile sint16 *)&(TASK_GEN_DP_BD_1_api->inc[2])+1;
+ TASK_GEN_DP_BD_1_api->BDTableStart = &(TASK_GEN_DP_BD_1_api->var[3]);
+ TASK_GEN_DP_BD_1_api->Bytes = &(TASK_GEN_DP_BD_1_api->var[4]);
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.capi.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.capi.h
new file mode 100644
index 0000000000..18a64b7138
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.capi.h
@@ -0,0 +1,84 @@
+#ifndef __DMA_IMAGE_CAPI_H
+#define __DMA_IMAGE_CAPI_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+******************************************************************************/
+
+
+#include "../bestcomm/dma_image.h"
+
+typedef enum {
+ TASK_PCI_TX,
+ TASK_PCI_RX,
+ TASK_FEC_TX,
+ TASK_FEC_RX,
+ TASK_LPC,
+ TASK_ATA,
+ TASK_CRC16_DP_0,
+ TASK_CRC16_DP_1,
+ TASK_GEN_DP_0,
+ TASK_GEN_DP_1,
+ TASK_GEN_DP_2,
+ TASK_GEN_DP_3,
+ TASK_GEN_TX_BD,
+ TASK_GEN_RX_BD,
+ TASK_GEN_DP_BD_0,
+ TASK_GEN_DP_BD_1
+} TaskName_t;
+
+TaskId TaskSetup_TASK_PCI_TX (TASK_PCI_TX_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_PCI_RX (TASK_PCI_RX_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_FEC_TX (TASK_FEC_TX_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_FEC_RX (TASK_FEC_RX_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_LPC (TASK_LPC_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_ATA (TASK_ATA_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_CRC16_DP_0(TASK_CRC16_DP_0_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_CRC16_DP_1(TASK_CRC16_DP_1_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_0 (TASK_GEN_DP_0_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_1 (TASK_GEN_DP_1_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_2 (TASK_GEN_DP_2_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_3 (TASK_GEN_DP_3_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_TX_BD (TASK_GEN_TX_BD_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_RX_BD (TASK_GEN_RX_BD_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_BD_0(TASK_GEN_DP_BD_0_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+TaskId TaskSetup_TASK_GEN_DP_BD_1(TASK_GEN_DP_BD_1_api_t *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams);
+
+#endif /* __DMA_IMAGE_CAPI_H */
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.h
new file mode 100644
index 0000000000..f7c8aaf4ae
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.h
@@ -0,0 +1,472 @@
+#ifndef __DMA_IMAGE_H
+#define __DMA_IMAGE_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+******************************************************************************/
+
+
+#include "../bestcomm/include/ppctypes.h"
+
+void init_dma_image_TASK_PCI_TX(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_PCI_RX(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_FEC_TX(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_FEC_RX(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_LPC(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_ATA(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_CRC16_DP_0(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_CRC16_DP_1(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_0(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_1(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_2(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_3(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_TX_BD(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_RX_BD(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_BD_0(uint8 *vMem_taskBar, sint64 vMemOffset);
+void init_dma_image_TASK_GEN_DP_BD_1(uint8 *vMem_taskBar, sint64 vMemOffset);
+
+/* MBAR_TASK_TABLE is the first address of task table */
+#ifndef MBAR_TASK_TABLE
+#define MBAR_TASK_TABLE 0xf0008000UL
+#endif
+
+/* MBAR_DMA_FREE is the first free address after task table */
+#define MBAR_DMA_FREE MBAR_TASK_TABLE + 0x00001500UL
+
+/* TASK_BAR is the first address of the Entry table */
+#define TASK_BAR MBAR_TASK_TABLE + 0x00000000UL
+#define TASK_BAR_OFFSET 0x00000000UL
+
+typedef struct task_info0 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[7];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrDstFIFO;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrPktSizeReg;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *AddrSCStatusReg;
+ volatile uint32 *Bytes;
+ volatile uint32 *IterExtra;
+ volatile uint32 *StartAddrSrc;
+} TASK_PCI_TX_api_t;
+extern TASK_PCI_TX_api_t *TASK_PCI_TX_api;
+
+typedef struct task_info1 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[5];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrPktSizeReg;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrSrcFIFO;
+ volatile sint16 *IncrDst;
+ volatile uint32 *Bytes;
+ volatile uint32 *IterExtra;
+ volatile uint32 *StartAddrDst;
+} TASK_PCI_RX_api_t;
+extern TASK_PCI_RX_api_t *TASK_PCI_RX_api;
+
+typedef struct task_info2 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[22];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrDRD;
+ volatile uint32 AddrDRDIdx;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrDstFIFO;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *BDTableBase;
+ volatile uint32 *BDTableLast;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_FEC_TX_api_t;
+extern TASK_FEC_TX_api_t *TASK_FEC_TX_api;
+
+typedef struct task_info3 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[13];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrSrcFIFO;
+ volatile sint16 *IncrDst;
+ volatile uint32 *BDTableBase;
+ volatile sint16 *IncrDstMA;
+ volatile uint32 *BDTableLast;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_FEC_RX_api_t;
+extern TASK_FEC_RX_api_t *TASK_FEC_RX_api;
+
+typedef struct task_info4 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[4];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_LPC_api_t;
+extern TASK_LPC_api_t *TASK_LPC_api;
+
+typedef struct task_info5 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[7];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *BDTableBase;
+ volatile sint16 *IncrDst;
+ volatile uint32 *BDTableLast;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_ATA_api_t;
+extern TASK_ATA_api_t *TASK_ATA_api;
+
+typedef struct task_info6 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[9];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_CRC16_DP_0_api_t;
+extern TASK_CRC16_DP_0_api_t *TASK_CRC16_DP_0_api;
+
+typedef struct task_info7 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[9];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_CRC16_DP_1_api_t;
+extern TASK_CRC16_DP_1_api_t *TASK_CRC16_DP_1_api;
+
+typedef struct task_info8 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[4];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_GEN_DP_0_api_t;
+extern TASK_GEN_DP_0_api_t *TASK_GEN_DP_0_api;
+
+typedef struct task_info9 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[4];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_GEN_DP_1_api_t;
+extern TASK_GEN_DP_1_api_t *TASK_GEN_DP_1_api;
+
+typedef struct task_info10 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[4];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_GEN_DP_2_api_t;
+extern TASK_GEN_DP_2_api_t *TASK_GEN_DP_2_api;
+
+typedef struct task_info11 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[4];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *Bytes;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *IterExtra;
+ volatile sint16 *IncrDst;
+ volatile sint16 *IncrDstMA;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *StartAddrDst;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *StartAddrSrc;
+} TASK_GEN_DP_3_api_t;
+extern TASK_GEN_DP_3_api_t *TASK_GEN_DP_3_api;
+
+typedef struct task_info12 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[8];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrDstFIFO;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *BDTableBase;
+ volatile sint16 *IncrSrcMA;
+ volatile uint32 *BDTableLast;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_GEN_TX_BD_api_t;
+extern TASK_GEN_TX_BD_api_t *TASK_GEN_TX_BD_api;
+
+typedef struct task_info13 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[7];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *AddrSrcFIFO;
+ volatile sint16 *IncrDst;
+ volatile uint32 *BDTableBase;
+ volatile uint32 *BDTableLast;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_GEN_RX_BD_api_t;
+extern TASK_GEN_RX_BD_api_t *TASK_GEN_RX_BD_api;
+
+typedef struct task_info14 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[7];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *BDTableBase;
+ volatile sint16 *IncrDst;
+ volatile uint32 *BDTableLast;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_GEN_DP_BD_0_api_t;
+extern TASK_GEN_DP_BD_0_api_t *TASK_GEN_DP_BD_0_api;
+
+typedef struct task_info15 {
+ volatile uint32 TaskNum;
+ volatile uint32 *PtrStartTDT;
+ volatile uint32 *PtrEndTDT;
+ volatile uint32 *PtrVarTab;
+ volatile uint32 *PtrFDT;
+ volatile uint32 *PtrCSave;
+ volatile uint32 NumDRD;
+ volatile uint32 *DRD[7];
+ volatile uint32 NumVar;
+ volatile uint32 *var;
+ volatile uint32 NumInc;
+ volatile uint32 *inc;
+ volatile uint8 *TaskPragma;
+ volatile uint32 *AddrEnable;
+ volatile sint16 *IncrBytes;
+ volatile uint32 *BDTableBase;
+ volatile sint16 *IncrDst;
+ volatile uint32 *BDTableLast;
+ volatile sint16 *IncrSrc;
+ volatile uint32 *BDTableStart;
+ volatile uint32 *Bytes;
+} TASK_GEN_DP_BD_1_api_t;
+extern TASK_GEN_DP_BD_1_api_t *TASK_GEN_DP_BD_1_api;
+
+
+#endif /* __DMA_IMAGE_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.reloc.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.reloc.c
new file mode 100644
index 0000000000..b2feac7cf3
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/dma_image.reloc.c
@@ -0,0 +1,1453 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+******************************************************************************/
+
+
+#include "../bestcomm/include/ppctypes.h"
+
+uint32 taskTableBytes = 0x00001500; /* Number of bytes in image */
+
+uint32 taskTableTasks = 0x00000010; /* Number of tasks in image */
+
+uint32 offsetEntry = 0x00000000; /* Offset to Entry section */
+
+uint32 taskTable[] = {
+
+/* SmartDMA image contains 5376 bytes (578 bytes unused) */
+
+/* Task0(TASK_PCI_TX): Start of Entry -> 0xf0008000 */
+0x00000200, /* Task 0 Descriptor Table */
+0x00000238,
+0x00000700, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x00001000, /* Task 0 context save space */
+0x00000000,
+/* Task1(TASK_PCI_RX): Start of Entry -> 0xf0008020 */
+0x0000023c, /* Task 0 Descriptor Table */
+0x00000268,
+0x00000780, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x00001050, /* Task 0 context save space */
+0x00000000,
+/* Task2(TASK_FEC_TX): Start of Entry -> 0xf0008040 */
+0x0000026c, /* Task 0 Descriptor Table */
+0x000002f8,
+0x00000800, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x000010a0, /* Task 0 context save space */
+0x00000000,
+/* Task3(TASK_FEC_RX): Start of Entry -> 0xf0008060 */
+0x000002fc, /* Task 0 Descriptor Table */
+0x00000358,
+0x00000880, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x000010f0, /* Task 0 context save space */
+0x00000000,
+/* Task4(TASK_LPC): Start of Entry -> 0xf0008080 */
+0x0000035c, /* Task 0 Descriptor Table */
+0x0000038c,
+0x00000900, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x00001140, /* Task 0 context save space */
+0x00000000,
+/* Task5(TASK_ATA): Start of Entry -> 0xf00080a0 */
+0x00000390, /* Task 0 Descriptor Table */
+0x000003c4,
+0x00000980, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x00001190, /* Task 0 context save space */
+0x00000000,
+/* Task6(TASK_CRC16_DP_0): Start of Entry -> 0xf00080c0 */
+0x000003c8, /* Task 0 Descriptor Table */
+0x0000040c,
+0x00000a00, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x000011e0, /* Task 0 context save space */
+0x00000000,
+/* Task7(TASK_CRC16_DP_1): Start of Entry -> 0xf00080e0 */
+0x00000410, /* Task 0 Descriptor Table */
+0x00000454,
+0x00000a80, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x00001230, /* Task 0 context save space */
+0x00000000,
+/* Task8(TASK_GEN_DP_0): Start of Entry -> 0xf0008100 */
+0x00000458, /* Task 0 Descriptor Table */
+0x00000488,
+0x00000b00, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x00001280, /* Task 0 context save space */
+0x00000000,
+/* Task9(TASK_GEN_DP_1): Start of Entry -> 0xf0008120 */
+0x0000048c, /* Task 0 Descriptor Table */
+0x000004bc,
+0x00000b80, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x000012d0, /* Task 0 context save space */
+0x00000000,
+/* Task10(TASK_GEN_DP_2): Start of Entry -> 0xf0008140 */
+0x000004c0, /* Task 0 Descriptor Table */
+0x000004f0,
+0x00000c00, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x00001320, /* Task 0 context save space */
+0x00000000,
+/* Task11(TASK_GEN_DP_3): Start of Entry -> 0xf0008160 */
+0x000004f4, /* Task 0 Descriptor Table */
+0x00000524,
+0x00000c80, /* Task 0 Variable Table */
+0x00000027, /* No FDT */
+0x00000000,
+0x00000000,
+0x00001370, /* Task 0 context save space */
+0x00000000,
+/* Task12(TASK_GEN_TX_BD): Start of Entry -> 0xf0008180 */
+0x00000528, /* Task 0 Descriptor Table */
+0x00000560,
+0x00000d00, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x000013c0, /* Task 0 context save space */
+0x00000000,
+/* Task13(TASK_GEN_RX_BD): Start of Entry -> 0xf00081a0 */
+0x00000564, /* Task 0 Descriptor Table */
+0x00000594,
+0x00000d80, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x00001410, /* Task 0 context save space */
+0x00000000,
+/* Task14(TASK_GEN_DP_BD_0): Start of Entry -> 0xf00081c0 */
+0x00000598, /* Task 0 Descriptor Table */
+0x000005cc,
+0x00000e00, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x00001460, /* Task 0 context save space */
+0x00000000,
+/* Task15(TASK_GEN_DP_BD_1): Start of Entry -> 0xf00081e0 */
+0x000005d0, /* Task 0 Descriptor Table */
+0x00000604,
+0x00000e80, /* Task 0 Variable Table */
+0x00000f27, /* Task 0 Function Descriptor Table & Flags */
+0x00000000,
+0x00000000,
+0x000014b0, /* Task 0 context save space */
+0x00000000,
+
+/* Task0(TASK_PCI_TX): Start of TDT -> 0xf0008200 */
+0xc080601b, /* 0000(../LIB_incl/hdplx.sc:167): LCDEXT: idx0 = var1, idx1 = var0; ; idx0 += inc3, idx1 += inc3 */
+0x82190292, /* 0004(../LIB_incl/hdplx.sc:177): LCD: idx2 = var4; idx2 >= var10; idx2 += inc2 */
+0x1004c018, /* 0008(../LIB_incl/hdplx.sc:179): DRD1A: *idx0 = var3; FN=0 MORE init=0 WS=2 RS=0 */
+0x8381a288, /* 000C(../LIB_incl/hdplx.sc:183): LCD: idx3 = var7, idx4 = var3; idx4 > var10; idx3 += inc1, idx4 += inc0 */
+0x011ec798, /* 0010(../LIB_incl/hdplx.sc:200): DRD1A: *idx1 = *idx3; FN=0 init=8 WS=3 RS=3 */
+0x999a001b, /* 0014(../LIB_incl/hdplx.sc:249): LCD: idx3 = idx3, idx4 = idx4; idx3 once var0; idx3 += inc3, idx4 += inc3 */
+0x00001f18, /* 0018(../LIB_incl/hdplx.sc:258): DRD1A: var7 = idx3; FN=0 init=0 WS=0 RS=0 */
+0x850102e3, /* 001C(../LIB_incl/hdplx.sc:281): LCD: idx3 = var10, idx4 = var2; idx3 != var11; idx3 += inc4, idx4 += inc3 */
+0x60080002, /* 0020(../LIB_incl/hdplx.sc:281): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=0 RS=1 */
+0x08ccfd0b, /* 0024(../LIB_incl/hdplx.sc:281): DRD2B1: idx3 = EU3(); EU3(*idx4,var11) */
+0x9a19801b, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx3 = idx4; idx3 once var0; idx3 += inc3 */
+0x0002cc58, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: *idx3 = var11; FN=0 init=0 WS=1 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+0x8018001b, /* 0034(../LIB_incl/hdplx.sc:285): LCD: idx0 = var0; idx0 once var0; idx0 += inc3 */
+0x040001f8, /* 0038(../LIB_incl/hdplx.sc:285): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+/* Task1(TASK_PCI_RX): Start of TDT -> 0xf000823c */
+0xc000e01b, /* 0000(../LIB_incl/hdplx.sc:167): LCDEXT: idx0 = var0, idx1 = var1; ; idx0 += inc3, idx1 += inc3 */
+0x81990212, /* 0004(../LIB_incl/hdplx.sc:177): LCD: idx2 = var3; idx2 >= var8; idx2 += inc2 */
+0x1004c010, /* 0008(../LIB_incl/hdplx.sc:179): DRD1A: *idx0 = var2; FN=0 MORE init=0 WS=2 RS=0 */
+0x83012208, /* 000C(../LIB_incl/hdplx.sc:186): LCD: idx3 = var6, idx4 = var2; idx4 > var8; idx3 += inc1, idx4 += inc0 */
+0x00fecf88, /* 0010(../LIB_incl/hdplx.sc:200): DRD1A: *idx3 = *idx1; FN=0 init=7 WS=3 RS=3 */
+0x999a001b, /* 0014(../LIB_incl/hdplx.sc:252): LCD: idx3 = idx3, idx4 = idx4; idx3 once var0; idx3 += inc3, idx4 += inc3 */
+0x00001b18, /* 0018(../LIB_incl/hdplx.sc:261): DRD1A: var6 = idx3; FN=0 init=0 WS=0 RS=0 */
+0x8019801b, /* 001C(../LIB_incl/hdplx.sc:281): LCD: idx3 = var0; idx3 once var0; idx3 += inc3 */
+0x040001f8, /* 0020(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0024(:0): NOP */
+0x8018001b, /* 0028(../LIB_incl/hdplx.sc:285): LCD: idx0 = var0; idx0 once var0; idx0 += inc3 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:285): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+/* Task2(TASK_FEC_TX): Start of TDT -> 0xf000826c */
+0x8018001b, /* 0000(../LIB_incl/bd_hdplx.sc:303): LCD: idx0 = var0; idx0 <= var0; idx0 += inc3 */
+0x60000005, /* 0004(../LIB_incl/bd_hdplx.sc:307): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */
+0x01ccfc0d, /* 0008(../LIB_incl/bd_hdplx.sc:307): DRD2B1: var7 = EU3(); EU3(*idx0,var13) */
+0x8082a123, /* 000C(../LIB_incl/bd_hdplx.sc:316): LCD: idx0 = var1, idx1 = var5; idx1 <= var4; idx0 += inc4, idx1 += inc3 */
+0x10801418, /* 0010(../LIB_incl/bd_hdplx.sc:343): DRD1A: var5 = var3; FN=0 MORE init=4 WS=0 RS=0 */
+0xf88103a4, /* 0014(../LIB_incl/bd_hdplx.sc:347): LCDEXT: idx2 = *idx1, idx3 = var2; idx2 < var14; idx2 += inc4, idx3 += inc4 */
+0x801a6024, /* 0018(../LIB_incl/bd_hdplx.sc:351): LCD: idx4 = var0; ; idx4 += inc4 */
+0x10001708, /* 001C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var5 = idx1; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0020(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0cccfccf, /* 0024(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx3 = EU3(); EU3(*idx3,var15) */
+0x991a002c, /* 0028(../LIB_incl/bd_hdplx.sc:373): LCD: idx2 = idx2, idx3 = idx4; idx2 once var0; idx2 += inc5, idx3 += inc4 */
+0x70000002, /* 002C(../LIB_incl/bd_hdplx.sc:377): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */
+0x024cfc4d, /* 0030(../LIB_incl/bd_hdplx.sc:377): DRD2B1: var9 = EU3(); EU3(*idx1,var13) */
+0x60000003, /* 0034(../LIB_incl/bd_hdplx.sc:378): DRD2A: EU0=0 EU1=0 EU2=0 EU3=3 EXT init=0 WS=0 RS=0 */
+0x0cccf247, /* 0038(../LIB_incl/bd_hdplx.sc:378): DRD2B1: *idx3 = EU3(); EU3(var9,var7) */
+0x80004000, /* 003C(../LIB_incl/bd_hdplx.sc:390): LCDEXT: idx2 = 0x00000000; ; */
+0xb8c80029, /* 0040(../LIB_incl/bd_hdplx.sc:390): LCD: idx3 = *(idx1 + var0000001a); idx3 once var0; idx3 += inc5 */
+0x70000002, /* 0044(../LIB_incl/bd_hdplx.sc:401): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */
+0x088cf8d1, /* 0048(../LIB_incl/bd_hdplx.sc:401): DRD2B1: idx2 = EU3(); EU3(idx3,var17) */
+0x00002f10, /* 004C(../LIB_incl/bd_hdplx.sc:404): DRD1A: var11 = idx2; FN=0 init=0 WS=0 RS=0 */
+0x99198432, /* 0050(../LIB_incl/bd_hdplx.sc:411): LCD: idx2 = idx2, idx3 = idx3; idx2 > var16; idx2 += inc6, idx3 += inc2 */
+0x008ac398, /* 0054(../LIB_incl/bd_hdplx.sc:428): DRD1A: *idx0 = *idx3; FN=0 init=4 WS=1 RS=1 */
+0x80004000, /* 0058(../LIB_incl/bd_hdplx.sc:434): LCDEXT: idx2 = 0x00000000; ; */
+0x9999802d, /* 005C(../LIB_incl/bd_hdplx.sc:439): LCD: idx3 = idx3; idx3 once var0; idx3 += inc5 */
+0x70000002, /* 0060(../LIB_incl/bd_hdplx.sc:446): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */
+0x048cfc53, /* 0064(../LIB_incl/bd_hdplx.sc:446): DRD2B1: var18 = EU3(); EU3(*idx1,var19) */
+0x60000008, /* 0068(../LIB_incl/bd_hdplx.sc:450): DRD2A: EU0=0 EU1=0 EU2=0 EU3=8 EXT init=0 WS=0 RS=0 */
+0x088cf48b, /* 006C(../LIB_incl/bd_hdplx.sc:450): DRD2B1: idx2 = EU3(); EU3(var18,var11) */
+0x99198481, /* 0070(../LIB_incl/bd_hdplx.sc:461): LCD: idx2 = idx2, idx3 = idx3; idx2 > var18; idx2 += inc0, idx3 += inc1 */
+0x009ec398, /* 0074(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx0 = *idx3; FN=0 init=4 WS=3 RS=3 */
+0x991983b2, /* 0078(../LIB_incl/bd_hdplx.sc:513): LCD: idx2 = idx2, idx3 = idx3; idx2 > var14; idx2 += inc6, idx3 += inc2 */
+0x088ac398, /* 007C(../LIB_incl/bd_hdplx.sc:530): DRD1A: *idx0 = *idx3; FN=0 TFD init=4 WS=1 RS=1 */
+0x9919002d, /* 0080(../LIB_incl/bd_hdplx.sc:554): LCD: idx2 = idx2; idx2 once var0; idx2 += inc5 */
+0x60000005, /* 0084(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */
+0x0c4cf88e, /* 0088(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx1 = EU3(); EU3(idx2,var14) */
+0x000001f8, /* 008C(:0): NOP */
+/* Task3(TASK_FEC_RX): Start of TDT -> 0xf00082fc */
+0x808220e3, /* 0000(../LIB_incl/bd_hdplx.sc:313): LCD: idx0 = var1, idx1 = var4; idx1 <= var3; idx0 += inc4, idx1 += inc3 */
+0x10601010, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var4 = var2; FN=0 MORE init=3 WS=0 RS=0 */
+0xb8800264, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx2 = *idx1, idx3 = var0; idx2 < var9; idx2 += inc4, idx3 += inc4 */
+0x10001308, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0cccfcca, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */
+0x80004000, /* 0018(../LIB_incl/bd_hdplx.sc:393): LCDEXT: idx2 = 0x00000000; ; */
+0xb8c58029, /* 001C(../LIB_incl/bd_hdplx.sc:393): LCD: idx3 = *(idx1 + var00000015); idx3 once var0; idx3 += inc5 */
+0x60000002, /* 0020(../LIB_incl/bd_hdplx.sc:398): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=0 RS=0 */
+0x088cf8cc, /* 0024(../LIB_incl/bd_hdplx.sc:398): DRD2B1: idx2 = EU3(); EU3(idx3,var12) */
+0x991982f2, /* 0028(../LIB_incl/bd_hdplx.sc:414): LCD: idx2 = idx2, idx3 = idx3; idx2 > var11; idx2 += inc6, idx3 += inc2 */
+0x006acf80, /* 002C(../LIB_incl/bd_hdplx.sc:428): DRD1A: *idx3 = *idx0; FN=0 init=3 WS=1 RS=1 */
+0x80004000, /* 0030(../LIB_incl/bd_hdplx.sc:437): LCDEXT: idx2 = 0x00000000; ; */
+0x9999802d, /* 0034(../LIB_incl/bd_hdplx.sc:439): LCD: idx3 = idx3; idx3 once var0; idx3 += inc5 */
+0x70000002, /* 0038(../LIB_incl/bd_hdplx.sc:446): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT MORE init=0 WS=0 RS=0 */
+0x034cfc4e, /* 003C(../LIB_incl/bd_hdplx.sc:446): DRD2B1: var13 = EU3(); EU3(*idx1,var14) */
+0x00008868, /* 0040(../LIB_incl/bd_hdplx.sc:448): DRD1A: idx2 = var13; FN=0 init=0 WS=0 RS=0 */
+0x99198341, /* 0044(../LIB_incl/bd_hdplx.sc:464): LCD: idx2 = idx2, idx3 = idx3; idx2 > var13; idx2 += inc0, idx3 += inc1 */
+0x007ecf80, /* 0048(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx3 = *idx0; FN=0 init=3 WS=3 RS=3 */
+0x99198272, /* 004C(../LIB_incl/bd_hdplx.sc:516): LCD: idx2 = idx2, idx3 = idx3; idx2 > var9; idx2 += inc6, idx3 += inc2 */
+0x046acf80, /* 0050(../LIB_incl/bd_hdplx.sc:530): DRD1A: *idx3 = *idx0; FN=0 INT init=3 WS=1 RS=1 */
+0x9819002d, /* 0054(../LIB_incl/bd_hdplx.sc:550): LCD: idx2 = idx0; idx2 once var0; idx2 += inc5 */
+0x0060c790, /* 0058(../LIB_incl/bd_hdplx.sc:551): DRD1A: *idx1 = *idx2; FN=0 init=3 WS=0 RS=0 */
+0x000001f8, /* 005C(:0): NOP */
+/* Task4(TASK_LPC): Start of TDT -> 0xf000835c */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0xc2826019, /* 0004(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198200, /* 0008(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var8; idx3 += inc0 */
+0x03fecb88, /* 000C(../LIB_incl/hdplx.sc:200): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8990019, /* 0010(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0014(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x03fecb88, /* 0018(../LIB_incl/hdplx.sc:218): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8996022, /* 001C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0020(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x0beacb88, /* 0024(../LIB_incl/hdplx.sc:241): DRD1A: *idx2 = *idx1; FN=0 TFD init=31 WS=1 RS=1 */
+0x8018803f, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx1 = var0; idx1 once var0; idx1 += inc7 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+/* Task5(TASK_ATA): Start of TDT -> 0xf0008390 */
+0x8198009b, /* 0000(../LIB_incl/bd_hdplx.sc:321): LCD: idx0 = var3; idx0 <= var2; idx0 += inc3 */
+0x13e00c08, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var3 = var1; FN=0 MORE init=31 WS=0 RS=0 */
+0xb8000264, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx1 = *idx0, idx2 = var0; idx1 < var9; idx1 += inc4, idx2 += inc4 */
+0x10000f00, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var3 = idx0; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0c8cfc8a, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx2 = EU3(); EU3(*idx2,var10) */
+0xd8988240, /* 0018(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx1 = idx1; idx1 > var9; idx1 += inc0 */
+0xf845e011, /* 001C(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx2 = *(idx0 + var00000015); ; idx2 += inc2 */
+0xb845e00a, /* 0020(../LIB_incl/bd_hdplx.sc:472): LCD: idx3 = *(idx0 + var00000019); ; idx3 += inc1 */
+0x0bfecf90, /* 0024(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx3 = *idx2; FN=0 TFD init=31 WS=3 RS=3 */
+0x9898802d, /* 0028(../LIB_incl/bd_hdplx.sc:554): LCD: idx1 = idx1; idx1 once var0; idx1 += inc5 */
+0x64000005, /* 002C(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 INT EXT init=0 WS=0 RS=0 */
+0x0c0cf849, /* 0030(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx0 = EU3(); EU3(idx1,var9) */
+0x000001f8, /* 0034(:0): NOP */
+/* Task6(TASK_CRC16_DP_0): Start of TDT -> 0xf00083c8 */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0x70000000, /* 0004(../LIB_incl/hdplx.sc:179): DRD2A: EU0=0 EU1=0 EU2=0 EU3=0 EXT MORE init=0 WS=0 RS=0 */
+0x2c87c7df, /* 0008(../LIB_incl/hdplx.sc:179): DRD2B2: EU3(var8) */
+0xc2826019, /* 000C(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198240, /* 0010(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var9; idx3 += inc0 */
+0x63fe000c, /* 0014(../LIB_incl/hdplx.sc:200): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 EXT init=31 WS=3 RS=3 */
+0x0c8cfc5f, /* 0018(../LIB_incl/hdplx.sc:200): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0xd8990019, /* 001C(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0020(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x63fe000c, /* 0024(../LIB_incl/hdplx.sc:218): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 EXT init=31 WS=3 RS=3 */
+0x0c8cfc5f, /* 0028(../LIB_incl/hdplx.sc:218): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0xd8996022, /* 002C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0030(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x6bea000c, /* 0034(../LIB_incl/hdplx.sc:241): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 TFD EXT init=31 WS=1 RS=1 */
+0x0c8cfc5f, /* 0038(../LIB_incl/hdplx.sc:241): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0x9918803f, /* 003C(../LIB_incl/hdplx.sc:281): LCD: idx1 = idx2; idx1 once var0; idx1 += inc7 */
+0x0404c599, /* 0040(../LIB_incl/hdplx.sc:281): DRD1A: *idx1 = EU3(); FN=1 INT init=0 WS=2 RS=0 */
+0x000001f8, /* 0044(:0): NOP */
+/* Task7(TASK_CRC16_DP_1): Start of TDT -> 0xf0008410 */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0x70000000, /* 0004(../LIB_incl/hdplx.sc:179): DRD2A: EU0=0 EU1=0 EU2=0 EU3=0 EXT MORE init=0 WS=0 RS=0 */
+0x2c87c7df, /* 0008(../LIB_incl/hdplx.sc:179): DRD2B2: EU3(var8) */
+0xc2826019, /* 000C(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198240, /* 0010(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var9; idx3 += inc0 */
+0x63fe000c, /* 0014(../LIB_incl/hdplx.sc:200): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 EXT init=31 WS=3 RS=3 */
+0x0c8cfc5f, /* 0018(../LIB_incl/hdplx.sc:200): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0xd8990019, /* 001C(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0020(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x63fe000c, /* 0024(../LIB_incl/hdplx.sc:218): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 EXT init=31 WS=3 RS=3 */
+0x0c8cfc5f, /* 0028(../LIB_incl/hdplx.sc:218): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0xd8996022, /* 002C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0030(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x6bea000c, /* 0034(../LIB_incl/hdplx.sc:241): DRD2A: EU0=0 EU1=0 EU2=0 EU3=12 TFD EXT init=31 WS=1 RS=1 */
+0x0c8cfc5f, /* 0038(../LIB_incl/hdplx.sc:241): DRD2B1: *idx2 = EU3(); EU3(*idx1) */
+0x9918803f, /* 003C(../LIB_incl/hdplx.sc:281): LCD: idx1 = idx2; idx1 once var0; idx1 += inc7 */
+0x0404c599, /* 0040(../LIB_incl/hdplx.sc:281): DRD1A: *idx1 = EU3(); FN=1 INT init=0 WS=2 RS=0 */
+0x000001f8, /* 0044(:0): NOP */
+/* Task8(TASK_GEN_DP_0): Start of TDT -> 0xf0008458 */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0xc2826019, /* 0004(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198200, /* 0008(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var8; idx3 += inc0 */
+0x03fecb88, /* 000C(../LIB_incl/hdplx.sc:200): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8990019, /* 0010(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0014(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x03fecb88, /* 0018(../LIB_incl/hdplx.sc:218): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8996022, /* 001C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0020(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x0beacb88, /* 0024(../LIB_incl/hdplx.sc:241): DRD1A: *idx2 = *idx1; FN=0 TFD init=31 WS=1 RS=1 */
+0x8018803f, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx1 = var0; idx1 once var0; idx1 += inc7 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+/* Task9(TASK_GEN_DP_1): Start of TDT -> 0xf000848c */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0xc2826019, /* 0004(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198200, /* 0008(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var8; idx3 += inc0 */
+0x03fecb88, /* 000C(../LIB_incl/hdplx.sc:200): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8990019, /* 0010(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0014(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x03fecb88, /* 0018(../LIB_incl/hdplx.sc:218): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8996022, /* 001C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0020(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x0beacb88, /* 0024(../LIB_incl/hdplx.sc:241): DRD1A: *idx2 = *idx1; FN=0 TFD init=31 WS=1 RS=1 */
+0x8018803f, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx1 = var0; idx1 once var0; idx1 += inc7 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+/* Task10(TASK_GEN_DP_2): Start of TDT -> 0xf00084c0 */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0xc2826019, /* 0004(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198200, /* 0008(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var8; idx3 += inc0 */
+0x03fecb88, /* 000C(../LIB_incl/hdplx.sc:200): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8990019, /* 0010(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0014(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x03fecb88, /* 0018(../LIB_incl/hdplx.sc:218): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8996022, /* 001C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0020(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x0beacb88, /* 0024(../LIB_incl/hdplx.sc:241): DRD1A: *idx2 = *idx1; FN=0 TFD init=31 WS=1 RS=1 */
+0x8018803f, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx1 = var0; idx1 once var0; idx1 += inc7 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+/* Task11(TASK_GEN_DP_3): Start of TDT -> 0xf00084f4 */
+0x809801ed, /* 0000(../LIB_incl/hdplx.sc:177): LCD: idx0 = var1; idx0 >= var7; idx0 += inc5 */
+0xc2826019, /* 0004(../LIB_incl/hdplx.sc:183): LCDEXT: idx1 = var5, idx2 = var4; ; idx1 += inc3, idx2 += inc1 */
+0x80198200, /* 0008(../LIB_incl/hdplx.sc:188): LCD: idx3 = var0; idx3 > var8; idx3 += inc0 */
+0x03fecb88, /* 000C(../LIB_incl/hdplx.sc:200): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8990019, /* 0010(../LIB_incl/hdplx.sc:208): LCDEXT: idx1 = idx1, idx2 = idx2; idx1 once var0; idx1 += inc3, idx2 += inc1 */
+0x9999e000, /* 0014(../LIB_incl/hdplx.sc:211): LCD: idx3 = idx3; ; idx3 += inc0 */
+0x03fecb88, /* 0018(../LIB_incl/hdplx.sc:218): DRD1A: *idx2 = *idx1; FN=0 init=31 WS=3 RS=3 */
+0xd8996022, /* 001C(../LIB_incl/hdplx.sc:224): LCDEXT: idx1 = idx1, idx2 = idx2; ; idx1 += inc4, idx2 += inc2 */
+0x999981f6, /* 0020(../LIB_incl/hdplx.sc:229): LCD: idx3 = idx3; idx3 > var7; idx3 += inc6 */
+0x0beacb88, /* 0024(../LIB_incl/hdplx.sc:241): DRD1A: *idx2 = *idx1; FN=0 TFD init=31 WS=1 RS=1 */
+0x8018803f, /* 0028(../LIB_incl/hdplx.sc:281): LCD: idx1 = var0; idx1 once var0; idx1 += inc7 */
+0x040001f8, /* 002C(../LIB_incl/hdplx.sc:281): DRD1A: FN=0 INT init=0 WS=0 RS=0 */
+0x000001f8, /* 0030(:0): NOP */
+/* Task12(TASK_GEN_TX_BD): Start of TDT -> 0xf0008528 */
+0x800220e3, /* 0000(../LIB_incl/bd_hdplx.sc:316): LCD: idx0 = var0, idx1 = var4; idx1 <= var3; idx0 += inc4, idx1 += inc3 */
+0x13e01010, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var4 = var2; FN=0 MORE init=31 WS=0 RS=0 */
+0xb8808264, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx2 = *idx1, idx3 = var1; idx2 < var9; idx2 += inc4, idx3 += inc4 */
+0x10001308, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0cccfcca, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */
+0xd9190300, /* 0018(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx2 = idx2; idx2 > var12; idx2 += inc0 */
+0xb8c5e009, /* 001C(../LIB_incl/bd_hdplx.sc:469): LCD: idx3 = *(idx1 + var00000015); ; idx3 += inc1 */
+0x03fec398, /* 0020(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx0 = *idx3; FN=0 init=31 WS=3 RS=3 */
+0x9919826a, /* 0024(../LIB_incl/bd_hdplx.sc:513): LCD: idx2 = idx2, idx3 = idx3; idx2 > var9; idx2 += inc5, idx3 += inc2 */
+0x0feac398, /* 0028(../LIB_incl/bd_hdplx.sc:530): DRD1A: *idx0 = *idx3; FN=0 TFD INT init=31 WS=1 RS=1 */
+0x99190036, /* 002C(../LIB_incl/bd_hdplx.sc:554): LCD: idx2 = idx2; idx2 once var0; idx2 += inc6 */
+0x60000005, /* 0030(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */
+0x0c4cf889, /* 0034(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx1 = EU3(); EU3(idx2,var9) */
+0x000001f8, /* 0038(:0): NOP */
+/* Task13(TASK_GEN_RX_BD): Start of TDT -> 0xf0008564 */
+0x808220da, /* 0000(../LIB_incl/bd_hdplx.sc:313): LCD: idx0 = var1, idx1 = var4; idx1 <= var3; idx0 += inc3, idx1 += inc2 */
+0x13e01010, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var4 = var2; FN=0 MORE init=31 WS=0 RS=0 */
+0xb880025b, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx2 = *idx1, idx3 = var0; idx2 < var9; idx2 += inc3, idx3 += inc3 */
+0x10001308, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var4 = idx1; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0cccfcca, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx3 = EU3(); EU3(*idx3,var10) */
+0xd9190240, /* 0018(../LIB_incl/bd_hdplx.sc:472): LCDEXT: idx2 = idx2; idx2 > var9; idx2 += inc0 */
+0xb8c5e009, /* 001C(../LIB_incl/bd_hdplx.sc:472): LCD: idx3 = *(idx1 + var00000015); ; idx3 += inc1 */
+0x07fecf80, /* 0020(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx3 = *idx0; FN=0 INT init=31 WS=3 RS=3 */
+0x99190024, /* 0024(../LIB_incl/bd_hdplx.sc:554): LCD: idx2 = idx2; idx2 once var0; idx2 += inc4 */
+0x60000005, /* 0028(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 EXT init=0 WS=0 RS=0 */
+0x0c4cf889, /* 002C(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx1 = EU3(); EU3(idx2,var9) */
+0x000001f8, /* 0030(:0): NOP */
+/* Task14(TASK_GEN_DP_BD_0): Start of TDT -> 0xf0008598 */
+0x8198009b, /* 0000(../LIB_incl/bd_hdplx.sc:321): LCD: idx0 = var3; idx0 <= var2; idx0 += inc3 */
+0x13e00c08, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var3 = var1; FN=0 MORE init=31 WS=0 RS=0 */
+0xb8000264, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx1 = *idx0, idx2 = var0; idx1 < var9; idx1 += inc4, idx2 += inc4 */
+0x10000f00, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var3 = idx0; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0c8cfc8a, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx2 = EU3(); EU3(*idx2,var10) */
+0xd8988240, /* 0018(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx1 = idx1; idx1 > var9; idx1 += inc0 */
+0xf845e011, /* 001C(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx2 = *(idx0 + var00000015); ; idx2 += inc2 */
+0xb845e00a, /* 0020(../LIB_incl/bd_hdplx.sc:472): LCD: idx3 = *(idx0 + var00000019); ; idx3 += inc1 */
+0x0bfecf90, /* 0024(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx3 = *idx2; FN=0 TFD init=31 WS=3 RS=3 */
+0x9898802d, /* 0028(../LIB_incl/bd_hdplx.sc:554): LCD: idx1 = idx1; idx1 once var0; idx1 += inc5 */
+0x64000005, /* 002C(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 INT EXT init=0 WS=0 RS=0 */
+0x0c0cf849, /* 0030(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx0 = EU3(); EU3(idx1,var9) */
+0x000001f8, /* 0034(:0): NOP */
+/* Task15(TASK_GEN_DP_BD_1): Start of TDT -> 0xf00085d0 */
+0x8198009b, /* 0000(../LIB_incl/bd_hdplx.sc:321): LCD: idx0 = var3; idx0 <= var2; idx0 += inc3 */
+0x13e00c08, /* 0004(../LIB_incl/bd_hdplx.sc:343): DRD1A: var3 = var1; FN=0 MORE init=31 WS=0 RS=0 */
+0xb8000264, /* 0008(../LIB_incl/bd_hdplx.sc:347): LCD: idx1 = *idx0, idx2 = var0; idx1 < var9; idx1 += inc4, idx2 += inc4 */
+0x10000f00, /* 000C(../LIB_incl/bd_hdplx.sc:353): DRD1A: var3 = idx0; FN=0 MORE init=0 WS=0 RS=0 */
+0x60140002, /* 0010(../LIB_incl/bd_hdplx.sc:356): DRD2A: EU0=0 EU1=0 EU2=0 EU3=2 EXT init=0 WS=2 RS=2 */
+0x0c8cfc8a, /* 0014(../LIB_incl/bd_hdplx.sc:356): DRD2B1: *idx2 = EU3(); EU3(*idx2,var10) */
+0xd8988240, /* 0018(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx1 = idx1; idx1 > var9; idx1 += inc0 */
+0xf845e011, /* 001C(../LIB_incl/bd_hdplx.sc:469): LCDEXT: idx2 = *(idx0 + var00000015); ; idx2 += inc2 */
+0xb845e00a, /* 0020(../LIB_incl/bd_hdplx.sc:472): LCD: idx3 = *(idx0 + var00000019); ; idx3 += inc1 */
+0x0bfecf90, /* 0024(../LIB_incl/bd_hdplx.sc:486): DRD1A: *idx3 = *idx2; FN=0 TFD init=31 WS=3 RS=3 */
+0x9898802d, /* 0028(../LIB_incl/bd_hdplx.sc:554): LCD: idx1 = idx1; idx1 once var0; idx1 += inc5 */
+0x64000005, /* 002C(../LIB_incl/bd_hdplx.sc:556): DRD2A: EU0=0 EU1=0 EU2=0 EU3=5 INT EXT init=0 WS=0 RS=0 */
+0x0c0cf849, /* 0030(../LIB_incl/bd_hdplx.sc:556): DRD2B1: *idx0 = EU3(); EU3(idx1,var9) */
+0x000001f8, /* 0034(:0): NOP */
+
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+0x00000000, /* alignment */
+/* Task0(TASK_PCI_TX): Start of VarTab -> 0xf0008700 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000001, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xc000ffff, /* inc[2] */
+0x00000000, /* inc[3] */
+0x60000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task1(TASK_PCI_RX): Start of VarTab -> 0xf0008780 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xc000ffff, /* inc[2] */
+0x00000000, /* inc[3] */
+0x00000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task2(TASK_FEC_TX): Start of VarTab -> 0xf0008800 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x0c000000, /* var[13] */
+0x40000000, /* var[14] */
+0x7fff7fff, /* var[15] */
+0x00000000, /* var[16] */
+0x00000003, /* var[17] */
+0x40000004, /* var[18] */
+0x43ffffff, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa0000008, /* inc[3] */
+0x20000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task3(TASK_FEC_RX): Start of VarTab -> 0xf0008880 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x00000003, /* var[12] */
+0x40000008, /* var[13] */
+0x43ffffff, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa0000008, /* inc[3] */
+0x20000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task4(TASK_LPC): Start of VarTab -> 0xf0008900 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000008, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task5(TASK_ATA): Start of VarTab -> 0xf0008980 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa000000c, /* inc[3] */
+0x20000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task6(TASK_CRC16_DP_0): Start of VarTab -> 0xf0008a00 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000001, /* var[8] */
+0x00000008, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task7(TASK_CRC16_DP_1): Start of VarTab -> 0xf0008a80 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000001, /* var[8] */
+0x00000008, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task8(TASK_GEN_DP_0): Start of VarTab -> 0xf0008b00 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000008, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task9(TASK_GEN_DP_1): Start of VarTab -> 0xf0008b80 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000008, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task10(TASK_GEN_DP_2): Start of VarTab -> 0xf0008c00 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000008, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task11(TASK_GEN_DP_3): Start of VarTab -> 0xf0008c80 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000008, /* var[8] */
+0x00000000, /* var[9] */
+0x00000000, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0x00000000, /* inc[3] */
+0xe0000000, /* inc[4] */
+0xc000ffff, /* inc[5] */
+0x4000ffff, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task12(TASK_GEN_TX_BD): Start of VarTab -> 0xf0008d00 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x40000004, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa0000008, /* inc[3] */
+0x20000000, /* inc[4] */
+0x4000ffff, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task13(TASK_GEN_RX_BD): Start of VarTab -> 0xf0008d80 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xa0000008, /* inc[2] */
+0x20000000, /* inc[3] */
+0x00000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task14(TASK_GEN_DP_BD_0): Start of VarTab -> 0xf0008e00 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa000000c, /* inc[3] */
+0x20000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+/* Task15(TASK_GEN_DP_BD_1): Start of VarTab -> 0xf0008e80 */
+0x00000000, /* var[0] */
+0x00000000, /* var[1] */
+0x00000000, /* var[2] */
+0x00000000, /* var[3] */
+0x00000000, /* var[4] */
+0x00000000, /* var[5] */
+0x00000000, /* var[6] */
+0x00000000, /* var[7] */
+0x00000000, /* var[8] */
+0x40000000, /* var[9] */
+0x7fff7fff, /* var[10] */
+0x00000000, /* var[11] */
+0x00000000, /* var[12] */
+0x00000000, /* var[13] */
+0x00000000, /* var[14] */
+0x00000000, /* var[15] */
+0x00000000, /* var[16] */
+0x00000000, /* var[17] */
+0x00000000, /* var[18] */
+0x00000000, /* var[19] */
+0x00000000, /* var[20] */
+0x00000000, /* var[21] */
+0x00000000, /* var[22] */
+0x00000000, /* var[23] */
+0x40000000, /* inc[0] */
+0xe0000000, /* inc[1] */
+0xe0000000, /* inc[2] */
+0xa000000c, /* inc[3] */
+0x20000000, /* inc[4] */
+0x00000000, /* inc[5] */
+0x00000000, /* inc[6] */
+0x00000000, /* inc[7] */
+
+/* Task0(TASK_PCI_TX): Start of FDT -> 0xf0008f00 */
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0x00000000,
+0xa0045670, /* load_acc(), EU# 3 */
+0x80045670, /* unload_acc(), EU# 3 */
+0x21800000, /* and(), EU# 3 */
+0x21e00000, /* or(), EU# 3 */
+0x21500000, /* xor(), EU# 3 */
+0x21400000, /* andn(), EU# 3 */
+0x21500000, /* not(), EU# 3 */
+0x20400000, /* add(), EU# 3 */
+0x20500000, /* sub(), EU# 3 */
+0x20800000, /* lsh(), EU# 3 */
+0x20a00000, /* rsh(), EU# 3 */
+0xc0170000, /* crc8(), EU# 3 */
+0xc0145670, /* crc16(), EU# 3 */
+0xc0345670, /* crc32(), EU# 3 */
+0xa0076540, /* endian32(), EU# 3 */
+0xa0000760, /* endian16(), EU# 3 */
+
+/* Task0(TASK_PCI_TX): Start of CSave -> 0xf0009000 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task1(TASK_PCI_RX): Start of CSave -> 0xf0009050 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task2(TASK_FEC_TX): Start of CSave -> 0xf00090a0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task3(TASK_FEC_RX): Start of CSave -> 0xf00090f0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task4(TASK_LPC): Start of CSave -> 0xf0009140 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task5(TASK_ATA): Start of CSave -> 0xf0009190 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task6(TASK_CRC16_DP_0): Start of CSave -> 0xf00091e0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task7(TASK_CRC16_DP_1): Start of CSave -> 0xf0009230 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task8(TASK_GEN_DP_0): Start of CSave -> 0xf0009280 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task9(TASK_GEN_DP_1): Start of CSave -> 0xf00092d0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task10(TASK_GEN_DP_2): Start of CSave -> 0xf0009320 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task11(TASK_GEN_DP_3): Start of CSave -> 0xf0009370 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task12(TASK_GEN_TX_BD): Start of CSave -> 0xf00093c0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task13(TASK_GEN_RX_BD): Start of CSave -> 0xf0009410 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task14(TASK_GEN_DP_BD_0): Start of CSave -> 0xf0009460 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Task15(TASK_GEN_DP_BD_1): Start of CSave -> 0xf00094b0 */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+0x00000000, /* reserve */
+/* Start of free code space -> f0009500 */
+
+};
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/mgt5200.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/mgt5200.h
new file mode 100644
index 0000000000..c23a9268fd
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/mgt5200.h
@@ -0,0 +1,67 @@
+#ifndef __MGT5200_MGT5200_H
+#define __MGT5200_MGT5200_H
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+#define MBAR_CS 0x0000
+#define MBAR_SDRAM 0x0100
+#define MBAR_CDM 0x0200
+#define MBAR_LPC 0x0300
+#define MBAR_SCTMR 0x0400
+#define MBAR_INT_CTRL 0x0500
+#define MBAR_GPTIMER 0x0600
+#define MBAR_SLTIMER 0x0700
+#define MBAR_RTCLOCK 0x0800
+#define MBAR_MSCAN 0x0900
+#define MBAR_GPIO_STD 0x0B00
+#define MBAR_GPIO_WKUP 0x0C00
+#define MBAR_XCPCI 0x0D00
+#define MBAR_SPI 0x0F00
+#define MBAR_USB 0x1000
+#define MBAR_SDMA 0x1200
+#define MBAR_BDLC 0x1300
+#define MBAR_IR 0x1400
+#define MBAR_XLB_ARB 0x1F00
+#define MBAR_PSC1 0x2000
+#define MBAR_PSC2 0x2200
+#define MBAR_PSC3 0x2400
+#define MBAR_PSC4 0x2600
+#define MBAR_PSC5 0x2800
+#define MBAR_PSC6 0x2C00
+#define MBAR_IRDA 0x2C00
+#define MBAR_ETHERNET 0x3000
+#define MBAR_SCPCI 0x3800
+#define MBAR_ATA 0x3A00
+#define MBAR_SCLPC 0x3C00
+#define MBAR_I2C 0x3D00
+#define MBAR_SRAM 0x8000
+
+#endif /* __MGT5200_MGT5200_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/sdma.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/sdma.h
new file mode 100644
index 0000000000..2412160cca
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/include/mgt5200/sdma.h
@@ -0,0 +1,159 @@
+#ifndef __MGT5200_SDMA_H
+#define __MGT5200_SDMA_H
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+typedef struct sdma_register_set {
+ volatile uint32 taskBar; /* MBAR_SDMA + 0x00 sdTpb */
+ volatile uint32 currentPointer; /* MBAR_SDMA + 0x04 sdMdeComplex */
+ volatile uint32 endPointer; /* MBAR_SDMA + 0x08 sdMdeComplex */
+ volatile uint32 variablePointer; /* MBAR_SDMA + 0x0c sdMdeComplex */
+
+ volatile uint8 IntVect1; /* MBAR_SDMA + 0x10 sdPtd */
+ volatile uint8 IntVect2; /* MBAR_SDMA + 0x11 sdPtd */
+ volatile uint16 PtdCntrl; /* MBAR_SDMA + 0x12 sdPtd */
+
+ volatile uint32 IntPend; /* MBAR_SDMA + 0x14 sdPtd */
+ volatile uint32 IntMask; /* MBAR_SDMA + 0x18 sdPtd */
+
+ volatile uint32 TCR01; /* MBAR_SDMA + 0x1c sdPtd */
+ volatile uint32 TCR23; /* MBAR_SDMA + 0x20 sdPtd */
+ volatile uint32 TCR45; /* MBAR_SDMA + 0x24 sdPtd */
+ volatile uint32 TCR67; /* MBAR_SDMA + 0x28 sdPtd */
+ volatile uint32 TCR89; /* MBAR_SDMA + 0x2c sdPtd */
+ volatile uint32 TCRAB; /* MBAR_SDMA + 0x30 sdPtd */
+ volatile uint32 TCRCD; /* MBAR_SDMA + 0x34 sdPtd */
+ volatile uint32 TCREF; /* MBAR_SDMA + 0x38 sdPtd */
+
+ volatile uint8 IPR0; /* MBAR_SDMA + 0x3c sdPtd */
+ volatile uint8 IPR1; /* MBAR_SDMA + 0x3d sdPtd */
+ volatile uint8 IPR2; /* MBAR_SDMA + 0x3e sdPtd */
+ volatile uint8 IPR3; /* MBAR_SDMA + 0x3f sdPtd */
+ volatile uint8 IPR4; /* MBAR_SDMA + 0x40 sdPtd */
+ volatile uint8 IPR5; /* MBAR_SDMA + 0x41 sdPtd */
+ volatile uint8 IPR6; /* MBAR_SDMA + 0x42 sdPtd */
+ volatile uint8 IPR7; /* MBAR_SDMA + 0x43 sdPtd */
+ volatile uint8 IPR8; /* MBAR_SDMA + 0x44 sdPtd */
+ volatile uint8 IPR9; /* MBAR_SDMA + 0x45 sdPtd */
+ volatile uint8 IPR10; /* MBAR_SDMA + 0x46 sdPtd */
+ volatile uint8 IPR11; /* MBAR_SDMA + 0x47 sdPtd */
+ volatile uint8 IPR12; /* MBAR_SDMA + 0x48 sdPtd */
+ volatile uint8 IPR13; /* MBAR_SDMA + 0x49 sdPtd */
+ volatile uint8 IPR14; /* MBAR_SDMA + 0x4a sdPtd */
+ volatile uint8 IPR15; /* MBAR_SDMA + 0x4b sdPtd */
+ volatile uint8 IPR16; /* MBAR_SDMA + 0x4c sdPtd */
+ volatile uint8 IPR17; /* MBAR_SDMA + 0x4d sdPtd */
+ volatile uint8 IPR18; /* MBAR_SDMA + 0x4e sdPtd */
+ volatile uint8 IPR19; /* MBAR_SDMA + 0x4f sdPtd */
+ volatile uint8 IPR20; /* MBAR_SDMA + 0x50 sdPtd */
+ volatile uint8 IPR21; /* MBAR_SDMA + 0x51 sdPtd */
+ volatile uint8 IPR22; /* MBAR_SDMA + 0x52 sdPtd */
+ volatile uint8 IPR23; /* MBAR_SDMA + 0x53 sdPtd */
+ volatile uint8 IPR24; /* MBAR_SDMA + 0x54 sdPtd */
+ volatile uint8 IPR25; /* MBAR_SDMA + 0x55 sdPtd */
+ volatile uint8 IPR26; /* MBAR_SDMA + 0x56 sdPtd */
+ volatile uint8 IPR27; /* MBAR_SDMA + 0x57 sdPtd */
+ volatile uint8 IPR28; /* MBAR_SDMA + 0x58 sdPtd */
+ volatile uint8 IPR29; /* MBAR_SDMA + 0x59 sdPtd */
+ volatile uint8 IPR30; /* MBAR_SDMA + 0x5a sdPtd */
+ volatile uint8 IPR31; /* MBAR_SDMA + 0x5b sdPtd */
+
+ volatile uint32 cReqSelect; /* MBAR_SDMA + 0x5c sdPtd */
+ volatile uint32 taskSize0; /* MBAR_SDMA + 0x60 sdPtd */
+ volatile uint32 taskSize1; /* MBAR_SDMA + 0x64 sdPtd */
+ volatile uint32 MDEDebug; /* MBAR_SDMA + 0x68 sdMdeComplex */
+ volatile uint32 ADSDebug; /* MBAR_SDMA + 0x6c sdAdsTop */
+ volatile uint32 Value1; /* MBAR_SDMA + 0x70 sdDbg */
+ volatile uint32 Value2; /* MBAR_SDMA + 0x74 sdDbg */
+ volatile uint32 Control; /* MBAR_SDMA + 0x78 sdDbg */
+ volatile uint32 Status; /* MBAR_SDMA + 0x7c sdDbg */
+ volatile uint32 PTDDebug; /* MBAR_SDMA + 0x80 sdPtd */
+} sdma_regs;
+
+#define SDMA_PTDCNTRL_TI 0x8000
+#define SDMA_PTDCNTRL_TEA 0x4000
+#define SDMA_PTDCNTRL_HE 0x2000
+#define SDMA_PTDCNTRL_PE 0x0001
+
+#define SDMA_CREQSELECT_REQ31_MASK (~0xC0000000UL)
+#define SDMA_CREQSELECT_REQ30_MASK (~0x30000000UL)
+#define SDMA_CREQSELECT_REQ29_MASK (~0x0C000000UL)
+#define SDMA_CREQSELECT_REQ28_MASK (~0x03000000UL)
+#define SDMA_CREQSELECT_REQ27_MASK (~0x00C00000UL)
+#define SDMA_CREQSELECT_REQ26_MASK (~0x00300000UL)
+#define SDMA_CREQSELECT_REQ25_MASK (~0x000C0000UL)
+#define SDMA_CREQSELECT_REQ24_MASK (~0x00030000UL)
+#define SDMA_CREQSELECT_REQ23_MASK (~0x0000C000UL)
+#define SDMA_CREQSELECT_REQ22_MASK (~0x00003000UL)
+#define SDMA_CREQSELECT_REQ21_MASK (~0x00000C00UL)
+#define SDMA_CREQSELECT_REQ20_MASK (~0x00000300UL)
+#define SDMA_CREQSELECT_REQ19_MASK (~0x000000C0UL)
+#define SDMA_CREQSELECT_REQ18_MASK (~0x00000030UL)
+#define SDMA_CREQSELECT_REQ17_MASK (~0x0000000CUL)
+#define SDMA_CREQSELECT_REQ16_MASK (~0x00000003UL)
+
+#define SDMA_CREQSELECT_REQ31_ALWAYS31 0xC0000000UL
+#define SDMA_CREQSELECT_REQ30_ALWAYS30 0x30000000UL
+#define SDMA_CREQSELECT_REQ29_ALWAYS29 0x0C000000UL
+#define SDMA_CREQSELECT_REQ28_ALWAYS28 0x03000000UL
+#define SDMA_CREQSELECT_REQ27_ALWAYS27 0x00C00000UL
+#define SDMA_CREQSELECT_REQ26_ALWAYS26 0x00300000UL
+#define SDMA_CREQSELECT_REQ25_ALWAYS25 0x000C0000UL
+#define SDMA_CREQSELECT_REQ24_ALWAYS24 0x00030000UL
+#define SDMA_CREQSELECT_REQ23_ALWAYS23 0x0000C000UL
+#define SDMA_CREQSELECT_REQ22_ALWAYS22 0x00003000UL
+#define SDMA_CREQSELECT_REQ21_ALWAYS21 0x00000C00UL
+#define SDMA_CREQSELECT_REQ20_ALWAYS20 0x00000300UL
+#define SDMA_CREQSELECT_REQ19_ALWAYS19 0x000000C0UL
+#define SDMA_CREQSELECT_REQ18_ALWAYS18 0x00000030UL
+#define SDMA_CREQSELECT_REQ17_ALWAYS17 0x0000000CUL
+#define SDMA_CREQSELECT_REQ16_ALWAYS16 0x00000003UL
+
+#define SDMA_CREQSELECT_REQ31_SCTIMER7 0x00000000UL
+#define SDMA_CREQSELECT_REQ30_SCTIMER6 0x00000000UL
+#define SDMA_CREQSELECT_REQ29_SCTIMER5 0x00000000UL
+#define SDMA_CREQSELECT_REQ28_SCTIMER4 0x00000000UL
+#define SDMA_CREQSELECT_REQ27_SCTIMER3 0x00000000UL
+#define SDMA_CREQSELECT_REQ26_PSC6_TX 0x00000000UL
+#define SDMA_CREQSELECT_REQ25_PSC6_RX 0x00000000UL
+#define SDMA_CREQSELECT_REQ24_I2C1_TX 0x00000000UL
+#define SDMA_CREQSELECT_REQ23_I2C1_RX 0x00000000UL
+#define SDMA_CREQSELECT_REQ22_I2C2_TX 0x00000000UL
+#define SDMA_CREQSELECT_REQ21_I2C2_RX 0x00000000UL
+#define SDMA_CREQSELECT_REQ20_PSC4_TX 0x00000000UL
+#define SDMA_CREQSELECT_REQ19_PSC4_RX 0x00000000UL
+#define SDMA_CREQSELECT_REQ18_PSC5_TX 0x00000000UL
+#define SDMA_CREQSELECT_REQ17_PSC5_RX 0x00000000UL
+#define SDMA_CREQSELECT_REQ16_LP 0x00000000UL
+
+#define SDMA_CREQSELECT_ALWAYS30 0xC0000000UL
+
+#endif /* __MGT5200_SDMA_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c
new file mode 100644
index 0000000000..839ade604d
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/load_task.c
@@ -0,0 +1,92 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+#ifdef MPC5200_BAPI_LIBC_HEADERS
+#include <string.h>
+#endif
+
+#include "../bestcomm/include/ppctypes.h"
+#include "../bestcomm/include/mgt5200/sdma.h"
+#include "../bestcomm/include/mgt5200/mgt5200.h"
+
+#include "../bestcomm/dma_image.h"
+#include "../bestcomm/bestcomm_api.h"
+
+#ifdef __MWERKS__
+__declspec(section ".text") extern const uint32 taskTable;
+__declspec(section ".text") extern const uint32 taskTableBytes;
+__declspec(section ".text") extern const uint32 taskTableTasks;
+__declspec(section ".text") extern const uint32 offsetEntry;
+#else
+extern const uint32 taskTable;
+extern const uint32 taskTableBytes;
+extern const uint32 taskTableTasks;
+extern const uint32 offsetEntry;
+#endif
+
+typedef struct SCTDT {
+ uint32 start;
+ uint32 stop;
+ uint32 var;
+ uint32 fdt;
+ uint32 rsvd1;
+ uint32 rsvd2;
+ uint32 context;
+ uint32 litbase;
+} SCTDT_T;
+
+
+/*!
+ * \brief Load BestComm tasks into SRAM.
+ * \param sdma Base address of the BestComm register set
+ *
+ * The BestComm tasks must be loaded before any task can be setup,
+ * enabled, etc. This might be called as part of a boot sequence before
+ * any BestComm drivers are required.
+ */
+void TasksLoadImage(sdma_regs *sdma)
+{
+ uint32 i;
+ SCTDT_T *tt;
+
+ /* copy task table from source to destination */
+ memcpy((void *)((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal), (void *) &taskTable, (unsigned long) taskTableBytes);
+ /* adjust addresses in task table */
+ for (i=0; i < (uint32) taskTableTasks; i++) {
+ tt = (SCTDT_T *)(((uint8 *)(sdma->taskBar) - MBarPhysOffsetGlobal) + (uint32) offsetEntry + (i * sizeof (SCTDT_T)));
+ tt->start += sdma->taskBar;
+ tt->stop += sdma->taskBar;
+ tt->var += sdma->taskBar;
+ tt->fdt = (sdma->taskBar & 0xFFFFFF00) + tt->fdt;
+ tt->context += sdma->taskBar;
+ }
+
+ SramOffsetGlobal = taskTableBytes;
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_api_mem.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_api_mem.h
new file mode 100644
index 0000000000..3865780d90
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_api_mem.h
@@ -0,0 +1,73 @@
+#ifndef __TASK_API_BESTCOMM_API_MEM_H
+#define __TASK_API_BESTCOMM_API_MEM_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+#include "../include/mgt5200/mgt5200.h"
+
+/*
+ * An extern global variable is used here for the MBAR since it must
+ * be passed into the API for processes that use virtual memory.
+ */
+extern uint8 *MBarGlobal;
+
+#define SDMA_TASK_BAR (MBarGlobal+MBAR_SDMA+0x000)
+#define SDMA_INT_PEND (MBarGlobal+MBAR_SDMA+0x014)
+#define SDMA_INT_MASK (MBarGlobal+MBAR_SDMA+0x018)
+#define SDMA_TCR (MBarGlobal+MBAR_SDMA+0x01C)
+#define SDMA_TASK_SIZE (MBarGlobal+MBAR_SDMA+0x060)
+
+#define PCI_TX_PKT_SIZE (MBarGlobal+MBAR_SCPCI+0x000)
+#define PCI_TX_NTBIT (MBarGlobal+MBAR_SCPCI+0x01C)
+#define PCI_TX_FIFO (MBarGlobal+MBAR_SCPCI+0x040)
+#define PCI_TX_FIFO_STAT (MBarGlobal+MBAR_SCPCI+0x045)
+#define PCI_TX_FIFO_GRAN (MBarGlobal+MBAR_SCPCI+0x048)
+#define PCI_TX_FIFO_ALARM (MBarGlobal+MBAR_SCPCI+0x04E)
+
+#define PCI_RX_PKT_SIZE (MBarGlobal+MBAR_SCPCI+0x080)
+#define PCI_RX_NTBIT (MBarGlobal+MBAR_SCPCI+0x09C)
+#define PCI_RX_FIFO (MBarGlobal+MBAR_SCPCI+0x0C0)
+#define PCI_RX_FIFO_STAT (MBarGlobal+MBAR_SCPCI+0x0C5)
+#define PCI_RX_FIFO_GRAN (MBarGlobal+MBAR_SCPCI+0x0C8)
+#define PCI_RX_FIFO_ALARM (MBarGlobal+MBAR_SCPCI+0x0CE)
+
+
+#define FEC_RX_FIFO (MBarGlobal+MBAR_ETHERNET+0x184)
+#define FEC_RX_FIFO_STAT (MBarGlobal+MBAR_ETHERNET+0x188)
+#define FEC_RX_FIFO_GRAN (MBarGlobal+MBAR_ETHERNET+0x18C)
+#define FEC_RX_FIFO_ALARM (MBarGlobal+MBAR_ETHERNET+0x198)
+
+#define FEC_TX_FIFO (MBarGlobal+MBAR_ETHERNET+0x1A4)
+#define FEC_TX_FIFO_STAT (MBarGlobal+MBAR_ETHERNET+0x1A8)
+#define FEC_TX_FIFO_GRAN (MBarGlobal+MBAR_ETHERNET+0x1AC)
+#define FEC_TX_FIFO_ALARM (MBarGlobal+MBAR_ETHERNET+0x1B8)
+
+#endif /* __TASK_API_BESTCOMM_API_MEM_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h
new file mode 100644
index 0000000000..9aeba6f758
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/bestcomm_cntrl.h
@@ -0,0 +1,280 @@
+#ifndef __TASK_API_BESTCOMM_CNTRL_H
+#define __TASK_API_BESTCOMM_CNTRL_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*******************************************************************************
+ * Defines to control SmartDMA and its tasks. These defines are used for the
+ * task build process to minimize disconnects at the task/driver interface.
+ ******************************************************************************/
+
+#define SDMA_INT_BIT_DBG 31 /* debug interrupt bit */
+#define SDMA_INT_BIT_TEA 28 /* TEA interrupt bit */
+#define SDMA_INT_BIT_TEA_TASK 24 /* lsb for TEA task number */
+#define SDMA_INT_BIT_IMPL 0x9000FFFF
+
+#define SDMA_PTDCTRL_BIT_TEA 14 /* TEA detection enable bit */
+
+#define SDMA_TCR_BIT_AUTO 15 /* auto start bit */
+#define SDMA_TCR_BIT_HOLD 5 /* hold initiator bit */
+
+#define SDMA_STAT_BIT_ALARM 17
+#define SDMA_FIFO_ALARM_MASK 0x0020000
+
+#define SDMA_DRD_BIT_TFD 27 /* mark last buffer of frame */
+#define SDMA_DRD_BIT_INT 26 /* interrupt after buffer processed */
+#define SDMA_DRD_BIT_INIT 21 /* lsb position of initiator */
+#define SDMA_DRD_MASK_FLAGS 0x0C000000 /* BD_FLAGS flag bits */
+#define SDMA_DRD_MASK_LENGTH 0x03FFFFFF /* BD_FLAGS length mask */
+#define SDMA_BD_BIT_READY 30 /* Status BD ready bit */
+#ifdef SAS_COMPILE
+ #define SDMA_BD_MASK_READY constant(1<<SDMA_BD_BIT_READY)
+#else
+ #define SDMA_BD_MASK_READY (1<<SDMA_BD_BIT_READY)
+#endif
+#define SDMA_BD_MASK_SIGN 0x7FFFFFFF /* task code needs Status>0 */
+
+#define SDMA_PRAGMA_BIT_RSV 7 /* reserved pragma bit */
+#define SDMA_PRAGMA_BIT_PRECISE_INC 6 /* increment 0=when possible, 1=iter end */
+#define SDMA_PRAGMA_BIT_RST_ERROR_NO 5 /* don't reset errors on task enable */
+#define SDMA_PRAGMA_BIT_PACK 4 /* pack data enable */
+#define SDMA_PRAGMA_BIT_INTEGER 3 /* data alignment 0=frac(msb), 1=int(lsb) */
+#define SDMA_PRAGMA_BIT_SPECREAD 2 /* XLB speculative read enable */
+#define SDMA_PRAGMA_BIT_CW 1 /* write line buffer enable */
+#define SDMA_PRAGMA_BIT_RL 0 /* read line buffer enable */
+
+#define SDMA_TASK_ENTRY_BYTES 32 /* Bytes per task in entry table */
+#define SDMA_TASK_GROUP_NUM 16 /* Number of tasks per task group */
+#define SDMA_TASK_GROUP_BYTES (SDMA_TASK_ENTRY_BYTES*SDMA_TASK_GROUP_NUM)
+
+
+/*******************************************************************************
+ * Task group control macros, use when TaskNum > 15
+ ******************************************************************************/
+#define SDMA_TASKNUM_EXT(OldTaskNum) (OldTaskNum%16)
+
+#define SDMA_TASKBAR_CHANGE(sdma, OldTaskNum) { \
+ sdma->taskBar += (((int)(OldTaskNum/SDMA_TASK_GROUP_NUM))*SDMA_TASK_GROUP_BYTES); \
+}
+
+#define SDMA_TASKBAR_RESTORE(sdma, OldTaskNum) { \
+ sdma->taskBar -= (((int)(OldTaskNum/SDMA_TASK_GROUP_NUM))*SDMA_TASK_GROUP_BYTES); \
+}
+
+
+/*******************************************************************************
+ * Task control macros
+ ******************************************************************************/
+#define SDMA_TASK_CFG(RegAddr, TaskNum, AutoStart, AutoStartNum) { \
+ *(((uint16 *)RegAddr)+TaskNum) = (uint16)(0x0000 | \
+ ((AutoStart!=0)<<7) | \
+ (AutoStartNum&0xF) ); \
+}
+
+#define SDMA_TASK_AUTO_START(RegAddr, TaskNum, AutoStart, AutoStartNum) { \
+ *(((uint16 *)RegAddr)+TaskNum) = (uint16)((*(((uint16 *)RegAddr)+TaskNum) & \
+ (uint16) 0xff30) | ((uint16)(0x0000 | \
+ ((AutoStart!=0)<<7) | \
+ (AutoStartNum&0xF)) )); \
+}
+
+#define SDMA_TASK_ENABLE(RegAddr, TaskNum) { \
+ *(((uint16 *)RegAddr)+TaskNum) |= (uint16)0x8000; \
+}
+
+#define SDMA_TASK_DISABLE(RegAddr, TaskNum) { \
+ *(((uint16 *)RegAddr)+TaskNum) &= ~(uint16)0x8000; \
+}
+
+#define SDMA_TASK_STATUS(RegAddr, TaskNum) \
+ *(((uint16 *)RegAddr)+TaskNum)
+
+
+/*******************************************************************************
+ * Interrupt control macros
+ ******************************************************************************/
+#define SDMA_INT_ENABLE(RegAddr, Bit) { \
+ *((uint32 *)RegAddr) &= ~((uint32)(1<<Bit)); \
+}
+
+#define SDMA_INT_DISABLE(RegAddr, Bit) { \
+ *((uint32 *)(RegAddr)) |= ((uint32)(1<<Bit)); \
+}
+
+#define SDMA_INT_SOURCE(RegPend, RegMask) \
+ (*((uint32 *)(RegPend)) & (~*((uint32 *)(RegMask))) & (uint32)SDMA_INT_BIT_IMPL)
+
+#define SDMA_INT_PENDING(RegPend, RegMask) \
+ (*((uint32 *)(RegPend)) & (~*((uint32 *)(RegMask))))
+
+#define SDMA_INT_TEST(IntSource, Bit) \
+ (((uint32)IntSource) & ((uint32)(1<<Bit)))
+
+/*
+ * define SDMA_INT_FIND to get int bit rather than scan all bits use
+ * cntlzw
+ */
+
+/* Clear the IntPend bit */
+#define SDMA_CLEAR_IEVENT(RegAddr, Bit) { \
+ *((uint32 *)RegAddr) = ((uint32)(1<<Bit)); \
+}
+
+#define SDMA_GET_PENDINGBIT(sdma, Bit) \
+ (sdma->IntPend & (uint32)(1<<Bit))
+
+#define SDMA_GET_MASKBIT(sdma, Bit) \
+ (sdma->IntMask & (uint32)(1<<Bit))
+
+
+/*******************************************************************************
+ * SmartDMA FIFO control macros
+ ******************************************************************************/
+
+/*******************************************************************************
+ * SmartDMA TEA detection control macros
+ ******************************************************************************/
+/* Enable SmartDMA TEA detection and TEA interrupt */
+#define SDMA_TEA_ENABLE(sdma) { \
+ SDMA_INT_ENABLE(sdma, SDMA_INT_BIT_TEA); \
+ sdma->PtdCntrl &= ~((uint32)(1<<SDMA_PTDCTRL_BIT_TEA)); \
+}
+
+/* Disable SmartDMA TEA detection and TEA interrupt */
+#define SDMA_TEA_DISABLE(sdma) { \
+ SDMA_INT_DISABLE(sdma, SDMA_INT_BIT_TEA); \
+ sdma->PtdCntrl |= ((uint32)(1<<SDMA_PTDCTRL_BIT_TEA)); \
+}
+
+/* Clear the TEA interrupt */
+#define SDMA_TEA_CLEAR(sdma) { \
+ sdma->IntPend = ((uint32)(0x1F<<SDMA_INT_BIT_TEA_TASK)); \
+}
+
+/* Determine which task caused a TEA on the XLB */
+#define SDMA_TEA_SOURCE(RegPend) \
+ (uint32)(((*(uint32 *)RegPend)>>SDMA_INT_BIT_TEA_TASK) & 0xF)
+
+
+/*******************************************************************************
+ * SmartDMA debug control macros
+ ******************************************************************************/
+/* Enable the SmartDMA debug unit and DBG interrupt */
+/* add sdma->dbg_regs setup? */
+#define SDMA_DBG_ENABLE(sdma) { \
+ SDMA_INT_ENABLE(sdma, SDMA_INT_BIT_DBG); \
+}
+
+#define SDMA_DBG_DISABLE(sdma) { \
+ SDMA_INT_DISABLE(sdma, SDMA_INT_BIT_DBG); \
+}
+
+/* Clear the debug interrupt */
+#define SDMA_DBG_CLEAR(sdma) { \
+ SDMA_CLEAR_IEVENT(sdma, SDMA_INT_BIT_DBG); \
+}
+
+#define SDMA_DBG_MDE(dst, sdma, addr) { \
+ sdma->MDEDebug = addr; \
+ dst = sdma->MDEDebug; \
+}
+
+#define SDMA_DBG_ADS(dst, sdma, addr) { \
+ sdma->ADSDebug = addr; \
+ dst = sdma->ADSDebug; \
+}
+
+#define SDMA_DBG_PTD(dst, sdma, addr) { \
+ sdma->PTDDebug = addr; \
+ dst = sdma->PTDDebug; \
+}
+
+
+/*******************************************************************************
+ * Initiator control macros
+ ******************************************************************************/
+
+/* This macro may not work, getting compile errors */
+/* Set the Transfer Size */
+/* Note that masking the size w/ 0x3 gives the desired value for uint32 */
+/* (expressed as 4), namely 0. */
+#define SDMA_SET_SIZE(RegAddr, TaskNum, SrcSize, DstSize) \
+ *(((uint8 *)RegAddr)+((uint32)(TaskNum/2))) = \
+ (uint8)((*(((uint8 *)RegAddr)+((uint32)(TaskNum/2))) & \
+ ((TaskNum%2) ? 0xf0 : 0x0f)) | \
+ ((uint8)(((SrcSize & 0x3)<<2) | \
+ ( DstSize & 0x3 ) ) <<(4*((int)(1-(TaskNum%2))))));
+
+/* This macro may not work */
+/* Set the Initiator in TCR */
+#define SDMA_SET_INIT(RegAddr, TaskNum, Initiator) \
+{ \
+ *(((uint16 *)RegAddr)+TaskNum) &= (uint16)0xE0FF; \
+ *(((uint16 *)RegAddr)+TaskNum) |= (((0x01F & Initiator)<<8) | \
+ (0<<SDMA_TCR_BIT_HOLD)); \
+}
+
+/* Change DRD initiator number */
+#define SDMA_INIT_CHANGE(task, oldInitiator, newInitiator) { \
+ int i; \
+ for (i=0; i<task->NumDRD; i++) { \
+ if (SDMA_INIT_READ(task->DRD[i]) == (uint32)oldInitiator) { \
+ SDMA_INIT_WRITE(task->DRD[i],newInitiator); \
+ } \
+ } \
+}
+
+/* Set the Initiator Priority */
+#define SDMA_SET_INITIATOR_PRIORITY(sdma, initiator, priority) \
+ *(((uint8 *)&sdma->IPR0)+initiator) = priority;
+
+
+/* Read DRD initiator number */
+#define SDMA_INIT_READ(PtrDRD) \
+ (((*(uint32 *)PtrDRD)>>SDMA_DRD_BIT_INIT) & (uint32)0x1F)
+
+/* Write DRD initiator number */
+#define SDMA_INIT_WRITE(PtrDRD, Initiator) { \
+ *(uint32 *)PtrDRD = ((*(uint32 *)PtrDRD) & 0xFC1FFFFF) | \
+ (Initiator<<SDMA_DRD_BIT_INIT); \
+}
+
+/* Change DRD initiator number */
+#define SDMA_INIT_CHANGE(task, oldInitiator, newInitiator) { \
+ int i; \
+ for (i=0; i<task->NumDRD; i++) { \
+ if (SDMA_INIT_READ(task->DRD[i]) == (uint32)oldInitiator) { \
+ SDMA_INIT_WRITE(task->DRD[i],newInitiator); \
+ } \
+ } \
+}
+
+#endif /* __TASK_API_BESTCOMM_CNTRL_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_bdtable.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_bdtable.h
new file mode 100644
index 0000000000..0d09f8da87
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_bdtable.h
@@ -0,0 +1,92 @@
+#ifndef __TASK_API_TASKSETUP_BDTABLE_H
+#define __TASK_API_TASKSETUP_BDTABLE_H 1
+
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*
+ * Table of BD rings for all BestComm tasks indexed by task ID.
+ *
+ * +-----+------+--------------+ +------+-------+
+ * 0: |numBD|numPtr|BDTablePtr ---|--->|status|dataPtr|
+ * +-----+------+--------------+ +------+-------+
+ * 1: |numBD|numPtr|BDTablePtr | |status|dataPtr|
+ * +-----+------+--------------+ . . .
+ * 2: |numBD|numPtr|BDTablePtr ---|-+ . . .
+ * . . . | . . .
+ * . . . | |status|dataPtr|
+ * . . . | +------+-------+
+ * 15:|numBD|numPtr|BDTablePtr | |
+ * +-----+------+--------------+ |
+ * |
+ * V
+ * +------+--------+--------+
+ * |status|dataPtr0|dataPtr1|
+ * +------+--------+--------+
+ * |status|dataPtr0|dataPtr1|
+ * . . . .
+ * . . . .
+ * . . . .
+ * |status|dataPtr0|dataPtr1|
+ * +------+--------+--------+
+ */
+typedef struct {
+ uint16 numBD; /* Size of BD ring */
+ uint8 numPtr; /* Number of data buffer pointers per BD */
+ uint8 apiConfig; /* API configuration flags */
+ void *BDTablePtr; /* Pointer to BD tables, must be cast to TaskBD1_t */
+ /* or TaskBD2_t */
+ volatile uint32
+ *BDStartPtr; /* Task's current BD pointer. This pointer is
+ * used to set a task's BD pointer upon startup.
+ * It is only valid for BD tasks and only after
+ * TaskSetup() or TaskBDReset() are called. You
+ * cannot use this to track a task's BD pointer.
+ */
+ uint16 currBDInUse; /* Current number of buffer descriptors assigned but*/
+ /* not released yet. */
+} TaskBDIdxTable_t;
+
+typedef enum {
+ API_CONFIG_NONE = 0x00,
+ API_CONFIG_BD_FLAG = 0x01
+} ApiConfig_t;
+
+/*
+ * Allocates BD table if needed and updates the BD index table.
+ * Do we want to hide this from the C API since it operates on task API?
+ */
+void TaskSetup_BDTable(volatile uint32 *BasePtr,
+ volatile uint32 *LastPtr,
+ volatile uint32 *StartPtr,
+ int TaskNum, uint32 NumBD, uint16 MaxBD,
+ uint8 NumPtr, ApiConfig_t ApiConfig, uint32 Status );
+
+#endif /* __TASK_API_TASKSETUP_BDTABLE_H */
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_general.h b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_general.h
new file mode 100644
index 0000000000..f3b29a0e78
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/task_api/tasksetup_general.h
@@ -0,0 +1,628 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+/*
+ * Task builder generates a set #defines per configured task to
+ * condition this templete file.
+ */
+
+/**********************************************************
+ *
+ * Required #defines:
+ * ------------------
+ * TASKSETUP_NAME:
+ * TaskSetup function name, set to TaskSetup_<TASK_NAME>
+ * TASK_API:
+ * task API defined in dma_image.h
+ * MAX_BD:
+ * <=0 : non-BD task
+ * else: number of BD in BD table
+ * BD_FLAG:
+ * 0 : no flag implemented for BD
+ * else: flags can be passed on a per BD basis
+ * MISALIGNED:
+ * 0 : task API supports Bytes%IncrBytes==0
+ * else: task API supports any parameter settings
+ * AUTO_START:
+ * <-1 : do not start a task after task completion
+ * -1 : auto start the task after task completion
+ * <MAX_TASKS: auto start task with the TaskID = AUTO_START
+ * else : do not start a task after task completion
+ * INITIATOR_DATA:
+ * <0 : runtime configurable
+ * else: assume INITATOR_DATA equal hard-coded task initiator
+ * TYPE_SRC: (needs to be consistent with Task API)
+ * FLEX_T : Task API TYPE_SRC = flex, SzSrc defines size
+ * UINT8_T : Task API TYPE_SRC = char
+ * UINT16_T: Task API TASK_SRC = short
+ * UINT32_T: Task API TASK_SRC = int
+ * INCR_TYPE_SRC:
+ * 0 : FIFO address, do not implement data pointer
+ * 1 : automatic, set INCR_SRC based on SzSrc parameter
+ * 2 : runtime, set INCR_SRC to IncrSrc parameter
+ * else: used hard-coded INCR_SRC
+ * INCR_SRC:
+ * INCR_TYPE_SRC=0: force INCR_SRC=0
+ * else : use for src pointer increment
+ * TYPE_DST: (needs to be consistent with Task API)
+ * FLEX_T : Task API TYPE_DST = flex, SzDst defines size
+ * UINT8_T : Task API TYPE_DST = char
+ * UINT16_T: Task API TASK_DST = short
+ * UINT32_T: Task API TASK_DST = int
+ * INCR_TYPE_DST:
+ * 0 : FIFO address, do not implement data pointer
+ * 1 : automatic, set INCR_DST based on SzDst parameter
+ * 2 : runtime, set INCR_DST to IncrDst parameter
+ * else: used hard-coded INCR_DST
+ * INCR_DST:
+ * INCR_TYPE_DST=0: force INCR_DST=0
+ * else : use for dst pointer increment
+ * PRECISE_INCREMENT:
+ * 0 : increment when possible
+ * else: increment at end of iteration
+ * NO_ERROR_RESET:
+ * 0 : reset error flags on task enable
+ * else: leave error flags unmodified on task enable
+ * PACK_DATA:
+ * 0 : do not pack data
+ * else: pack data based on data type
+ * INTEGER_MODE:
+ * 0 : type conversions handle as fixed point numbers
+ * else: type conversions handle as integers
+ * WRITE_LINE_BUFFER:
+ * 0 : do not use write line buffers
+ * else: enable write line buffers
+ * READ_LINE_BUFFER:
+ * 0 : do not use read line buffers
+ * else: enable read line buffers
+ * SPEC_READS:
+ * 0 : do not speculatively read
+ * else: speculatively read data ahead of DMA engine
+ *
+ * Optional #defines:
+ * ------------------
+ * MAX_TASKS:
+ * 1 : #define MAX_TASKS>0
+ * else: 16
+ * ITERATIONS:
+ * 1 : #define ITERATIONS>0
+ * else: 1
+ * INCR_BYTES:
+ * This macro is defined based on following priority:
+ * 1 : INCR_SRC != 0
+ * 2 : DST_TYPE != 0
+ * 3 : #defined INCR_BYTES<0
+ * else: -4 (SZ_UINT32)
+ * DEBUG_BESTCOMM_API:
+ * >0 : print basic debug messages
+ * >=10: also print C-API interface variables
+ * >=20: also print task API interface variables
+ * else: do nothing
+ *
+ **********************************************************/
+
+#ifdef MPC5200_BAPI_LIBC_HEADERS
+#include <stdlib.h>
+#endif
+
+#include "../dma_image.h"
+
+#include "../bestcomm_api.h"
+#include "tasksetup_bdtable.h"
+
+#include "bestcomm_api_mem.h"
+#include "bestcomm_cntrl.h"
+
+#ifndef DEBUG_BESTCOMM_API
+ #define DEBUG_BESTCOMM_API 0
+#endif
+
+#ifdef FLEX_T
+ #undef FLEX_T
+#endif
+#define FLEX_T SZ_FLEX
+
+#ifdef UINT8_T
+ #undef UINT8_T
+#endif
+#define UINT8_T SZ_UINT8
+
+#ifdef UINT16_T
+ #undef UINT16_T
+#endif
+#define UINT16_T SZ_UINT16
+
+#ifdef UINT32_T
+ #undef UINT32_T
+#endif
+#define UINT32_T SZ_UINT32
+
+#if (INCR_TYPE_SRC==0) /* FIFO address, no data pointer */
+ #undef INCR_SRC
+ #define INCR_SRC 0
+#endif
+
+#if (INCR_TYPE_DST==0) /* FIFO address, no data pointer */
+ #undef INCR_DST
+ #define INCR_DST 0
+#endif
+
+#ifndef MAX_TASKS
+ #define MAX_TASKS 16
+#else
+ #if (MAX_TASKS<=0)
+ #undef MAX_TASKS
+ #define MAX_TASKS 16
+ #endif
+#endif
+
+#ifndef ITERATIONS
+ #define ITERATIONS 1
+#else
+ #if (ITERATIONS<=0)
+ #undef ITERATIONS
+ #define ITERATIONS 1
+ #endif
+#endif
+
+#ifndef INCR_BYTES
+ #define INCR_BYTES -4
+#else
+ #if (INCR_BYTES>=0)
+ #undef INCR_BYTES
+ #define INCR_BYTES -4
+ #endif
+#endif
+
+/*
+ * These ifndefs will go away when support in task_capi wrappers
+ * in the image directories
+ */
+#ifndef PRECISE_INCREMENT
+ #define PRECISE_INCREMENT 0 /* bit=6 SAS->1, increment 0=when possible, 1=at the end of interation */
+#endif
+#ifndef NO_ERROR_RESET
+ #define NO_ERROR_RESET 0 /* bit=5 SAS->0, do not reset error codes on task enable */
+#endif
+#ifndef PACK_DATA
+ #define PACK_DATA 0 /* bit=4 SAS->0, pack data enable */
+#endif
+#ifndef INTEGER_MODE
+ #define INTEGER_MODE 0 /* bit=3 SAS->0, 0=fractional(msb aligned), 1=integer(lsb aligned) */
+#endif
+#ifndef SPEC_READS
+ #define SPEC_READS 1 /* bit=2 SAS->0, XLB speculative read enable */
+#endif
+#ifndef WRITE_LINE_BUFFER
+ #define WRITE_LINE_BUFFER 1 /* bit=1 SAS->0, write line buffer enable */
+#endif
+#ifndef READ_LINE_BUFFER
+ #define READ_LINE_BUFFER 1 /* bit=0 SAS->0, read line buffer enable */
+#endif
+#define SDMA_PRAGMA (0 <<SDMA_PRAGMA_BIT_RSV ) | \
+ (PRECISE_INCREMENT<<SDMA_PRAGMA_BIT_PRECISE_INC ) | \
+ (NO_ERROR_RESET <<SDMA_PRAGMA_BIT_RST_ERROR_NO) | \
+ (PACK_DATA <<SDMA_PRAGMA_BIT_PACK ) | \
+ (INTEGER_MODE <<SDMA_PRAGMA_BIT_INTEGER ) | \
+ (SPEC_READS <<SDMA_PRAGMA_BIT_SPECREAD ) | \
+ (WRITE_LINE_BUFFER<<SDMA_PRAGMA_BIT_CW ) | \
+ (READ_LINE_BUFFER <<SDMA_PRAGMA_BIT_RL )
+
+#ifndef TASKSETUP_NAME
+ #define PREPEND_TASKSETUP(name) TaskSetup_ ## name
+ #define FUNC_PREPEND_TASKSETUP(name) PREPEND_TASKSETUP(name)
+ #define TASKSETUP_NAME FUNC_PREPEND_TASKSETUP(TASK_BASE)
+#endif
+
+#ifndef TASK_API
+ #define APPEND_API(name) name ## _api_t
+ #define FUNC_APPEND_API(name) APPEND_API(name)
+ #define TASK_API FUNC_APPEND_API(TASK_BASE)
+#endif
+
+#ifndef INIT_DMA_IMAGE
+ #define PREPEND_INITDMA(name) init_dma_image_ ## name
+ #define FUNC_PREPEND_INITDMA(name) PREPEND_INITDMA(name)
+ #define INIT_DMA_IMAGE FUNC_PREPEND_INITDMA(TASK_BASE)
+#endif
+
+#define DRD_INIT_MASK 0xfc1fffff
+#define DRD_EXT_FLAG 0x40000000
+#define DRD_INIT_OFFSET 21
+
+TaskId TASKSETUP_NAME(TASK_API *TaskAPI,
+ TaskSetupParamSet_t *TaskSetupParams)
+{
+ TaskId TaskNum;
+ uint32 Status = 0;
+#if ((INCR_TYPE_SRC!=0)||(INCR_TYPE_DST!=0)||(DEBUG_BESTCOMM_API>0))
+ uint8 NumPtr = 0;
+#endif
+#if (INITIATOR_DATA<0) /* runtime configurable */
+ uint32 i, ext;
+#endif
+
+ INIT_DMA_IMAGE((uint8 *)(((sdma_regs *)(SDMA_TASK_BAR))->taskBar), MBarPhysOffsetGlobal);
+
+ TaskNum = (TaskId)SDMA_TASKNUM_EXT(TaskAPI->TaskNum);
+
+ TaskRunning[TaskNum] = 0;
+
+#if (DEBUG_BESTCOMM_API>0)
+ printf("\nBestComm API Debug Display Mode Enabled\n\n");
+ printf("TaskSetup: TaskID=%d\n", TaskNum);
+ if (Status!=0) {
+ printf("TaskSetup: Rx task\n");
+ } else {
+ printf("TaskSetup: Tx or DP task\n");
+ }
+#endif
+
+ /* Set the task pragma settings */
+ *(TaskAPI->TaskPragma)= (uint8) SDMA_PRAGMA;
+
+#if (MAX_BD>0) /* Buffer Descriptors */
+
+ #if (INCR_TYPE_SRC!=0)
+ ++NumPtr;
+ #endif
+ #if (INCR_TYPE_DST!=0)
+ ++NumPtr;
+ #endif
+
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Using %d buffer descriptors, each with %d data pointers\n", MAX_BD, NumPtr);
+ #endif
+
+ /* Allocate BD table SRAM storage,
+ * and pass addresses to task API */
+
+ TaskSetup_BDTable(TaskAPI->BDTableBase,
+ TaskAPI->BDTableLast,
+ TaskAPI->BDTableStart,
+ TaskNum,
+ TaskSetupParams->NumBD,
+ MAX_BD, NumPtr,
+ BD_FLAG, Status);
+
+ *TaskAPI->AddrEnable = (uint32)((uint32)(((uint16 *)SDMA_TCR)+TaskNum) + MBarPhysOffsetGlobal);
+
+ #if BD_FLAG
+
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Buffer descriptor flags are enabled\n");
+ #endif
+
+ /* always assume 2nd to last DRD */
+ *((TaskAPI->AddrDRD)) = (uint32)((uint32)TaskAPI->DRD[TaskAPI->AddrDRDIdx] + MBarPhysOffsetGlobal);
+ #endif /* #if BD_FLAG */
+
+#else /* No Buffer Descriptors */
+
+/* #error ATA should not be non-BD */
+
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Task will complete %d iterations before disabling\n");
+ #endif
+
+ *((TaskAPI->IterExtra)) = (uint32)(ITERATIONS-1);
+#endif /* #if (MAX_BD>0) */
+
+/* Setup auto start */
+#if (AUTO_START <= -2 ) /* do not start a task */
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Auto task start disabled\n");
+ #endif
+ SDMA_TASK_CFG(SDMA_TCR, TaskNum, 0, TaskNum);
+#elif (AUTO_START <= -1 ) /* restart task */
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Auto start task\n");
+ #endif
+ SDMA_TASK_CFG(SDMA_TCR, TaskNum, 1, TaskNum);
+#elif (AUTO_START < MAX_TASKS) /* start specific task */
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Auto start task with TaskID=%d\n", AUTO_START);
+ #endif
+ SDMA_TASK_CFG(SDMA_TCR, TaskNum, 1, AUTO_START);
+#else /* do not start a task */
+ #if (DEBUG_BESTCOMM_API>0)
+ printf("TaskSetup: Auto task start disabled\n");
+ #endif
+ SDMA_TASK_CFG(SDMA_TCR, TaskNum, 0, TaskNum);
+#endif
+
+#if (INITIATOR_DATA<0) /* runtime configurable */
+ SDMA_SET_INIT(SDMA_TCR, TaskNum, TaskSetupParams->Initiator);
+
+ /*
+ * Hard-code the task initiator in the DRD to avoid a problem w/ the
+ * hold initiator bit in the TCR.
+ */
+ ext = 0;
+ for (i = 0; i < TaskAPI->NumDRD; i++) {
+ if (ext == 0)
+ {
+#if (DEBUG_BESTCOMM_API>=10)
+ printf("TaskSetup: DRD[%d] initiator = %d\n", i, ((*(TaskAPI->DRD[i]) & ~DRD_INIT_MASK) >> DRD_INIT_OFFSET));
+#endif
+ if (((*(TaskAPI->DRD[i]) & ~DRD_INIT_MASK) >> DRD_INIT_OFFSET) != INITIATOR_ALWAYS) {
+#if (DEBUG_BESTCOMM_API>=10)
+ printf("TaskSetup: Replacing DRD[%d] initiator with %d\n", i, TaskSetupParams->Initiator);
+#endif
+ *(TaskAPI->DRD[i]) = (*(TaskAPI->DRD[i]) & DRD_INIT_MASK)
+ | (TaskSetupParams->Initiator << DRD_INIT_OFFSET);
+ }
+
+ if ((*(TaskAPI->DRD[i]) & DRD_EXT_FLAG) != 0)
+ {
+ ext = 1;
+ }
+ }
+ else
+ {
+ if ((*(TaskAPI->DRD[i]) & DRD_EXT_FLAG) == 0)
+ {
+ ext = 0;
+ }
+ }
+ }
+
+#else /* INITIATOR_DATA >= 0 */
+ TaskSetupParams->Initiator = INITIATOR_DATA;
+#endif
+
+#if (DEBUG_BESTCOMM_API>=10)
+ printf("\nTaskSetup: C-API Parameter Settings Passed to TaskSetup:\n");
+ printf("TaskSetup: NumBD = %d\n", TaskSetupParams->NumBD);
+ #if (MAX_BD>0)
+ printf("TaskSetup: MaxBuf = %d\n", TaskSetupParams->Size.MaxBuf);
+ #else
+ printf("TaskSetup: NumBytes = %d\n", TaskSetupParams->Size.NumBytes);
+ #endif
+ printf("TaskSetup: Initiator = %d\n", TaskSetupParams->Initiator);
+ printf("TaskSetup: StartAddrSrc = 0x%08X\n", TaskSetupParams->StartAddrSrc);
+ printf("TaskSetup: IncrSrc = %d\n", TaskSetupParams->IncrSrc);
+ printf("TaskSetup: SzSrc = %d\n", TaskSetupParams->SzSrc);
+ printf("TaskSetup: StartAddrDst = 0x%08X\n", TaskSetupParams->StartAddrDst);
+ printf("TaskSetup: IncrDst = %d\n", TaskSetupParams->IncrDst);
+ printf("TaskSetup: SzDst = %d\n", TaskSetupParams->SzDst);
+#endif
+
+#if (DEBUG_BESTCOMM_API>=20)
+ printf("\nTaskSetup: Task-API Parameter Settings Before TaskSetup Initialization:\n");
+ printf("TaskSetup: TaskNum = %d\n", (TaskAPI->TaskNum));
+ printf("TaskSetup: TaskPragma = 0x%02X\n", *((TaskAPI->TaskPragma)));
+ printf("TaskSetup: TCR = 0x%04x\n", SDMA_TASK_STATUS(SDMA_TCR, TaskNum));
+
+ #if (MAX_BD>0)
+ printf("TaskSetup: BDTableBase = 0x%08X\n", *((TaskAPI->BDTableBase)));
+ printf("TaskSetup: BDTableLast = 0x%08X\n", *((TaskAPI->BDTableLast)));
+ printf("TaskSetup: BDTableStart = 0x%08X\n", *((TaskAPI->BDTableStart)));
+ printf("TaskSetup: AddrEnable = 0x%08X\n", *((TaskAPI->AddrEnable)));
+ #if (INCR_TYPE_SRC==0)
+ printf("TaskSetup: AddrSrcFIFO = 0x%08X\n", *((TaskAPI->AddrSrcFIFO)));
+ #endif
+ #if (INCR_TYPE_DST==0)
+ printf("TaskSetup: AddrDstFIFO = 0x%08X\n", *((TaskAPI->AddrDstFIFO)));
+ #endif
+ #if (BD_FLAG)
+ printf("TaskSetup: AddrDRD = 0x%08X\n", *((TaskAPI->AddrDRD)));
+ printf("TaskSetup: AddrDRDIdx = %d\n", ((TaskAPI->AddrDRDIdx)));
+ #endif
+ #else
+ printf("TaskSetup: IterExtra = %d\n", *((TaskAPI->IterExtra)));
+ #if (INCR_TYPE_SRC==0)
+ printf("TaskSetup: AddrSrcFIFO = 0x%08X\n", *((TaskAPI->AddrSrcFIFO)));
+ #else
+ printf("TaskSetup: StartAddrSrc = 0x%08X\n", *((TaskAPI->StartAddrSrc)));
+ #endif
+ #if (INCR_TYPE_DST==0)
+ printf("TaskSetup: AddrDstFIFO = 0x%08X\n", *((TaskAPI->AddrDstFIFO)));
+ #else
+ printf("TaskSetup: StartAddrDst = 0x%08X\n", *((TaskAPI->StartAddrDst)));
+ #endif
+ #endif
+ #if (INCR_TYPE_SRC!=0)
+ printf("TaskSetup: IncrSrc = 0x%04X\n", *((TaskAPI->IncrSrc)));
+ #if (MISALIGNED | MISALIGNED_START)
+ printf("TaskSetup: IncrSrcMA = 0x%04X\n", *((TaskAPI->IncrSrcMA)));
+ #endif
+ #endif
+ #if (INCR_TYPE_DST!=0)
+ printf("TaskSetup: IncrDst = 0x%04X\n", *((TaskAPI->IncrDst)));
+ #if (MISALIGNED | MISALIGNED_START)
+ printf("TaskSetup: IncrDstMA = 0x%04X\n", *((TaskAPI->IncrDstMA)));
+ #endif
+ #endif
+ printf("TaskSetup: Bytes = %d\n", *((TaskAPI->Bytes)));
+ printf("TaskSetup: IncrBytes = %d\n", *((TaskAPI->IncrBytes)));
+#endif
+
+
+ *((TaskAPI->Bytes)) = (uint32)TaskSetupParams->Size.MaxBuf;
+
+
+#if (TYPE_SRC!=FLEX_T) /* size fixed in task code */
+ TaskSetupParams->SzSrc = TYPE_SRC;
+#endif
+
+#if (INCR_TYPE_SRC==0) /* no data pointer */
+ TaskSetupParams->IncrSrc = (sint16)0;
+ *((TaskAPI->AddrSrcFIFO)) = (uint32)TaskSetupParams->StartAddrSrc;
+#else
+
+ #if (INCR_TYPE_SRC==1) /* automatic */
+ if (TaskSetupParams->IncrSrc!=0) {
+ TaskSetupParams->IncrSrc = (sint16)+TaskSetupParams->SzSrc;
+ } else {
+ TaskSetupParams->IncrSrc = (sint16)+TaskSetupParams->IncrSrc;
+ }
+ #elif (INCR_TYPE_SRC!=2) /* hard-coded */
+ TaskSetupParams->IncrSrc = (sint16)INCR_SRC;
+ #endif
+ *((TaskAPI->IncrSrc)) = (sint16)TaskSetupParams->IncrSrc;
+
+ #if (MAX_BD>0) /* pointer in BD Table */
+ /* pass back address of first BD */
+ TaskSetupParams->StartAddrSrc = (uint32)TaskGetBDRing(TaskNum);
+ #else
+ *((TaskAPI->StartAddrSrc)) = (uint32)TaskSetupParams->StartAddrSrc;
+ #endif
+
+ #if MISALIGNED | MISALIGNED_START
+ if (TaskSetupParams->IncrSrc < 0) {
+ *((TaskAPI->IncrSrcMA)) = (sint16)-1;
+ } else if (TaskSetupParams->IncrSrc > 0) {
+ *((TaskAPI->IncrSrcMA)) = (sint16)+1;
+ } else {
+ *((TaskAPI->IncrSrcMA)) = (sint16)0;
+ }
+ #endif
+#endif
+
+
+#if (TYPE_DST!=FLEX_T) /* size fixed in task code */
+ TaskSetupParams->SzDst = TYPE_DST;
+#endif
+
+#if (INCR_TYPE_DST==0) /* no data pointer */
+ TaskSetupParams->IncrDst = (sint16)0;
+ *((TaskAPI->AddrDstFIFO)) = (uint32)TaskSetupParams->StartAddrDst;
+#else
+ #if (INCR_TYPE_DST==1) /* automatic */
+ if (TaskSetupParams->IncrDst!=0) {
+ TaskSetupParams->IncrDst = (sint16)+TaskSetupParams->SzDst;
+ } else {
+ TaskSetupParams->IncrDst = (sint16)+TaskSetupParams->IncrDst;
+ }
+ #elif (INCR_TYPE_DST!=2) /* hard-coded */
+ TaskSetupParams->IncrDst = (sint16)INCR_DST;
+ #endif
+ *((TaskAPI->IncrDst)) = (sint16)TaskSetupParams->IncrDst;
+
+ #if (MAX_BD>0)
+ /* pass back address of first BD */
+ TaskSetupParams->StartAddrDst = (uint32)TaskGetBDRing(TaskNum);
+ #else
+ *((TaskAPI->StartAddrDst)) = (uint32)TaskSetupParams->StartAddrDst;
+ #endif
+
+ #if MISALIGNED | MISALIGNED_START
+ if (TaskSetupParams->IncrDst < 0) {
+ *((TaskAPI->IncrDstMA)) = (sint16)-1;
+ } else if (TaskSetupParams->IncrDst > 0) {
+ *((TaskAPI->IncrDstMA)) = (sint16)+1;
+ } else {
+ *((TaskAPI->IncrDstMA)) = (sint16)0;
+ }
+ #endif
+#endif
+
+/* always use macro, only affect code with #define TYPE_? flex */
+ SDMA_SET_SIZE(SDMA_TASK_SIZE, TaskNum, TaskSetupParams->SzSrc, TaskSetupParams->SzDst);
+
+
+ if (TaskSetupParams->IncrSrc != 0) {
+ *((TaskAPI->IncrBytes)) = (sint16)-abs(TaskSetupParams->IncrSrc);
+ } else if (TaskSetupParams->IncrDst != 0) {
+ *((TaskAPI->IncrBytes)) = (sint16)-abs(TaskSetupParams->IncrDst);
+ } else {
+ *((TaskAPI->IncrBytes)) = (sint16)-abs(INCR_BYTES);
+ }
+
+
+#if (DEBUG_BESTCOMM_API>=10)
+ printf("\nTaskSetup: C-API Parameter Settings Returned from TaskSetup:\n");
+ printf("TaskSetup: NumBD = %d\n", TaskSetupParams->NumBD);
+ #if (MAX_BD>0)
+ printf("TaskSetup: MaxBuf = %d\n", TaskSetupParams->Size.MaxBuf);
+ #else
+ printf("TaskSetup: NumBytes = %d\n", TaskSetupParams->Size.NumBytes);
+ #endif
+ printf("TaskSetup: Initiator = %d\n", TaskSetupParams->Initiator);
+ printf("TaskSetup: StartAddrSrc = 0x%08X\n", TaskSetupParams->StartAddrSrc);
+ printf("TaskSetup: IncrSrc = %d\n", TaskSetupParams->IncrSrc);
+ printf("TaskSetup: SzSrc = %d\n", TaskSetupParams->SzSrc);
+ printf("TaskSetup: StartAddrDst = 0x%08X\n", TaskSetupParams->StartAddrDst);
+ printf("TaskSetup: IncrDst = %d\n", TaskSetupParams->IncrDst);
+ printf("TaskSetup: SzDst = %d\n", TaskSetupParams->SzDst);
+#endif
+
+#if (DEBUG_BESTCOMM_API>=20)
+ printf("\nTaskSetup: Task-API Parameter Settings After TaskSetup Initialization:\n");
+ printf("TaskSetup: TaskNum = %d\n", ((TaskAPI->TaskNum)));
+ printf("TaskSetup: TaskPragma = 0x%02X\n", *((TaskAPI->TaskPragma)));
+
+ #if (MAX_BD>0)
+ printf("TaskSetup: BDTableBase = 0x%08X\n", *((TaskAPI->BDTableBase)));
+ printf("TaskSetup: BDTableLast = 0x%08X\n", *((TaskAPI->BDTableLast)));
+ printf("TaskSetup: BDTableStart = 0x%08X\n", *((TaskAPI->BDTableStart)));
+ printf("TaskSetup: AddrEnable = 0x%08X\n", *((TaskAPI->AddrEnable)));
+ #if (INCR_TYPE_SRC==0)
+ printf("TaskSetup: AddrSrcFIFO = 0x%08X\n", *((TaskAPI->AddrSrcFIFO)));
+ #endif
+ #if (INCR_TYPE_DST==0)
+ printf("TaskSetup: AddrDstFIFO = 0x%08X\n", *((TaskAPI->AddrDstFIFO)));
+ #endif
+ #if (BD_FLAG)
+ printf("TaskSetup: AddrDRD = 0x%08X\n", *((TaskAPI->AddrDRD)));
+ printf("TaskSetup: AddrDRDIdx = %d\n", ((TaskAPI->AddrDRDIdx)));
+ #endif
+ #else
+ printf("TaskSetup: IterExtra = %d\n", *((TaskAPI->IterExtra)));
+ #if (INCR_TYPE_SRC==0)
+ printf("TaskSetup: AddrSrcFIFO = 0x%08X\n", *((TaskAPI->AddrSrcFIFO)));
+ #else
+ printf("TaskSetup: StartAddrSrc = 0x%08X\n", *((TaskAPI->StartAddrSrc)));
+ #endif
+ #if (INCR_TYPE_DST==0)
+ printf("TaskSetup: AddrDstFIFO = 0x%08X\n", *((TaskAPI->AddrDstFIFO)));
+ #else
+ printf("TaskSetup: StartAddrDst = 0x%08X\n", *((TaskAPI->StartAddrDst)));
+ #endif
+ #endif
+ #if (INCR_TYPE_SRC!=0)
+ printf("TaskSetup: IncrSrc = 0x%04X\n", *((TaskAPI->IncrSrc)));
+ #if (MISALIGNED | MISALIGNED_START)
+ printf("TaskSetup: IncrSrcMA = 0x%04X\n", *((TaskAPI->IncrSrcMA)));
+ #endif
+ #endif
+ #if (INCR_TYPE_DST!=0)
+ printf("TaskSetup: IncrDst = 0x%04X\n", *((TaskAPI->IncrDst)));
+ #if (MISALIGNED | MISALIGNED_START)
+ printf("TaskSetup: IncrDstMA = 0x%04X\n", *((TaskAPI->IncrDstMA)));
+ #endif
+ #endif
+ printf("TaskSetup: Bytes = %d\n", *((TaskAPI->Bytes)));
+ printf("TaskSetup: IncrBytes = %d\n", *((TaskAPI->IncrBytes)));
+#endif
+
+ return TaskNum;
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_ata.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_ata.c
new file mode 100644
index 0000000000..d9f76b2a02
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_ata.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_ATA
+#define TASK_API TASK_ATA_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_ATA
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 4
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c
new file mode 100644
index 0000000000..0966f2985f
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_bdtable.c
@@ -0,0 +1,126 @@
+/******************************************************************************
+*
+* Copyright (c) 2004 Freescale Semiconductor, Inc.
+*
+* Permission is hereby granted, free of charge, to any person obtaining a
+* copy of this software and associated documentation files (the "Software"),
+* to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense,
+* and/or sell copies of the Software, and to permit persons to whom the
+* Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included
+* in all copies or substantial portions of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+* OTHER DEALINGS IN THE SOFTWARE.
+*
+* Filename: $Source$
+* Author: $Author$
+* Locker: $Locker$
+* State: $State$
+* Revision: $Revision$
+*
+******************************************************************************/
+
+#include "../bestcomm/bestcomm_api.h"
+#include "../bestcomm/task_api/tasksetup_bdtable.h"
+#include "../bestcomm/include/mgt5200/mgt5200.h"
+
+#ifdef __MWERKS__
+__declspec(section ".text") extern const uint32 taskTable;
+__declspec(section ".text") extern const uint32 taskTableBytes;
+__declspec(section ".text") extern const uint32 taskTableTasks;
+__declspec(section ".text") extern const uint32 offsetEntry;
+#else
+extern const uint32 taskTable;
+extern const uint32 taskTableBytes;
+extern const uint32 taskTableTasks;
+extern const uint32 offsetEntry;
+#endif
+
+TaskBDIdxTable_t TaskBDIdxTable[MAX_TASKS];
+
+static uint8 *TaskTableFree = 0;
+
+void TaskSetup_BDTable(volatile uint32 *BasePtr, volatile uint32 *LastPtr, volatile uint32 *StartPtr,
+ int TaskNum, uint32 NumBD, uint16 MaxBD,
+ uint8 NumPtr, ApiConfig_t ApiConfig, uint32 Status)
+{
+ int i, j;
+ uint32 *ptr;
+
+ /*
+ * If another process has not used SRAM already, then the start value
+ * will have to be passed in using the TasksSetSramOffset() function.
+ */
+ if (SramOffsetGlobal == 0) {
+ SramOffsetGlobal = taskTableBytes;
+ }
+
+ TaskTableFree = MBarGlobal + MBAR_SRAM + SramOffsetGlobal;
+
+ /*
+ * First time through the Buffer Descriptor table configuration
+ * set the buffer descriptor table with parameters that will not
+ * change since they are determined by the task itself. The
+ * SramOffsetGlobal variable must be updated to reflect the new SRAM
+ * space used by the buffer descriptor table. The next time through
+ * this function (i.e. TaskSetup called again) the only parameters
+ * that should be changed are the LastPtr pointers and the NumBD part
+ * of the table.
+ */
+ if (TaskBDIdxTable[TaskNum].BDTablePtr == 0) {
+ TaskBDIdxTable[TaskNum].BDTablePtr = TaskTableFree;
+ TaskBDIdxTable[TaskNum].numPtr = NumPtr;
+ TaskBDIdxTable[TaskNum].apiConfig = ApiConfig;
+ TaskBDIdxTable[TaskNum].BDStartPtr = StartPtr;
+
+ *StartPtr = *BasePtr = (uint32)((uint32)TaskBDIdxTable[TaskNum].BDTablePtr
+ + MBarPhysOffsetGlobal);
+
+ switch (NumPtr) {
+ case 1:
+ SramOffsetGlobal += MaxBD*sizeof(TaskBD1_t);
+ break;
+ case 2:
+ SramOffsetGlobal += MaxBD*sizeof(TaskBD2_t);
+ break;
+ default:
+ /* error */
+ break;
+ }
+ }
+
+ TaskBDIdxTable[TaskNum].currBDInUse = 0;
+ TaskBDIdxTable[TaskNum].numBD = (uint16)NumBD;
+ switch (NumPtr) {
+ case 1:
+ *LastPtr = (uint32)(*BasePtr + sizeof(TaskBD1_t) * (NumBD - 1));
+ break;
+ case 2:
+ *LastPtr = (uint32)(*BasePtr + sizeof(TaskBD2_t) * (NumBD - 1));
+ break;
+ default:
+ /* error */
+ break;
+ }
+
+ /*
+ * Set the status bits. Clear the data pointers.
+ */
+ if (MaxBD > 0) {
+ ptr = TaskBDIdxTable[TaskNum].BDTablePtr;
+ for (i = 0; i < NumBD; i++) {
+ *(ptr++) = Status;
+ for (j = 0; j < NumPtr; j++) {
+ *(ptr++) = 0x0;
+ }
+ }
+ }
+}
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_0.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_0.c
new file mode 100644
index 0000000000..9ff3b6f25b
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_0.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_CRC16_DP_0
+#define TASK_API TASK_CRC16_DP_0_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_CRC16_DP_0
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_1.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_1.c
new file mode 100644
index 0000000000..5796309ce1
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_crc16_dp_1.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_CRC16_DP_1
+#define TASK_API TASK_CRC16_DP_1_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_CRC16_DP_1
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_rx_bd.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_rx_bd.c
new file mode 100644
index 0000000000..870917b5d5
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_rx_bd.c
@@ -0,0 +1,39 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_FEC_RX
+#define TASK_API TASK_FEC_RX_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_FEC_RX
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+#define MISALIGNED_START 1
+
+#define INITIATOR_DATA INITIATOR_FEC_RX
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 256
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 0
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_tx_bd.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_tx_bd.c
new file mode 100644
index 0000000000..37395b03b2
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_fec_tx_bd.c
@@ -0,0 +1,39 @@
+
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_FEC_TX
+#define TASK_API TASK_FEC_TX_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_FEC_TX
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+#define MISALIGNED_START 1
+
+#define INITIATOR_DATA INITIATOR_FEC_TX
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 256
+#define BD_FLAG 1
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 0
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_0.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_0.c
new file mode 100644
index 0000000000..16334e9a22
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_0.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_0
+#define TASK_API TASK_GEN_DP_0_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_0
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_1.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_1.c
new file mode 100644
index 0000000000..a77dbc1b63
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_1.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_1
+#define TASK_API TASK_GEN_DP_1_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_1
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_2.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_2.c
new file mode 100644
index 0000000000..7dc90a6c8c
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_2.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_2
+#define TASK_API TASK_GEN_DP_2_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_2
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_3.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_3.c
new file mode 100644
index 0000000000..ba0b491bed
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_3.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_3
+#define TASK_API TASK_GEN_DP_3_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_3
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_0.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_0.c
new file mode 100644
index 0000000000..68de50be8c
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_0.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_BD_0
+#define TASK_API TASK_GEN_DP_BD_0_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_BD_0
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 128
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_1.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_1.c
new file mode 100644
index 0000000000..c7f8c6266b
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_dp_bd_1.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_DP_BD_1
+#define TASK_API TASK_GEN_DP_BD_1_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_DP_BD_1
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 32
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_rx_bd.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_rx_bd.c
new file mode 100644
index 0000000000..c1aa434416
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_rx_bd.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_RX_BD
+#define TASK_API TASK_GEN_RX_BD_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_RX_BD
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 64
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 0
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_tx_bd.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_tx_bd.c
new file mode 100644
index 0000000000..d97b6b78e4
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_gen_tx_bd.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_GEN_TX_BD
+#define TASK_API TASK_GEN_TX_BD_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_GEN_TX_BD
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -1
+#define ITERATIONS -1
+
+#define MAX_BD 64
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 0
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_lpc.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_lpc.c
new file mode 100644
index 0000000000..28cc0c4ed0
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_lpc.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_LPC
+#define TASK_API TASK_LPC_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_LPC
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 0
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 1
+
+#define INITIATOR_DATA -1
+
+#define AUTO_START -2
+#define ITERATIONS 1
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_rx.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_rx.c
new file mode 100644
index 0000000000..48fa25ab6f
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_rx.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_PCI_RX
+#define TASK_API TASK_PCI_RX_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_PCI_RX
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 1
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA INITIATOR_SCPCI_RX
+
+#define AUTO_START -2
+#define ITERATIONS 0
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 0
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 1
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+
diff --git a/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_tx.c b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_tx.c
new file mode 100644
index 0000000000..0fde9d9225
--- /dev/null
+++ b/c/src/lib/libbsp/powerpc/gen5200/bestcomm/tasksetup_pci_tx.c
@@ -0,0 +1,38 @@
+
+/*
+ * Generated by GUI, one per configured tasks.
+ */
+
+#define TASK_BASE TASK_PCI_TX
+#define TASK_API TASK_PCI_TX_api_t
+#define TASKSETUP_NAME TaskSetup_TASK_PCI_TX
+
+/* Pragma settings */
+#define PRECISE_INC 0
+#define NO_ERROR_RST 0
+#define PACK_DATA 0
+#define INTEGER_MODE 1
+#define SPEC_READS 1
+#define WRITE_LINE_BUFFER 1
+#define READ_LINE_BUFFER 1
+
+#define MISALIGNED 0
+
+#define INITIATOR_DATA INITIATOR_SCPCI_TX
+
+#define AUTO_START -2
+#define ITERATIONS 0
+
+#define MAX_BD 0
+#define BD_FLAG 0
+
+#define INCR_TYPE_SRC 1
+#define INCR_SRC 0
+#define TYPE_SRC FLEX_T
+
+#define INCR_TYPE_DST 0
+#define INCR_DST 0
+#define TYPE_DST FLEX_T
+
+#include "../bestcomm/task_api/tasksetup_general.h"
+