OMAP4: Removed files specific to OMAP4 in qnx directory
authorvwan@ti.com <vwan@ti.com>
Fri, 24 May 2013 22:47:05 +0000 (15:47 -0700)
committerChris Ring <cring@ti.com>
Fri, 24 May 2013 22:47:05 +0000 (15:47 -0700)
This commit removes all source files that are specific to OMAP4,
which the product does not support. Note that there are still file
names, variable names, macros, etc. related to OMAP4 that will need
subsequent clean up.

Files in tiler and rpmsg-resmgr directories have been left in place
as we are discussing their removal in an on-going thread.

A minor change was needed in syslink_main.c as well in order to
eliminate its use of type 'u32' defined in rprcfmt.h, so that we can
remove the latter file, which is specific to the OMAP4 loader.

Signed-off-by: VW <vwan@ti.com>
29 files changed:
qnx/src/ipc3x_dev/ReadMe.txt
qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/Platform.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/GlobalTypes.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMUAccInt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMURegAcM.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/OMAP4430DucatiPhyShmem.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_defs.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430Dmm.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiEnabler.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHal.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalMmu.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalReset.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiProc.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiEnabler.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHal.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHalMmu.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiHalReset.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiPhyShmem.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/OMAP4430DucatiProc.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/Omap4430IpcInt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/inc/knl/_Omap4430IpcInt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/arch/omap4430/Omap4430IpcInt.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/readrprc.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/rprcfmt.h [deleted file]
qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/rprc/rprcloader.c [deleted file]
qnx/src/ipc3x_dev/ti/syslink/rpmsg-resmgr/hlos/knl/Qnx/family/omap5430/ipu_pm.c

index 5a6d0b281d913e8cfe8d7294f9e6e32887dddf2b..b00f4f86bf12854ddcafa97f9e3225ca78f137f5 100644 (file)
@@ -56,8 +56,6 @@ Build Instructions (Windows):
        Set the environment variable QCONF_OVERRIDE as follows:
            set QCONF_OVERRIDE = C:\ide-4.7-workspace\trunk\qconf-override.mk
     3) From the command prompt:
-           To build for OMAP4:
-               > make
            To build for OMAP5:
                > make SYSLINK_PLATFORM=omap5430 TILER_PLATFORM=omap5430 SMP=1
            To build for TI811X (note, there is no tiler support for j5 eco):
index 3512cc6e11d080e3c94cfad161738e4527573ead..fa400c6430f2279aa4ae051c867141eb48af453e 100644 (file)
@@ -68,7 +68,6 @@
 #include <ti/syslink/utils/MemoryOS.h>
 #include <ti/ipc/MultiProc.h>
 #include <_MultiProc.h>
-#include <rprcfmt.h>
 #include <OsalSemaphore.h>
 #include <ti/syslink/utils/OsalPrint.h>
 #if defined(SYSLINK_PLATFORM_OMAP4430) || defined(SYSLINK_PLATFORM_OMAP5430)
@@ -309,8 +308,8 @@ int init_syslink_trace_device(syslink_dev_t *dev)
     syslink_attr_t * trace_attr;
     char             trace_name[_POSIX_PATH_MAX];
     int              status = 0;
-    u32              da = 0, pa = 0;
-    u32              len;
+    unsigned int     da = 0, pa = 0;
+    unsigned int     len;
 
     memset(&resmgr_attr, 0, sizeof resmgr_attr);
     resmgr_attr.nparts_max = 10;
@@ -407,8 +406,6 @@ int init_syslink_device(syslink_dev_t *dev)
     int              i;
     char             trace_name[_POSIX_PATH_MAX];
     int              status = 0;
-    u32              da = 0, pa = 0;
-    u32              len;
 
     pthread_mutex_init(&dev->lock, NULL);
 
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/Platform.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/Platform.c
deleted file mode 100644 (file)
index 538f4cd..0000000
+++ /dev/null
@@ -1,1002 +0,0 @@
-/*
- *  @file   Platform.c
- *
- *  @brief      Implementation of Platform initialization logic.
- *
- *
- *  @ver        02.00.00.46_alpha1
- *
- *  ============================================================================
- *
- *  Copyright (c) 2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-/* Standard header files */
-#include <ti/syslink/Std.h>
-
-/* Utilities & Osal headers */
-#include <ti/syslink/utils/Gate.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Memory.h>
-#include <ti/syslink/utils/Trace.h>
-#include <ti/ipc/MultiProc.h>
-#include <_MultiProc.h>
-#include <ti/syslink/utils/OsalPrint.h>
-#include <ti/syslink/utils/String.h>
-
-/* SysLink device specific headers */
-#include <ProcDefs.h>
-#include <Processor.h>
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalReset.h>
-#include <OMAP4430DucatiHalMmu.h>
-#include <OMAP4430DucatiProc.h>
-#include <Omap4430IpcInt.h>
-
-/* Module level headers */
-#include <_MessageQCopy.h>
-#include <ti/ipc/MessageQCopy.h>
-#include <_MessageQCopyDefs.h>
-
-#include <ti/syslink/ProcMgr.h>
-#include <_ProcMgr.h>
-#include <ti/syslink/inc/knl/Platform.h>
-#include <rprcloader.h>
-
-#include <ti/ipc/Ipc.h>
-#include <_Ipc.h>
-#include <IpcKnl.h>
-#include <ipu_pm.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/** ============================================================================
- *  Macros.
- *  ============================================================================
- */
-#define RESETVECTOR_SYMBOL          "_Ipc_ResetVector"
-
-#define IPC_MEM_VRING0          0xA0000000
-#define IPC_MEM_VRING1          0xA0004000
-#define IPC_MEM_VRING2          0xA0008000
-#define IPC_MEM_VRING3          0xA000c000
-
-/** ============================================================================
- *  Application specific configuration, please change these value according to
- *  your application's need.
- *  ============================================================================
- */
-/*!
- *  @brief  Structure defining config parameters for overall System.
- */
-typedef struct Platform_Config {
-    MultiProc_Config                multiProcConfig;
-    /*!< Multiproc config parameter */
-
-    MessageQCopy_Config             MQCopyConfig;
-    /*!< Notify config parameter */
-
-    ProcMgr_Config                  procMgrConfig;
-    /*!< Processor manager config parameter */
-
-    ipu_pm_config                   ipu_pm_config;
-    /* ipu_pm config parameter */
-
-    rprcloader_Config               rprcloaderConfig;
-    /*!< Elf loader config parameter */
-} Platform_Config;
-
-
-/* Struct embedded into slave binary */
-typedef struct Platform_SlaveConfig {
-    UInt32  cacheLineSize;
-    UInt32  brOffset;
-} Platform_SlaveConfig;
-
-typedef struct Platform_SlaveSRConfig {
-    UInt32 entryBase;
-    UInt32 entryLen;
-    UInt32 ownerProcId;
-    UInt32 id;
-    UInt32 createHeap;
-    UInt32 cacheLineSize;
-} Platform_SlaveSRConfig;
-
-/* Shared region configuration information for host side. */
-typedef struct Platform_HostSRConfig {
-    UInt16 refCount;
-} Platform_HostSRConfig;
-
-/*! @brief structure for platform instance */
-typedef struct Platform_Object {
-    /*!< Flag to indicate platform initialization status */
-    ProcMgr_Handle                pmHandle;
-    /*!< Handle to the ProcMgr instance used */
-    union{
-        struct {
-            OMAP4430DUCATIPROC_Handle    pHandle;
-            /*!< Handle to the Processor instance used */
-            /*!< Handle to the PwrMgr instance used */
-            rprcloader_Handle            ldrHandle;
-            /*!< Handle to the Loader instance used */
-            UInt32                       fileId;
-            /*!< File ID of loaded image, needed for un-loading */
-        } sysm3;
-        struct {
-            OMAP4430DUCATIPROC_Handle    pHandle;
-            /*!< Handle to the Processor instance used */
-            /*!< Handle to the PwrMgr instance used */
-            /* NOTE: no loader used for appm3, both cores loaded at once */
-            /*!< Handle to the Loader instance used */
-        } appm3;
-    } sHandles;
-    /*!< Slave specific handles */
-    Platform_SlaveConfig          slaveCfg;
-    /*!< Slave embedded config */
-    Platform_SlaveSRConfig *      slaveSRCfg;
-    /*!< Shared region details from slave */
-} Platform_Object, *Platform_Handle;
-
-
-/*! @brief structure for platform instance */
-typedef struct Platform_Module_State {
-    Bool              multiProcInitFlag;
-    /*!< MultiProc Initialize flag */
-    Bool              ipu_pm_init_flag;
-    /*!< ipu_pm Initialize flag */
-    Bool              procMgrInitFlag;
-    /*!< Processor manager Initialize flag */
-    Bool              rprcloaderInitFlag;
-    /*!< rprc loader Initialize flag */
-    Bool              ipcIntInitFlag;
-    /*!< IpcInt Initialize flag */
-    Bool              platformInitFlag;
-    /*!< Flag to indicate platform initialization status */
-    Bool              mqcopyInitFlag;
-    /*!< rprc loader Initialize flag */
-    Bool              platform_mem_init_flag;
-} Platform_Module_State;
-
-
-/* =============================================================================
- * GLOBALS
- * =============================================================================
- */
-static Platform_Object Platform_objects [MultiProc_MAXPROCESSORS];
-static Platform_Module_State Platform_Module_state;
-static Platform_Module_State * Platform_module = &Platform_Module_state;
-
-Int32 _Platform_setup  (Ipc_Config * cfg);
-Int32 _Platform_destroy (void);
-
-/** ============================================================================
- *  APIs.
- *  ============================================================================
- */
-/* Function to read slave memory */
-Int32
-_Platform_readSlaveMemory (UInt16   procId,
-                           UInt32   addr,
-                           Ptr      value,
-                           UInt32 * numBytes);
-
-/* Function to write slave memory */
-Int32
-_Platform_writeSlaveMemory (UInt16   procId,
-                            UInt32   addr,
-                            Ptr      value,
-                            UInt32 * numBytes);
-/*!
- *  @brief      Function to get the default values for configurations.
- *
- *  @param      config   Configuration values.
- */
-Void
-Platform_getConfig (Platform_Config * config)
-{
-    GT_1trace (curTrace, GT_ENTER, "Platform_getConfig", config);
-
-    GT_assert (curTrace, (config != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (config == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "Platform_getConfig",
-                             Platform_E_INVALIDARG,
-                             "Argument of type (Platform_getConfig *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        /* Get the gatepeterson default config */
-        MultiProc_getConfig (&config->multiProcConfig);
-
-        /* Get the PROCMGR default config */
-        ProcMgr_getConfig (&config->procMgrConfig);
-
-        /* Get the ElfLoader default config */
-        rprcloader_getConfig (&config->rprcloaderConfig);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_0trace (curTrace, GT_LEAVE, "Platform_getConfig");
-}
-
-/*!
- *  @brief      Function to override the default confiuration values.
- *
- *  @param      config   Configuration values.
- */
-Int32
-Platform_overrideConfig (Platform_Config * config, Ipc_Config * cfg)
-{
-    Int32  status = Platform_S_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "Platform_overrideConfig", config);
-
-    GT_assert (curTrace, (config != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (config == NULL) {
-        /*! @retval Platform_E_INVALIDARG Argument of type
-         *  (Platform_Config *) passed is null*/
-        status = Platform_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "Platform_overrideConfig",
-                             status,
-                             "Argument of type (Platform_getConfig *) passed "
-                             "is null!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        /* Override the gatepeterson default config */
-        config->multiProcConfig.numProcessors = 4;
-        config->multiProcConfig.id            = 0;
-
-        String_cpy (config->multiProcConfig.nameList [0],
-                    "HOST");
-        String_cpy (config->multiProcConfig.nameList [1],
-                    "CORE0");
-        String_cpy (config->multiProcConfig.nameList [2],
-                    "CORE1");
-        String_cpy (config->multiProcConfig.nameList [3],
-                    "DSP");
-
-        /* Override the PROCMGR default config */
-
-        /* Override the MessageQCopy default config */
-        config->MQCopyConfig.intId[1] = 58;
-        config->MQCopyConfig.intId[2] = 58;
-        config->MQCopyConfig.intId[3] = 58;
-
-        config->ipu_pm_config.int_id = 58;
-        config->ipu_pm_config.num_procs = 2;
-        config->ipu_pm_config.proc_ids[0] = 2; // CORE0 is set as 2 above
-        config->ipu_pm_config.proc_ids[1] = 1; // CORE1 is set as 1 above
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_ENTER, "Platform_overrideConfig", status);
-
-    /*! @retval Platform_S_SUCCESS operation was successful */
-    return status;
-}
-
-/*!
- *  @brief      Function to setup platform.
- *              TBD: logic would change completely in the final system.
- */
-Int32
-Platform_setup (Ipc_Config * cfg)
-{
-    Int32                   status      = Platform_S_SUCCESS;
-    Platform_Config         _config;
-    Platform_Config *       config;
-    Omap4430IpcInt_Config   omap4430cfg;
-
-    Platform_getConfig (&_config);
-    config = &_config;
-
-/* Initialize PlatformMem */
-    status = MemoryOS_setup();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "Platform_setup",
-                             status,
-                             "platform_mem_setup!");
-    } else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        Platform_module->platform_mem_init_flag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    Platform_overrideConfig (config, cfg);
-
-    status = MultiProc_setup (&(config->multiProcConfig));
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "Platform_setup",
-                             status,
-                             "MultiProc_setup failed!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->multiProcInitFlag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-/* Initialize PROCMGR */
-    if (status >= 0) {
-        status = ProcMgr_setup (&(config->procMgrConfig));
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_setup",
-                                 status,
-                                 "ProcMgr_setup failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->procMgrInitFlag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* Initialize IpcInt required for VirtQueue/MessageQCopy. */
-    if (status >= 0) {
-        /* Do the IPC interrupt setup for the full platform (cfg is not used) */
-        Omap4430IpcInt_setup(&omap4430cfg);
-        Platform_module->ipcIntInitFlag = TRUE;
-    }
-
-/* Initialize rprc loader */
-    if (status >= 0) {
-        status = rprcloader_setup (&config->rprcloaderConfig);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_setup",
-                                 status,
-                                 "rprcloader_setup failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->rprcloaderInitFlag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-/* Initialize ipu_pm */
-    if (status >= 0) {
-        status = ipu_pm_setup (&config->ipu_pm_config);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_setup",
-                                 status,
-                                 "ipu_pm_setup failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->ipu_pm_init_flag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-/* Initialize MessageQCopy */
-    if (status >= 0) {
-        status = MessageQCopy_setup (&config->MQCopyConfig);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_setup",
-                                 status,
-                                 "MessageQCopy_setup failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->mqcopyInitFlag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    if (status >= 0) {
-        Memory_set (Platform_objects,
-                    0,
-                    (sizeof (Platform_Object) * MultiProc_getNumProcessors()));
-    }
-
-    if (status >= 0) {
-        /* Doing per remote-proc init stuff */
-        status = _Platform_setup (cfg);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_setup",
-                                 status,
-                                 "_Platform_setup failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->platformInitFlag = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    if (status < 0) {
-        Platform_destroy();
-    }
-
-    return status;
-}
-
-
-/*!
- *  @brief      Function to destroy the System.
- *
- *  @sa         Platform_setup
- */
-Int32
-Platform_destroy (void)
-{
-    Int32  status = Platform_S_SUCCESS;
-
-    GT_0trace (curTrace, GT_ENTER, "Platform_destroy");
-
-    /* Finalize Platform-specific destroy */
-    if (Platform_module->platformInitFlag == TRUE) {
-        status = _Platform_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "Platform_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->platformInitFlag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* Finalize MessageQCopy */
-    if (Platform_module->mqcopyInitFlag == TRUE) {
-        status = MessageQCopy_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "MessageQCopy_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->mqcopyInitFlag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* Finalize ipu_pm */
-    if (Platform_module->ipu_pm_init_flag == TRUE) {
-        status = ipu_pm_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "ipu_pm_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->ipu_pm_init_flag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* Finalize rprc loader */
-    if (Platform_module->rprcloaderInitFlag == TRUE) {
-        status = rprcloader_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "rprcloader_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->rprcloaderInitFlag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    if (Platform_module->ipcIntInitFlag == TRUE) {
-        Omap4430IpcInt_destroy ();
-        Platform_module->ipcIntInitFlag = FALSE;
-    }
-
-    /* Finalize PROCMGR */
-    if (Platform_module->procMgrInitFlag == TRUE) {
-        status = ProcMgr_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "ProcMgr_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->procMgrInitFlag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* Finalize MultiProc */
-    if (Platform_module->multiProcInitFlag == TRUE) {
-        status = MultiProc_destroy ();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "MultiProc_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->multiProcInitFlag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    if (status >= 0) {
-        Memory_set (Platform_objects,
-                    0,
-                    (sizeof (Platform_Object) * MultiProc_getNumProcessors()));
-    }
-
-    if (Platform_module->platform_mem_init_flag == TRUE) {
-        status = MemoryOS_destroy();
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "Platform_destroy",
-                                 status,
-                                 "MemoryOS_destroy failed!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            Platform_module->platform_mem_init_flag = FALSE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "Platform_destroy", status);
-
-    /*! @retval Platform_S_SUCCESS Operation successful */
-    return status;
-}
-
-/*!
- *  @brief      Function to setup platform.
- *              TBD: logic would change completely in the final system.
- */
-Int32
-_Platform_setup (Ipc_Config * cfg)
-{
-    Int32                       status              = Platform_S_SUCCESS;
-    ProcMgr_Params              params;
-    OMAP4430DUCATIPROC_Config   sysM3ProcConfig;
-    OMAP4430DUCATIPROC_Config   appM3ProcConfig;
-    OMAP4430DUCATIPROC_Params   sysM3ProcParams;
-    OMAP4430DUCATIPROC_Params   appM3ProcParams;
-    ProcMgr_AddrInfo *          memEntries;
-    rprcloader_Params           rprcloaderParams;
-    rprcloader_Handle           ldrHandle;
-    UInt16                      procId;
-    Platform_Handle             handle;
-    UInt32                      pa, va;
-    UInt32                      i                   = 0;
-    Bool                        core0Setup          = FALSE;
-    Bool                        core1Setup          = FALSE;
-    ProcMgr_AttachParams        attachParams;
-
-    GT_0trace (curTrace, GT_ENTER, "_Platform_setup");
-
-    /* Get MultiProc ID by name. */
-    procId = MultiProc_getId ("CORE0");
-
-    handle = &Platform_objects [procId];
-
-    OMAP4430DUCATIPROC_get_config(&sysM3ProcConfig, procId );
-    status = OMAP4430DUCATIPROC_setup (&sysM3ProcConfig, procId);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_Platform_setup",
-                             status,
-                             "OMAP4430PROC_setup failed!");
-    }
-    else {
-        core0Setup = TRUE;
-        /* Create an instance of the Processor object for
-         * OMAP4430 */
-        OMAP4430DUCATIPROC_Params_init (NULL, &sysM3ProcParams, procId);
-        pa = cfg->pAddr;
-        va = cfg->vAddr;
-        memEntries = sysM3ProcParams.memEntries;
-        for (i = 0; i < sysM3ProcParams.numMemEntries; i++) {
-            memEntries[i].addr[ProcMgr_AddrType_MasterPhys] = pa;
-            memEntries[i].addr[ProcMgr_AddrType_MasterKnlVirt] = va;
-            pa += memEntries[i].size;
-            va += memEntries[i].size;
-        }
-        handle->sHandles.sysm3.pHandle = OMAP4430DUCATIPROC_create (
-                                                      procId,
-                                                      &sysM3ProcParams);
-
-        /* Create an instance of the rprc Loader object */
-        rprcloader_Params_init (NULL, &rprcloaderParams);
-        handle->sHandles.sysm3.ldrHandle = rprcloader_create (procId,
-                                                          &rprcloaderParams);
-
-        if (handle->sHandles.sysm3.pHandle == NULL) {
-            status = Platform_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_setup",
-                                 status,
-                                 "OMAP4430PROC_create failed!");
-        }
-        else if (handle->sHandles.sysm3.ldrHandle ==  NULL) {
-            status = Platform_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_setup",
-                                 status,
-                                 "Failed to create loader instance!");
-        }
-        else {
-            /* Initialize parameters */
-            ProcMgr_Params_init (NULL, &params);
-            params.procHandle = handle->sHandles.sysm3.pHandle;
-            params.loaderHandle = handle->sHandles.sysm3.ldrHandle;
-            ldrHandle = params.loaderHandle;
-            String_cpy (params.rstVectorSectionName,
-                        RESETVECTOR_SYMBOL);
-            handle->pmHandle = ProcMgr_create (procId, &params);
-            if (handle->pmHandle == NULL) {
-                status = Platform_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "_Platform_setup",
-                                     status,
-                                     "ProcMgr_create failed!");
-            }
-            else {
-                ProcMgr_getAttachParams(handle->pmHandle, &attachParams);
-                ProcMgr_attach(handle->pmHandle, &attachParams);
-                MessageQCopy_attach(procId, (Ptr)IPC_MEM_VRING0, 0);
-            }
-        }
-    }
-
-    if (status >= 0) {
-        /* Get MultiProc ID by name. */
-        procId = MultiProc_getId ("CORE1");
-
-        handle = &Platform_objects [procId];
-        OMAP4430DUCATIPROC_get_config (&appM3ProcConfig, procId );
-        status = OMAP4430DUCATIPROC_setup (&appM3ProcConfig, procId);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_setup",
-                                 status,
-                                 "OMAP4430PROC_setup failed!");
-        }
-        else {
-            core1Setup = TRUE;
-            /* Create an instance of the Processor object for
-             * OMAP4430 */
-            OMAP4430DUCATIPROC_Params_init(NULL, &appM3ProcParams,procId);
-            pa = cfg->pAddr;
-            va = cfg->vAddr;
-            memEntries = appM3ProcParams.memEntries;
-            for (i = 0; i < appM3ProcParams.numMemEntries; i++) {
-                memEntries[i].addr[ProcMgr_AddrType_MasterPhys] = pa;
-                memEntries[i].addr[ProcMgr_AddrType_MasterKnlVirt] = va;
-                pa += memEntries[i].size;
-                va += memEntries[i].size;
-            }
-            handle->sHandles.appm3.pHandle = OMAP4430DUCATIPROC_create(procId,
-                                                          &appM3ProcParams);
-
-            /* Don't create an instance of the rprc Loader - not needed */
-
-            if (handle->sHandles.appm3.pHandle == NULL) {
-                status = Platform_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "_Platform_setup",
-                                     status,
-                                     "OMAP4430PROC_create failed!");
-            }
-            else {
-                /* Initialize parameters */
-                ProcMgr_Params_init (NULL, &params);
-                params.procHandle = handle->sHandles.appm3.pHandle;
-                /* Use the same loader handle as sysm3 to avoid ProcMgr errors */
-                params.loaderHandle = ldrHandle;
-                String_cpy (params.rstVectorSectionName,
-                            RESETVECTOR_SYMBOL);
-                handle->pmHandle = ProcMgr_create (procId, &params);
-                if (handle->pmHandle == NULL) {
-                    status = Platform_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "_Platform_setup",
-                                         status,
-                                         "ProcMgr_create failed!");
-                }
-                else {
-                    ProcMgr_getAttachParams(handle->pmHandle, &attachParams);
-                    ProcMgr_attach(handle->pmHandle, &attachParams);
-                    MessageQCopy_attach(procId, (Ptr)IPC_MEM_VRING2, 200);
-                }
-            }
-        }
-    }
-
-    if (status < 0) {
-        /* Cleanup in case of error */
-        procId = MultiProc_getId ("CORE1");
-        handle = &Platform_objects [procId];
-        if (handle->pmHandle) {
-            ProcMgr_delete(&handle->pmHandle);
-            handle->pmHandle = NULL;
-        }
-        if (handle->sHandles.appm3.pHandle) {
-            OMAP4430DUCATIPROC_delete(&handle->sHandles.appm3.pHandle);
-            handle->sHandles.appm3.pHandle = NULL;
-        }
-        if (core1Setup)
-            OMAP4430DUCATIPROC_destroy(procId);
-
-        procId = MultiProc_getId ("CORE0");
-        handle = &Platform_objects [procId];
-        if (handle->pmHandle) {
-            ProcMgr_delete(&handle->pmHandle);
-            handle->pmHandle = NULL;
-        }
-        if (handle->sHandles.sysm3.ldrHandle) {
-            rprcloader_delete(&handle->sHandles.sysm3.ldrHandle);
-            handle->sHandles.sysm3.ldrHandle = NULL;
-        }
-        if (handle->sHandles.sysm3.pHandle) {
-            OMAP4430DUCATIPROC_delete(&handle->sHandles.sysm3.pHandle);
-            handle->sHandles.sysm3.pHandle = NULL;
-        }
-        if (core0Setup)
-            OMAP4430DUCATIPROC_destroy(procId);
-    }
-    GT_1trace (curTrace, GT_LEAVE, "_Platform_setup", status);
-
-    /*! @retval Platform_S_SUCCESS operation was successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to setup platform.
- *              TBD: logic would change completely in the final system.
- */
-Int32
-_Platform_destroy (void)
-{
-    Int32           status    = Platform_S_SUCCESS;
-    Int32           tmpStatus = Platform_S_SUCCESS;
-    Platform_Handle handle;
-    /*UInt16          procId;*/
-
-    /* Get MultiProc ID by name. */
-
-    GT_0trace (curTrace, GT_ENTER, "_Platform_destroy");
-
-    /* ------------------------- APPM3 cleanup ------------------------------ */
-    handle = &Platform_objects [MultiProc_getId ("CORE1")];
-    if (handle->pmHandle != NULL) {
-        tmpStatus = ProcMgr_delete (&handle->pmHandle);
-        GT_assert (curTrace, (tmpStatus >= 0));
-        if ((status >= 0) && (tmpStatus < 0)) {
-            status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_destroy",
-                                 status,
-                                 "ProcMgr_delete failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-    }
-
-    /* Delete the Processor, Loader and PwrMgr instances */
-
-    if (handle->sHandles.appm3.pHandle != NULL) {
-        tmpStatus = OMAP4430DUCATIPROC_delete (&handle->sHandles.appm3.pHandle);
-        GT_assert (curTrace, (tmpStatus >= 0));
-        if ((status >= 0) && (tmpStatus < 0)) {
-            status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_destroy",
-                                 status,
-                                 "OMAP4430PROC_delete failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-    }
-
-    tmpStatus = OMAP4430DUCATIPROC_destroy (MultiProc_getId ("CORE1"));
-    GT_assert (curTrace, (tmpStatus >= 0));
-    if ((status >= 0) && (tmpStatus < 0)) {
-        status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_Platform_destroy",
-                             status,
-                             "OMAP4430PROC_destroy failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    /* ------------------------- SYSM3 cleanup ------------------------------ */
-    handle = &Platform_objects [MultiProc_getId ("CORE0")];
-    if (handle->pmHandle != NULL) {
-        tmpStatus = ProcMgr_delete (&handle->pmHandle);
-        GT_assert (curTrace, (tmpStatus >= 0));
-        if ((status >= 0) && (tmpStatus < 0)) {
-            status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_destroy",
-                                 status,
-                                 "ProcMgr_delete failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-    }
-
-    /* Delete the Processor, Loader and PwrMgr instances */
-
-    if (handle->sHandles.sysm3.ldrHandle != NULL) {
-        tmpStatus = rprcloader_delete (&handle->sHandles.sysm3.ldrHandle);
-        GT_assert (curTrace, (tmpStatus >= 0));
-        if ((status >= 0) && (tmpStatus < 0)) {
-            status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_destroy",
-                                 status,
-                                 "Failed to delete loader instance!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-    }
-
-    if (handle->sHandles.sysm3.pHandle != NULL) {
-        tmpStatus = OMAP4430DUCATIPROC_delete (&handle->sHandles.sysm3.pHandle);
-        GT_assert (curTrace, (tmpStatus >= 0));
-        if ((status >= 0) && (tmpStatus < 0)) {
-            status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_Platform_destroy",
-                                 status,
-                                 "OMAP4430PROC_delete failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-    }
-
-    tmpStatus = OMAP4430DUCATIPROC_destroy (MultiProc_getId ("CORE0"));
-    GT_assert (curTrace, (tmpStatus >= 0));
-    if ((status >= 0) && (tmpStatus < 0)) {
-        status = tmpStatus;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_Platform_destroy",
-                             status,
-                             "OMAP4430PROC_destroy failed!");
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "_Platform_destroy", status);
-
-    /*! @retval Platform_S_SUCCESS operation was successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif /* defined (__cplusplus) */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/GlobalTypes.h b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/GlobalTypes.h
deleted file mode 100644 (file)
index 831b9b8..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- *  @file   GlobalTypes.h
- *
- *  @brief      Macro definitions required by HW layer.
- *
- *
- *  @ver        02.00.00.46_alpha1
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-#ifndef __GLOBALTYPES_H
-#define __GLOBALTYPES_H
-
-#define  REG volatile
-
-/*
- * Definition: RET_CODE_BASE
- *
- * DESCRIPTION:  Base value for return code offsets
- *
- *
- */
-#define RET_CODE_BASE        0
-
-/*
- * TYPE: ReturnCode_t
- *
- * DESCRIPTION:  Return codes to be returned by all library functions
- *
- *
- */
-enum ReturnCode_label {
-RET_OK = 0,
-RET_FAIL = -1,
-RET_BAD_NULL_PARAM = -2,
-RET_PARAM_OUT_OF_RANGE = -3,
-RET_INVALID_ID = -4,
-RET_EMPTY = -5,
-RET_FULL = -6,
-RET_TIMEOUT = -7,
-RET_INVALID_OPERATION = -8,
-/* Add new error codes at end of above list */
-RET_NUM_RET_CODES     /* this should ALWAYS be LAST entry */
-};
-
-
-
-/*
- * MACRO: RD_MEM_32_VOLATILE, WR_MEM_32_VOLATILE
- *
- * DESCRIPTION:  32 bit register access macros
- *
- *
- */
-#define RD_MEM_32_VOLATILE(addr) \
-((unsigned long)(*((REG unsigned long *)(addr))))
-
-#define WR_MEM_32_VOLATILE(addr, data) \
-(*((REG unsigned long *)(addr)) = (unsigned long)(data))
-
-
-
-
-#ifdef CHECK_INPUT_PARAMS
-/*
- * MACRO: CHECK_INPUT_PARAMS
- *
- * DESCRIPTION:  Checks an input code and returns a specified value if code is
- *               invalid value, also writes spy value if error found.
- *
- * NOTE:         Can be disabled to save HW cycles.
- *
- *
- */
-#define CHECK_INPUT_PARAM(actualValue, invalidValue,  \
-returnCodeIfMismatch, spyCodeIfMisMatch) do {\
-    if ((invalidValue) == (actualValue)) {\
-        RES_Set((spyCodeIfMisMatch));\
-        return returnCodeIfMismatch; \
-    } \
-} while (0)
-
-/*
- * MACRO: CHECK_INPUT_RANGE
- *
- * DESCRIPTION:  Checks an input value and returns a specified value if not in
- *               specified range, also writes spy value if error found.
- *
-* NOTE:         Can be disabled to save HW cycles.
- *
- *
- */
-#define CHECK_INPUT_RANGE(actualValue, minValidValue, maxValidValue, \
-returnCodeIfMismatch, spyCodeIfMisMatch) do {\
-    if (((actualValue) < (minValidValue)) || \
-        ((actualValue) > (maxValidValue))) {\
-        RES_Set((spyCodeIfMisMatch));\
-        return returnCodeIfMismatch; \
-    } \
-} while (0)
-
-/*
- * MACRO: CHECK_INPUT_RANGE_MIN0
- *
- * DESCRIPTION:  Checks an input value and returns a
- * specified value if not in
- * specified range, also writes spy value if error found.
- * The minimum
- * value is 0.
- *
- * NOTE:         Can be disabled to save HW cycles.
- *
- *
- */
-#define CHECK_INPUT_RANGE_MIN0(actualValue, maxValidValue, \
-returnCodeIfMismatch, spyCodeIfMisMatch) do {\
-    if ((actualValue) > (maxValidValue)) {\
-        RES_Set((spyCodeIfMisMatch));\
-        return returnCodeIfMismatch; \
-    } \
-} while (0)
-
-#else
-
-#define CHECK_INPUT_PARAM(actualValue, invalidValue, returnCodeIfMismatch,\
-spyCodeIfMisMatch)
-
-#define CHECK_INPUT_PARAM_NO_SPY(actualValue, invalidValue, \
-returnCodeIfMismatch)
-
-#define CHECK_INPUT_RANGE(actualValue, minValidValue, maxValidValue, \
-returnCodeIfMismatch, spyCodeIfMisMatch)
-
-#define CHECK_INPUT_RANGE_NO_SPY(actualValue, minValidValue , \
-maxValidValue, returnCodeIfMismatch)
-
-#define CHECK_INPUT_RANGE_MIN0(actualValue, maxValidValue, \
-returnCodeIfMismatch, spyCodeIfMisMatch)
-
-#define CHECK_INPUT_RANGE_NO_SPY_MIN0(actualValue, \
-maxValidValue, returnCodeIfMismatch)
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif    /* __GLOBALTYPES_H */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMUAccInt.h b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMUAccInt.h
deleted file mode 100644 (file)
index f1948ee..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- *  @file  MMUAccInt.h
- *
- *  @brief  MMU Register offset definitions
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-#ifndef _MMU_ACC_INT_H
-#define _MMU_ACC_INT_H
-
-
-/* Register offset address definitions */
-
-#define MMU_MMU_REVISION_OFFSET 0x0
-#define MMU_MMU_SYSCONFIG_OFFSET 0x10
-#define MMU_MMU_SYSSTATUS_OFFSET 014
-#define MMU_MMU_IRQSTATUS_OFFSET 0x18
-#define MMU_MMU_IRQENABLE_OFFSET 0x1c
-#define MMU_MMU_WALKING_ST_OFFSET 0x40
-#define MMU_MMU_CNTL_OFFSET     0x44
-#define MMU_MMU_FAULT_AD_OFFSET 0x48
-#define MMU_MMU_TTB_OFFSET      0x4c
-#define MMU_MMU_LOCK_OFFSET     0x50
-#define MMU_MMU_LD_TLB_OFFSET   0x54
-#define MMU_MMU_CAM_OFFSET      0x58
-#define MMU_MMU_RAM_OFFSET      0x5c
-#define MMU_MMU_GFLUSH_OFFSET   0x60
-#define MMU_MMU_FLUSH_ENTRY_OFFSET 0x64
-#define MMU_MMU_READ_CAM_OFFSET    0x68
-#define MMU_MMU_READ_RAM_OFFSET    0x6c
-#define MMU_MMU_EMU_FAULT_AD_OFFSET    0x70
-
-
-/* Bitfield mask and offset declarations */
-
-#define MMU_MMU_REVISION_Rev_MASK    0xff
-#define MMU_MMU_REVISION_Rev_OFFSET    0
-
-#define MMU_MMU_SYSCONFIG_ClockActivity_MASK    0x300
-#define MMU_MMU_SYSCONFIG_ClockActivity_OFFSET    8
-
-#define MMU_MMU_SYSCONFIG_IdleMode_MASK    0x18
-#define MMU_MMU_SYSCONFIG_IdleMode_OFFSET    3
-
-#define MMU_MMU_SYSCONFIG_SoftReset_MASK    0x2
-#define MMU_MMU_SYSCONFIG_SoftReset_OFFSET    1
-
-#define MMU_MMU_SYSCONFIG_AutoIdle_MASK    0x1
-#define MMU_MMU_SYSCONFIG_AutoIdle_OFFSET    0
-
-#define MMU_MMU_SYSSTATUS_ResetDone_MASK    0x1
-#define MMU_MMU_SYSSTATUS_ResetDone_OFFSET    0
-
-#define MMU_MMU_IRQSTATUS_MultiHitFault_MASK    0x10
-#define MMU_MMU_IRQSTATUS_MultiHitFault_OFFSET    4
-
-#define MMU_MMU_IRQSTATUS_TableWalkFault_MASK    0x8
-#define MMU_MMU_IRQSTATUS_TableWalkFault_OFFSET    3
-
-#define MMU_MMU_IRQSTATUS_EMUMiss_MASK    0x4
-#define MMU_MMU_IRQSTATUS_EMUMiss_OFFSET    2
-
-#define MMU_MMU_IRQSTATUS_TranslationFault_MASK    0x2
-#define MMU_MMU_IRQSTATUS_TranslationFault_OFFSET    1
-
-#define MMU_MMU_IRQSTATUS_TLBMiss_MASK    0x1
-#define MMU_MMU_IRQSTATUS_TLBMiss_OFFSET    0
-
-#define MMU_MMU_IRQENABLE_MultiHitFault_MASK    0x10
-#define MMU_MMU_IRQENABLE_MultiHitFault_OFFSET    4
-
-#define MMU_MMU_IRQENABLE_TableWalkFault_MASK    0x8
-#define MMU_MMU_IRQENABLE_TableWalkFault_OFFSET    3
-
-#define MMU_MMU_IRQENABLE_EMUMiss_MASK    0x4
-#define MMU_MMU_IRQENABLE_EMUMiss_OFFSET    2
-
-#define MMU_MMU_IRQENABLE_TranslationFault_MASK    0x2
-#define MMU_MMU_IRQENABLE_TranslationFault_OFFSET    1
-
-#define MMU_MMU_IRQENABLE_TLBMiss_MASK    0x1
-#define MMU_MMU_IRQENABLE_TLBMiss_OFFSET    0
-
-#define MMU_MMU_WALKING_ST_TWLRunning_MASK    0x1
-#define MMU_MMU_WALKING_ST_TWLRunning_OFFSET    0
-
-#define MMU_MMU_CNTL_EmuTLBUpdate_MASK    0x8
-#define MMU_MMU_CNTL_EmuTLBUpdate_OFFSET    3
-
-#define MMU_MMU_CNTL_TWLEnable_MASK    0x4
-#define MMU_MMU_CNTL_TWLEnable_OFFSET    2
-
-#define MMU_MMU_CNTL_MMUEnable_MASK    0x2
-#define MMU_MMU_CNTL_MMUEnable_OFFSET    1
-
-#define MMU_MMU_FAULT_AD_FaultAddress_MASK    0xffffffff
-#define MMU_MMU_FAULT_AD_FaultAddress_OFFSET    0
-
-#define MMU_MMU_TTB_TTBAddress_MASK    0xffffff00
-#define MMU_MMU_TTB_TTBAddress_OFFSET    8
-
-#define MMU_MMU_LOCK_BaseValue_MASK    0xfc00
-#define MMU_MMU_LOCK_BaseValue_OFFSET    10
-
-#define MMU_MMU_LOCK_CurrentVictim_MASK    0x3f0
-#define MMU_MMU_LOCK_CurrentVictim_OFFSET    4
-
-#define MMU_MMU_LD_TLB_LdTLBItem_MASK    0x1
-#define MMU_MMU_LD_TLB_LdTLBItem_OFFSET    0
-
-#define MMU_MMU_CAM_VATag_MASK    0xfffff000
-#define MMU_MMU_CAM_VATag_OFFSET    12
-
-#define MMU_MMU_CAM_P_MASK    0x8
-#define MMU_MMU_CAM_P_OFFSET    3
-
-#define MMU_MMU_CAM_V_MASK    0x4
-#define MMU_MMU_CAM_V_OFFSET    2
-
-#define MMU_MMU_CAM_PageSize_MASK    0x3
-#define MMU_MMU_CAM_PageSize_OFFSET    0
-
-#define MMU_MMU_RAM_PhysicalAddress_MASK    0xfffff000
-#define MMU_MMU_RAM_PhysicalAddress_OFFSET    12
-
-#define MMU_MMU_RAM_Endianness_MASK    0x200
-#define MMU_MMU_RAM_Endianness_OFFSET    9
-
-#define MMU_MMU_RAM_ElementSize_MASK    0x180
-#define MMU_MMU_RAM_ElementSize_OFFSET    7
-
-#define MMU_MMU_RAM_Mixed_MASK    0x40
-#define MMU_MMU_RAM_Mixed_OFFSET    6
-
-#define MMU_MMU_GFLUSH_GlobalFlush_MASK    0x1
-#define MMU_MMU_GFLUSH_GlobalFlush_OFFSET    0
-
-#define MMU_MMU_FLUSH_ENTRY_FlushEntry_MASK    0x1
-#define MMU_MMU_FLUSH_ENTRY_FlushEntry_OFFSET    0
-
-#define MMU_MMU_READ_CAM_VATag_MASK    0xfffff000
-#define MMU_MMU_READ_CAM_VATag_OFFSET    12
-
-#define MMU_MMU_READ_CAM_P_MASK    0x8
-#define MMU_MMU_READ_CAM_P_OFFSET    3
-
-#define MMU_MMU_READ_CAM_V_MASK    0x4
-#define MMU_MMU_READ_CAM_V_OFFSET    2
-
-#define MMU_MMU_READ_CAM_PageSize_MASK    0x3
-#define MMU_MMU_READ_CAM_PageSize_OFFSET    0
-
-#define MMU_MMU_READ_RAM_PhysicalAddress_MASK    0xfffff000
-#define MMU_MMU_READ_RAM_PhysicalAddress_OFFSET    12
-
-#define MMU_MMU_READ_RAM_Endianness_MASK    0x200
-#define MMU_MMU_READ_RAM_Endianness_OFFSET    9
-
-#define MMU_MMU_READ_RAM_ElementSize_MASK    0x180
-#define MMU_MMU_READ_RAM_ElementSize_OFFSET    7
-
-#define MMU_MMU_READ_RAM_Mixed_MASK    0x40
-#define MMU_MMU_READ_RAM_Mixed_OFFSET    6
-
-#define MMU_MMU_EMU_FAULT_AD_EmuFaultAddress_MASK    0xffffffff
-#define MMU_MMU_EMU_FAULT_AD_EmuFaultAddress_OFFSET    0
-
-#endif /* _MMU_ACC_INT_H */
-/* EOF */
-
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMURegAcM.h b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/MMURegAcM.h
deleted file mode 100644 (file)
index 4e89344..0000000
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- *  @file  MMUAccInt.h
- *
- *  @brief  MMU Register access Macros
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-#ifndef _MMU_REG_ACM_H
-#define _MMU_REG_ACM_H
-
-
-
-#include <GlobalTypes.h>
-#include <MMUAccInt.h>
-
-
-/*
-* EXPORTED DEFINITIONS
-*
-*/
-
-#define MMUMMU_SYSCONFIGReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_SYSCONFIG_OFFSET))
-
-
-#define MMUMMU_SYSCONFIGWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_SYSCONFIG_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_SYSCONFIGClockActivityGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_SYSCONFIG_ClockActivity_MASK)\
-    >> MMU_MMU_SYSCONFIG_ClockActivity_OFFSET))
-
-#define mmu_sisconf_auto_idle_set32(var, value)\
-    ((((var) & ~(MMU_MMU_SYSCONFIG_AutoIdle_MASK)) |\
-    (((value) << MMU_MMU_SYSCONFIG_AutoIdle_OFFSET) &\
-    MMU_MMU_SYSCONFIG_AutoIdle_MASK)))
-
-#define MMUMMU_IRQSTATUSReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_IRQSTATUS_OFFSET))
-
-
-#define MMUMMU_IRQSTATUSWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_IRQSTATUS_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-
-#define MMUMMU_IRQENABLEReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_IRQENABLE_OFFSET))
-
-
-#define MMUMMU_IRQENABLEWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_IRQENABLE_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_IRQENABLETableWalkFaultSet32(var, value)\
-    ((((var) & ~(MMU_MMU_IRQENABLE_TableWalkFault_MASK)) |\
-    (((value) << MMU_MMU_IRQENABLE_TableWalkFault_OFFSET) &\
-    MMU_MMU_IRQENABLE_TableWalkFault_MASK)))
-
-#define MMUMMU_IRQENABLETranslationFaultRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_IRQENABLE_OFFSET)))) &\
-    MMU_MMU_IRQENABLE_TranslationFault_MASK) >>\
-    MMU_MMU_IRQENABLE_TranslationFault_OFFSET))
-
-
-
-#define MMUMMU_IRQENABLETranslationFaultSet32(var, value)\
-    ((((var) & ~(MMU_MMU_IRQENABLE_TranslationFault_MASK)) |\
-    (((value) << MMU_MMU_IRQENABLE_TranslationFault_OFFSET) &\
-    MMU_MMU_IRQENABLE_TranslationFault_MASK)))
-
-
-#define MMUMMU_IRQENABLETLBMissRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_IRQENABLE_OFFSET)))) &\
-    MMU_MMU_IRQENABLE_TLBMiss_MASK) >>\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET))
-
-
-#define MMUMMU_IRQENABLETLBMissReadIsTrMissIntM32(base_address)\
-    ((MMUMMU_IRQENABLETLBMissTrMissIntM == (MMUMMU_IRQENABLETLBMissE)\
-    (((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_IRQENABLE_OFFSET)))) &\
-    MMU_MMU_IRQENABLE_TLBMiss_MASK) >>\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET)))
-
-
-#define MMUMMU_IRQENABLETLBMissReadIsTrMissGInt32(base_address)\
-    ((MMUMMU_IRQENABLETLBMissTrMissGInt == (MMUMMU_IRQENABLETLBMissE)\
-    (((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_IRQENABLE_OFFSET)))) &\
-    MMU_MMU_IRQENABLE_TLBMiss_MASK) >>\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET)))
-
-
-#define MMUMMU_IRQENABLETLBMissGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_IRQENABLE_TLBMiss_MASK)\
-    >> MMU_MMU_IRQENABLE_TLBMiss_OFFSET))
-
-
-#define MMUMMU_IRQENABLETLBMissIsTrMissIntM32(var)\
-    ((MMUMMU_IRQENABLETLBMissTrMissIntM == \
-    (MMUMMU_IRQENABLETLBMissE)(((var) & MMU_MMU_IRQENABLE_TLBMiss_MASK) >>\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET)))
-
-#define MMUMMU_IRQENABLETLBMissIsTrMissGInt32(var)\
-    ((MMUMMU_IRQENABLETLBMissTrMissGInt ==\
-    (MMUMMU_IRQENABLETLBMissE)(((var) & MMU_MMU_IRQENABLE_TLBMiss_MASK) >>\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET)))
-
-#define MMUMMU_IRQENABLETLBMissWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_IRQENABLE_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_IRQENABLE_TLBMiss_MASK);\
-    newValue <<= MMU_MMU_IRQENABLE_TLBMiss_OFFSET;\
-    newValue &= MMU_MMU_IRQENABLE_TLBMiss_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-
-#define MMUMMU_IRQENABLETLBMissWriteTrMissIntM32(base_address)\
-{\
-    const UInt32 offset = MMU_MMU_IRQENABLE_OFFSET;\
-    const UInt32 newValue = (UInt32)MMUMMU_IRQENABLETLBMissTrMissIntM <<\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE(base_address+offset);\
-    data &= ~(MMU_MMU_IRQENABLE_TLBMiss_MASK);\
-        data |= newValue;\
-    WR_MEM_32_VOLATILE(base_address+offset, data);\
-}
-
-
-#define MMUMMU_IRQENABLETLBMissWriteTrMissGInt32(base_address)\
-{\
-    const UInt32 offset = MMU_MMU_IRQENABLE_OFFSET;\
-    const UInt32 newValue = (UInt32)MMUMMU_IRQENABLETLBMissTrMissGInt <<\
-    MMU_MMU_IRQENABLE_TLBMiss_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE(base_address+offset);\
-    data &= ~(MMU_MMU_IRQENABLE_TLBMiss_MASK);\
-    data |= newValue;\
-    WR_MEM_32_VOLATILE(base_address+offset, data);\
-}
-
-
-#define MMUMMU_IRQENABLETLBMissSet32(var, value)\
-    ((((var) & ~(MMU_MMU_IRQENABLE_TLBMiss_MASK)) |\
-    (((value) << MMU_MMU_IRQENABLE_TLBMiss_OFFSET) &\
-    MMU_MMU_IRQENABLE_TLBMiss_MASK)))
-
-
-#define MMUMMU_WALKING_STTWLRunningRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_WALKING_ST_OFFSET)))) &\
-    MMU_MMU_WALKING_ST_TWLRunning_MASK) >>\
-    MMU_MMU_WALKING_ST_TWLRunning_OFFSET))
-
-
-
-#define MMUMMU_CNTLTWLEnableRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_CNTL_OFFSET)))) &\
-    MMU_MMU_CNTL_TWLEnable_MASK) >>\
-    MMU_MMU_CNTL_TWLEnable_OFFSET))
-
-
-#define MMUMMU_CNTLTWLEnableWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_CNTL_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_CNTL_TWLEnable_MASK);\
-    newValue <<= MMU_MMU_CNTL_TWLEnable_OFFSET;\
-    newValue &= MMU_MMU_CNTL_TWLEnable_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-
-#define MMUMMU_CNTLMMUEnableWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_CNTL_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_CNTL_MMUEnable_MASK);\
-    newValue <<= MMU_MMU_CNTL_MMUEnable_OFFSET;\
-    newValue &= MMU_MMU_CNTL_MMUEnable_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-
-#define MMUMMU_FAULT_ADReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_FAULT_AD_OFFSET))
-
-
-#define MMUMMU_FAULT_ADFaultAddressRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_FAULT_AD_OFFSET)))) &\
-    MMU_MMU_FAULT_AD_FaultAddress_MASK) >>\
-    MMU_MMU_FAULT_AD_FaultAddress_OFFSET))
-
-#define MMUMMU_FAULT_ADFaultAddressGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_FAULT_AD_FaultAddress_MASK)\
-    >> MMU_MMU_FAULT_AD_FaultAddress_OFFSET))
-
-
-#define MMUMMU_TTBReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_TTB_OFFSET))
-
-#define MMUMMU_TTBWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_TTB_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_TTBTTBAddressRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_TTB_OFFSET)))) &\
-    MMU_MMU_TTB_TTBAddress_MASK) >>\
-    MMU_MMU_TTB_TTBAddress_OFFSET))
-
-#define MMUMMU_TTBTTBAddressGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_TTB_TTBAddress_MASK)\
-    >> MMU_MMU_TTB_TTBAddress_OFFSET))
-
-
-#define MMUMMU_TTBTTBAddressWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_TTB_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_TTB_TTBAddress_MASK);\
-    newValue <<= MMU_MMU_TTB_TTBAddress_OFFSET;\
-    newValue &= MMU_MMU_TTB_TTBAddress_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-#define MMUMMU_TTBTTBAddressSet32(var, value)\
-    ((((var) & ~(MMU_MMU_TTB_TTBAddress_MASK)) |\
-    (((value) << MMU_MMU_TTB_TTBAddress_OFFSET) &\
-    MMU_MMU_TTB_TTBAddress_MASK)))
-
-
-#define mmu_lckread_reg_32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_LOCK_OFFSET))
-
-#define mmu_lck_write_reg32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_LOCK_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-
-#define MMUMMU_LOCKBaseValueRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_LOCK_OFFSET)))) &\
-    MMU_MMU_LOCK_BaseValue_MASK) >>\
-    MMU_MMU_LOCK_BaseValue_OFFSET))
-#define MMUMMU_LOCKBaseValueGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_LOCK_BaseValue_MASK)\
-    >> MMU_MMU_LOCK_BaseValue_OFFSET))
-
-
-#define MMUMMU_LOCKBaseValueWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_LOCK_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_LOCK_BaseValue_MASK);\
-    newValue <<= MMU_MMU_LOCK_BaseValue_OFFSET;\
-    newValue &= MMU_MMU_LOCK_BaseValue_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-
-#define MMUMMU_LOCKBaseValueSet32(var, value)\
-    ((((var) & ~(MMU_MMU_LOCK_BaseValue_MASK)) |\
-    (((value) << MMU_MMU_LOCK_BaseValue_OFFSET) &\
-    MMU_MMU_LOCK_BaseValue_MASK)))
-
-#define MMUMMU_LOCKCurrentVictimRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_LOCK_OFFSET)))) &\
-    MMU_MMU_LOCK_CurrentVictim_MASK) >>\
-    MMU_MMU_LOCK_CurrentVictim_OFFSET))
-
-
-#define MMUMMU_LOCKCurrentVictimGet32(var)\
-    ((UInt32)(((var) & MMU_MMU_LOCK_CurrentVictim_MASK)\
-    >> MMU_MMU_LOCK_CurrentVictim_OFFSET))
-
-
-#define mmu_lck_crnt_vctmwite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_LOCK_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_LOCK_CurrentVictim_MASK);\
-    newValue <<= MMU_MMU_LOCK_CurrentVictim_OFFSET;\
-    newValue &= MMU_MMU_LOCK_CurrentVictim_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-
-#define MMUMMU_LOCKCurrentVictimSet32(var, value)\
-    ((((var) & ~(MMU_MMU_LOCK_CurrentVictim_MASK)) |\
-    (((value) << MMU_MMU_LOCK_CurrentVictim_OFFSET) &\
-    MMU_MMU_LOCK_CurrentVictim_MASK)))
-
-
-#define MMUMMU_LD_TLBReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_LD_TLB_OFFSET))
-
-#define mmu_ld_tlbwrt_reg32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_LD_TLB_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_LD_TLBLdTLBItemRead32(base_address)\
-    ((((RD_MEM_32_VOLATILE(((base_address)+(MMU_MMU_LD_TLB_OFFSET)))) &\
-    MMU_MMU_LD_TLB_LdTLBItem_MASK) >>\
-    MMU_MMU_LD_TLB_LdTLBItem_OFFSET))
-
-
-#define MMUMMU_CAMReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_READ_CAM_OFFSET))
-
-
-#define MMUMMU_CAMWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_CAM_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_RAMReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_READ_RAM_OFFSET))
-
-
-#define MMUMMU_RAMWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_RAM_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-#define MMUMMU_GFLUSHGlobalFlushWrite32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_GFLUSH_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE((base_address)+offset);\
-    register UInt32 newValue = (value);\
-    data &= ~(MMU_MMU_GFLUSH_GlobalFlush_MASK);\
-    newValue <<= MMU_MMU_GFLUSH_GlobalFlush_OFFSET;\
-    newValue &= MMU_MMU_GFLUSH_GlobalFlush_MASK;\
-    newValue |= data;\
-    WR_MEM_32_VOLATILE(base_address+offset, newValue);\
-}
-
-#define MMUMMU_GFLUSHGlobalFlushWritenft_w32(base_address)\
-{\
-        const UInt32 offset = MMU_MMU_GFLUSH_OFFSET;\
-    const UInt32 newValue = (UInt32)MMUMMU_GFLUSHGlobalFlushnft_w <<\
-    MMU_MMU_GFLUSH_GlobalFlush_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE(base_address+offset);\
-    data &= ~(MMU_MMU_GFLUSH_GlobalFlush_MASK);\
-    data |= newValue;\
-    WR_MEM_32_VOLATILE(base_address+offset, data);\
-}
-
-#define MMUMMU_GFLUSHGlobalFlushWriteflush_w32(base_address)\
-{\
-    const UInt32 offset = MMU_MMU_GFLUSH_OFFSET;\
-    const UInt32 newValue = (UInt32)MMUMMU_GFLUSHGlobalFlushflush_w <<\
-    MMU_MMU_GFLUSH_GlobalFlush_OFFSET;\
-    register UInt32 data = RD_MEM_32_VOLATILE(base_address+offset);\
-    data &= ~(MMU_MMU_GFLUSH_GlobalFlush_MASK);\
-    data |= newValue;\
-    WR_MEM_32_VOLATILE(base_address+offset, data);\
-}
-
-
-#define MMUMMU_GFLUSHGlobalFlushSet32(var, value)\
-    ((((var) & ~(MMU_MMU_GFLUSH_GlobalFlush_MASK)) |\
-    (((value) << MMU_MMU_GFLUSH_GlobalFlush_OFFSET) &\
-    MMU_MMU_GFLUSH_GlobalFlush_MASK)))
-
-#define MMUMMU_FLUSH_ENTRYReadRegister32(base_address)\
-    (RD_MEM_32_VOLATILE((base_address)+MMU_MMU_FLUSH_ENTRY_OFFSET))
-
-
-#define MMUMMU_FLUSH_ENTRYWriteRegister32(base_address, value)\
-{\
-    const UInt32 offset = MMU_MMU_FLUSH_ENTRY_OFFSET;\
-    register UInt32 newValue = (value);\
-    WR_MEM_32_VOLATILE((base_address)+offset, newValue);\
-}
-
-
-
-
-#endif /* _MMU_REG_ACM_H */
-/* EOF */
-
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/OMAP4430DucatiPhyShmem.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/OMAP4430DucatiPhyShmem.c
deleted file mode 100644 (file)
index 6449f64..0000000
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- *  @file   OMAP4430DucatiPhyShmem.c
- *
- *  @brief      Qnx shared memory physical interface file for OMAP4430Ducati.
- *
- *              This module is responsible for handling boot-related hardware-
- *              specific operations.
- *              The implementation is specific to OMAP4430Ducati.
- *
- *
- *  @ver        02.00.00.44_pre-alpha3
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2009, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* Module headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* OSAL and utils */
-#include <ti/syslink/utils/Trace.h>
-
-/* Hardware Abstraction Layer headers */
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalReset.h>
-#include <OMAP4430DucatiPhyShmem.h>
-#include <OMAP4430DucatiHalMmu.h>
-#include <hw/inout.h>
-
-#define INREG32(x) in32(x)
-#define OUTREG32(x, y) out32(x, y)
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-
-/* =============================================================================
- * APIs called by OMAP4430DucatiPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize Shared Driver/device.
- *
- *  @param      halObj      Pointer to the HAL object
- *  @param      addrInfo    Pointer to address info
- *
- *  @sa         OMAP4430DUCATI_phyShmemExit
- *              Memory_map
- */
-Int
-OMAP4430DUCATI_phyShmemInit (Ptr halObj, ProcMgr_AddrInfo *addrInfo)
-{
-    Int                        status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-    Memory_MapInfo             mapInfo;
-    Memory_UnmapInfo           unmapInfo;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATI_phyShmemInit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (addrInfo != NULL));
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj;
-
-    /* Map code base */
-    mapInfo.src      = addrInfo[0].addr[ProcMgr_AddrType_MasterPhys];
-    mapInfo.size     = addrInfo[0].size;
-    mapInfo.isCached = FALSE;
-    status = Memory_map (&mapInfo);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATI_phyShmemInit",
-                             status,
-                             "Failure in Memory_map for Code base registers");
-        halObject->CodeBase = 0;
-    }
-    else {
-        halObject->CodeBase = mapInfo.dst;
-        addrInfo[0].addr[ProcMgr_AddrType_MasterKnlVirt] = mapInfo.dst;
-
-        /* Map M3 Base */
-        mapInfo.src      = addrInfo[1].addr[ProcMgr_AddrType_MasterPhys];
-        mapInfo.size     = addrInfo[1].size;
-        mapInfo.isCached = FALSE;
-        status = Memory_map (&mapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP5430DUCATI_phyShmemInit",
-                                 status,
-                                 "Failure in Memory_map for M3 base");
-            halObject->M3Base= 0;
-
-            unmapInfo.addr     = halObject->CodeBase;
-            unmapInfo.size     = addrInfo[0].size;
-            unmapInfo.isCached = FALSE;
-            Memory_unmap (&unmapInfo);
-            halObject->CodeBase = 0;
-        }
-        else{
-            halObject->M3Base = mapInfo.dst;
-            addrInfo[1].addr[ProcMgr_AddrType_MasterKnlVirt] = mapInfo.dst;
-
-            /* Map Const Base */
-            mapInfo.src      = addrInfo[2].addr[ProcMgr_AddrType_MasterPhys];
-            mapInfo.size     = addrInfo[2].size;
-            mapInfo.isCached = FALSE;
-            status = Memory_map (&mapInfo);
-            if (status < 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATI_phyShmemInit",
-                                     status,
-                                     "Failure in Memory_map for Const base");
-                halObject->ConstBase= 0;
-
-                unmapInfo.addr     = halObject->M3Base;
-                unmapInfo.size     = addrInfo[1].size;
-                unmapInfo.isCached = FALSE;
-                Memory_unmap (&unmapInfo);
-                halObject->M3Base= 0;
-
-                unmapInfo.addr     = halObject->CodeBase;
-                unmapInfo.size     = addrInfo[0].size;
-                unmapInfo.isCached = FALSE;
-                Memory_unmap (&unmapInfo);
-                halObject->CodeBase = 0;
-            }
-            else {
-                halObject->ConstBase = mapInfo.dst;
-                addrInfo[2].addr[ProcMgr_AddrType_MasterKnlVirt] = mapInfo.dst;
-
-                /* Map MMU base */
-                mapInfo.src      = OMAP4_MMU1_BASE;
-                mapInfo.size     = OMAP4_MMU1_SIZE;
-                mapInfo.isCached = FALSE;
-                status = Memory_map (&mapInfo);
-                if (status < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "OMAP4430DUCATI_phyShmemInit",
-                                         status,
-                                         "Failure in Memory_map for MMU base");
-                    halObject->mmuBase = 0;
-
-                    unmapInfo.addr     = halObject->ConstBase;
-                    unmapInfo.size     = addrInfo[2].size;
-                    unmapInfo.isCached = FALSE;
-                    Memory_unmap (&unmapInfo);
-                    halObject->ConstBase = 0;
-
-                    unmapInfo.addr     = halObject->M3Base;
-                    unmapInfo.size     = addrInfo[1].size;
-                    unmapInfo.isCached = FALSE;
-                    Memory_unmap (&unmapInfo);
-                    halObject->M3Base = 0;
-
-                    unmapInfo.addr     = halObject->CodeBase;
-                    unmapInfo.size     = addrInfo[0].size;
-                    unmapInfo.isCached = FALSE;
-                    Memory_unmap (&unmapInfo);
-                    halObject->CodeBase = 0;
-                }
-                else {
-                    halObject->mmuBase = mapInfo.dst;
-                }
-            }
-        }
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_phyShmemInit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize Shared Driver/device.
- *
- *  @param      halObj      Pointer to the HAL object
- *  @param      addrInfo    Pointer to addr info
- *
- *  @sa         OMAP4430DUCATI_phyShmemInit
- *              Memory_Unmap
- */
-Int OMAP4430DUCATI_phyShmemExit (Ptr halObj, ProcMgr_AddrInfo * addrInfo)
-{
-    Int                        status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-    Memory_UnmapInfo           unmapInfo;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATI_phyShmemExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (addrInfo != NULL));
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj;
-
-    unmapInfo.addr = halObject->mmuBase;
-    unmapInfo.size = MMU_SIZE;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "OMAP4430DUCATI_phyShmemExit",
-                              status,
-                              "Failure in Memory_Unmap for MMU base");
-        }
-        halObject->mmuBase = 0;
-    }
-
-    /* Map Const Base */
-    unmapInfo.addr     = halObject->ConstBase;
-    unmapInfo.size     = addrInfo[2].size;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_phyShmemExit",
-                                 status,
-                                 "Failure in Memory_unmap for const base");
-        }
-        halObject->ConstBase = 0;
-    }
-
-    /* Map M3 Base */
-    unmapInfo.addr     = halObject->M3Base;
-    unmapInfo.size     = addrInfo[1].size;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_phyShmemExit",
-                                 status,
-                                 "Failure in Memory_unmap for M3 base");
-        }
-        halObject->M3Base = 0;
-    }
-
-    /* Un-Map code base */
-    unmapInfo.addr     = halObject->CodeBase;
-    unmapInfo.size     = addrInfo[0].size;
-    unmapInfo.isCached = FALSE;
-    if (unmapInfo.addr != 0) {
-        status = Memory_unmap (&unmapInfo);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_phyShmemExit",
-                                 status,
-                                 "Failure in Memory_unmap for code base");
-        }
-        halObject->CodeBase = 0;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_phyShmemExit",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_defs.h b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_defs.h
deleted file mode 100644 (file)
index b07378c..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *  @file  hw_defs.h
- *
- *  @brief  Definitions required for HW module
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-#ifndef __HW_DEFS_H
-#define __HW_DEFS_H
-
-#include <GlobalTypes.h>
-
-/* Page size */
-#define HW_PAGE_SIZE_4KB   0x1000
-#define HW_PAGE_SIZE_64KB  0x10000
-#define HW_PAGE_SIZE_1MB   0x100000
-#define HW_PAGE_SIZE_16MB  0x1000000
-
-/* hw_status:  return type for HW API */
-typedef long hw_status;
-
-/* hw_set_clear_t:  Enumerated Type used to set and clear any bit */
-enum hw_set_clear_t {
-    HW_CLEAR,
-    HW_SET
-} ;
-
-/* hw_endianism_t:  Enumerated Type used to specify the endianism
- *        Do NOT change these values. They are used as bit fields. */
-enum hw_endianism_t {
-    HW_LITTLE_ENDIAN,
-    HW_BIG_ENDIAN
-
-} ;
-
-/* hw_elemnt_siz_t:  Enumerated Type used to specify the element size
- *        Do NOT change these values. They are used as bit fields. */
-enum hw_elemnt_siz_t {
-    HW_ELEM_SIZE_8BIT,
-    HW_ELEM_SIZE_16BIT,
-    HW_ELEM_SIZE_32BIT,
-    HW_ELEM_SIZE_64BIT
-
-} ;
-
-/* HW_IdleMode_t:  Enumerated Type used to specify Idle modes */
-enum HW_IdleMode_t {
-    HW_FORCE_IDLE,
-    HW_NO_IDLE,
-    HW_SMART_IDLE
-} ;
-
-#endif  /* __HW_DEFS_H */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.c
deleted file mode 100644 (file)
index 6b9da69..0000000
+++ /dev/null
@@ -1,597 +0,0 @@
-/*
- *  @file  hw_mbox.c
- *
- *  @brief  Functions required to program MMU
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-
-#include <ti/syslink/Std.h>
-#include <GlobalTypes.h>
-#include <MMURegAcM.h>
-#include <hw_defs.h>
-#include <hw_mmu.h>
-
-#define MMU_BASE_VAL_MASK        0xFC00
-#define MMU_PAGE_MAX             3
-#define MMU_ELEMENTSIZE_MAX      3
-#define MMU_ADDR_MASK            0xFFFFF000
-#define MMU_TTB_MASK             0xFFFFC000
-#define MMU_SECTION_ADDR_MASK    0xFFF00000
-#define MMU_SSECTION_ADDR_MASK   0xFF000000
-#define MMU_PAGE_TABLE_MASK      0xFFFFFC00
-#define MMU_LARGE_PAGE_MASK      0xFFFF0000
-#define MMU_SMALL_PAGE_MASK      0xFFFFF000
-
-#define MMU_LOAD_TLB        0x00000001
-#define NUM_TLB_ENTRIES 32
-
-/*
-* type: hw_mmu_pgsiz_t
-*
-* desc:  Enumerated Type used to specify the MMU Page Size(SLSS)
-*
-*
-*/
-enum hw_mmu_pgsiz_t {
-    HW_MMU_SECTION,
-    HW_MMU_LARGE_PAGE,
-    HW_MMU_SMALL_PAGE,
-    HW_MMU_SUPERSECTION
-
-};
-
-/*
-* function : mmu_flsh_entry
-*/
-
-static hw_status mmu_flsh_entry(const UInt32   base_address);
-
- /*
-* function : mme_set_cam_entry
-*
-*/
-
-static hw_status mme_set_cam_entry(const UInt32    base_address,
-    const UInt32    page_size,
-    const UInt32    preserve_bit,
-    const UInt32    valid_bit,
-    const UInt32    virt_addr_tag);
-
-/*
-* function  : mmu_set_ram_entry
-*/
-static hw_status mmu_set_ram_entry(const UInt32        base_address,
-    const UInt32        physical_addr,
-    enum hw_endianism_t      endianism,
-    enum hw_elemnt_siz_t    element_size,
-    enum hw_mmu_mixed_size_t   mixedSize);
-
-/*
-* hw functions
-*
-*/
-
-hw_status hw_mmu_enable(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_CNTLMMUEnableWrite32(base_address, HW_SET);
-
-    return status;
-}
-
-hw_status hw_mmu_disable(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_CNTLMMUEnableWrite32(base_address, HW_CLEAR);
-
-    return status;
-}
-
-hw_status hw_mmu_nulck_set(const UInt32 base_address, UInt32 *num_lcked_entries)
-{
-    hw_status status = RET_OK;
-
-    *num_lcked_entries = MMUMMU_LOCKBaseValueRead32(base_address);
-
-    return status;
-}
-
-
-hw_status hw_mmu_numlocked_set(const UInt32 base_address, UInt32 num_lcked_entries)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_LOCKBaseValueWrite32(base_address, num_lcked_entries);
-
-    return status;
-}
-
-
-
-hw_status hw_mmu_vctm_numget(const UInt32 base_address, UInt32 *vctm_entry_num)
-{
-    hw_status status = RET_OK;
-
-    *vctm_entry_num = MMUMMU_LOCKCurrentVictimRead32(base_address);
-
-    return status;
-}
-
-
-
-hw_status hw_mmu_victim_numset(const UInt32 base_address, UInt32 vctm_entry_num)
-{
-    hw_status status = RET_OK;
-
-    mmu_lck_crnt_vctmwite32(base_address, vctm_entry_num);
-
-    return status;
-}
-
-hw_status hw_mmu_tlb_flushAll(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_GFLUSHGlobalFlushWrite32(base_address, HW_SET);
-
-    return status;
-}
-
-hw_status hw_mmu_eventack(const UInt32 base_address, UInt32 irq_mask)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_IRQSTATUSWriteRegister32(base_address, irq_mask);
-
-    return status;
-}
-
-hw_status hw_mmu_event_disable(const UInt32 base_address, UInt32 irq_mask)
-{
-    hw_status status = RET_OK;
-    UInt32 irqReg;
-    irqReg = MMUMMU_IRQENABLEReadRegister32(base_address);
-
-    MMUMMU_IRQENABLEWriteRegister32(base_address, irqReg & ~irq_mask);
-
-    return status;
-}
-
-hw_status hw_mmu_event_enable(const UInt32 base_address, UInt32 irq_mask)
-{
-    hw_status status = RET_OK;
-    UInt32 irqReg;
-
-    irqReg = MMUMMU_IRQENABLEReadRegister32(base_address);
-
-    MMUMMU_IRQENABLEWriteRegister32(base_address, irqReg | irq_mask);
-
-    return status;
-}
-
-hw_status hw_mmu_event_status(const UInt32 base_address, UInt32 *irq_mask)
-{
-    hw_status status = RET_OK;
-
-    *irq_mask = MMUMMU_IRQSTATUSReadRegister32(base_address);
-
-    return status;
-}
-
-hw_status hw_mmu_flt_adr_rd(const UInt32 base_address, UInt32 *addr)
-{
-    hw_status status = RET_OK;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                    RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-    /* read values from register */
-    *addr = MMUMMU_FAULT_ADReadRegister32(base_address);
-
-    return status;
-}
-
-
-hw_status hw_mmu_ttbset(const UInt32 base_address, UInt32 ttb_phys_addr)
-{
-    hw_status status = RET_OK;
-    UInt32 loadTTB;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                    RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-
-    loadTTB = ttb_phys_addr & ~0x7FUL;
-    /* write values to register */
-    MMUMMU_TTBWriteRegister32(base_address, loadTTB);
-
-    return status;
-}
-
-hw_status hw_mmu_twl_enable(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_CNTLTWLEnableWrite32(base_address, HW_SET);
-
-    return status;
-}
-
-hw_status hw_mmu_twl_disable(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-
-    MMUMMU_CNTLTWLEnableWrite32(base_address, HW_CLEAR);
-
-    return status;
-}
-
-
-hw_status hw_mmu_tlb_flush(const UInt32 base_address,
-    UInt32 virtual_addr,
-    UInt32 page_size)
-{
-    hw_status status = RET_OK;
-    UInt32 virt_addr_tag;
-    enum hw_mmu_pgsiz_t pg_sizeBits;
-
-    switch (page_size) {
-    case HW_PAGE_SIZE_4KB:
-    pg_sizeBits = HW_MMU_SMALL_PAGE;
-    break;
-
-    case HW_PAGE_SIZE_64KB:
-    pg_sizeBits = HW_MMU_LARGE_PAGE;
-    break;
-
-    case HW_PAGE_SIZE_1MB:
-    pg_sizeBits = HW_MMU_SECTION;
-    break;
-
-    case HW_PAGE_SIZE_16MB:
-    pg_sizeBits = HW_MMU_SUPERSECTION;
-    break;
-
-    default:
-    return RET_FAIL;
-    }
-
-    /* Generate the 20-bit tag from virtual address */
-    virt_addr_tag = ((virtual_addr & MMU_ADDR_MASK) >> 12);
-
-    mme_set_cam_entry(base_address, pg_sizeBits, 0, 0, virt_addr_tag);
-
-    mmu_flsh_entry(base_address);
-
-    return status;
-}
-
-
-hw_status hw_mmu_tlb_add(const UInt32        base_address,
-    UInt32              physical_addr,
-    UInt32              virtual_addr,
-    UInt32              page_size,
-    UInt32              entryNum,
-    struct hw_mmu_map_attrs_t    *map_attrs,
-    enum hw_set_clear_t       preserve_bit,
-    enum hw_set_clear_t       valid_bit)
-{
-    hw_status  status = RET_OK;
-    UInt32 lockReg;
-    UInt32 virt_addr_tag;
-    enum hw_mmu_pgsiz_t mmu_pg_size;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-    CHECK_INPUT_RANGE_MIN0(page_size, MMU_PAGE_MAX, RET_PARAM_OUT_OF_RANGE,
-                RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-    CHECK_INPUT_RANGE_MIN0(map_attrs->element_size,
-            MMU_ELEMENTSIZE_MAX, RET_PARAM_OUT_OF_RANGE,
-                RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-
-        switch (page_size) {
-        case HW_PAGE_SIZE_4KB:
-        mmu_pg_size = HW_MMU_SMALL_PAGE;
-        break;
-
-        case HW_PAGE_SIZE_64KB:
-        mmu_pg_size = HW_MMU_LARGE_PAGE;
-        break;
-
-        case HW_PAGE_SIZE_1MB:
-        mmu_pg_size = HW_MMU_SECTION;
-        break;
-
-        case HW_PAGE_SIZE_16MB:
-        mmu_pg_size = HW_MMU_SUPERSECTION;
-        break;
-
-        default:
-        return RET_FAIL;
-        }
-
-    lockReg = mmu_lckread_reg_32(base_address);
-
-    /* Generate the 20-bit tag from virtual address */
-    virt_addr_tag = ((virtual_addr & MMU_ADDR_MASK) >> 12);
-
-    /* Write the fields in the CAM Entry Register */
-    mme_set_cam_entry(base_address,  mmu_pg_size, preserve_bit, valid_bit,
-    virt_addr_tag);
-
-    /* Write the different fields of the RAM Entry Register */
-    /* endianism of the page,Element Size of the page (8, 16, 32, 64 bit) */
-    mmu_set_ram_entry(base_address, physical_addr,
-    map_attrs->endianism, map_attrs->element_size, map_attrs->mixedSize);
-
-    /* Update the MMU Lock Register */
-    /* currentVictim between lockedBaseValue and (MMU_Entries_Number - 1) */
-    mmu_lck_crnt_vctmwite32(base_address, entryNum);
-
-    /* Enable loading of an entry in TLB by writing 1 into LD_TLB_REG
-    register */
-    mmu_ld_tlbwrt_reg32(base_address, MMU_LOAD_TLB);
-
-
-    mmu_lck_write_reg32(base_address, lockReg);
-
-    return status;
-}
-
-
-
-hw_status hw_mmu_pte_set(const UInt32        pg_tbl_va,
-    UInt32              physical_addr,
-    UInt32              virtual_addr,
-    UInt32              page_size,
-    struct hw_mmu_map_attrs_t    *map_attrs)
-{
-    hw_status status = RET_OK;
-    UInt32 pte_addr, pte_val;
-    long int num_entries = 1;
-
-    switch (page_size) {
-
-    case HW_PAGE_SIZE_4KB:
-    pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va, virtual_addr &
-        MMU_SMALL_PAGE_MASK);
-    pte_val = ((physical_addr & MMU_SMALL_PAGE_MASK) |
-    (map_attrs->endianism << 9) |
-    (map_attrs->element_size << 4) |
-    (map_attrs->mixedSize << 11) | 2
-    );
-    break;
-
-    case HW_PAGE_SIZE_64KB:
-    num_entries = 16;
-    pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va, virtual_addr &
-        MMU_LARGE_PAGE_MASK);
-    pte_val = ((physical_addr & MMU_LARGE_PAGE_MASK) |
-    (map_attrs->endianism << 9) |
-    (map_attrs->element_size << 4) |
-    (map_attrs->mixedSize << 11) | 1
-    );
-    break;
-
-    case HW_PAGE_SIZE_1MB:
-    pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va, virtual_addr &
-        MMU_SECTION_ADDR_MASK);
-    pte_val = ((((physical_addr & MMU_SECTION_ADDR_MASK) |
-    (map_attrs->endianism << 15) |
-    (map_attrs->element_size << 10) |
-    (map_attrs->mixedSize << 17)) &
-    ~0x40000) | 0x2
-    );
-    break;
-
-    case HW_PAGE_SIZE_16MB:
-    num_entries = 16;
-    pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va, virtual_addr &
-        MMU_SSECTION_ADDR_MASK);
-    pte_val = ((physical_addr & MMU_SSECTION_ADDR_MASK) |0x40022);
-    break;
-
-    case HW_MMU_COARSE_PAGE_SIZE:
-    pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va, virtual_addr &
-        MMU_SECTION_ADDR_MASK);
-    pte_val = (physical_addr & MMU_PAGE_TABLE_MASK) | 1;
-    break;
-
-    default:
-    return RET_FAIL;
-    }
-
-    while (--num_entries >= 0)
-        ((ULONG*)pte_addr)[num_entries] = pte_val;
-
-
-    return status;
-}
-
-hw_status hw_mmu_pte_clear(const UInt32  pg_tbl_va,
-    UInt32        virtual_addr,
-    UInt32        pg_size)
-{
-    hw_status status = RET_OK;
-    UInt32 pte_addr;
-    long int num_entries = 1;
-
-    switch (pg_size) {
-    case HW_PAGE_SIZE_4KB:
-    pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
-            virtual_addr & MMU_SMALL_PAGE_MASK);
-    break;
-
-    case HW_PAGE_SIZE_64KB:
-    num_entries = 16;
-    pte_addr = hw_mmu_pte_addr_l2(pg_tbl_va,
-            virtual_addr & MMU_LARGE_PAGE_MASK);
-    break;
-
-    case HW_PAGE_SIZE_1MB:
-    case HW_MMU_COARSE_PAGE_SIZE:
-    pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
-            virtual_addr & MMU_SECTION_ADDR_MASK);
-    break;
-
-    case HW_PAGE_SIZE_16MB:
-    num_entries = 16;
-    pte_addr = hw_mmu_pte_addr_l1(pg_tbl_va,
-            virtual_addr & MMU_SSECTION_ADDR_MASK);
-    break;
-
-    default:
-    return RET_FAIL;
-    }
-
-    while (--num_entries >= 0)
-        ((UInt32 *)pte_addr)[num_entries] = 0;
-
-    return status;
-}
-
-/*
-* function: mmu_flsh_entry
-*/
-static hw_status mmu_flsh_entry(const UInt32 base_address)
-{
-    hw_status status = RET_OK;
-    UInt32 flushEntryData = 0x1;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-
-    /* write values to register */
-    MMUMMU_FLUSH_ENTRYWriteRegister32(base_address, flushEntryData);
-
-    return status;
-}
-/*
-* function : mme_set_cam_entry
-*/
-static hw_status mme_set_cam_entry(const UInt32    base_address,
-    const UInt32    page_size,
-    const UInt32    preserve_bit,
-    const UInt32    valid_bit,
-    const UInt32    virt_addr_tag)
-{
-    hw_status status = RET_OK;
-    UInt32 mmuCamReg;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-
-    mmuCamReg = (virt_addr_tag << 12);
-    mmuCamReg = (mmuCamReg) | (page_size) |  (valid_bit << 2)
-                        | (preserve_bit << 3);
-
-    /* write values to register */
-    MMUMMU_CAMWriteRegister32(base_address, mmuCamReg);
-
-    return status;
-}
-/*
-* function: mmu_set_ram_entry
-*/
-static hw_status mmu_set_ram_entry(const UInt32       base_address,
-    const UInt32       physical_addr,
-    enum hw_endianism_t     endianism,
-    enum hw_elemnt_siz_t   element_size,
-    enum hw_mmu_mixed_size_t  mixedSize)
-{
-    hw_status status = RET_OK;
-    UInt32 mmuRamReg;
-
-    /*Check the input Parameters*/
-    CHECK_INPUT_PARAM(base_address, 0, RET_BAD_NULL_PARAM,
-                    RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-    CHECK_INPUT_RANGE_MIN0(element_size, MMU_ELEMENTSIZE_MAX,
-                    RET_PARAM_OUT_OF_RANGE,
-                    RES_MMU_BASE + RES_INVALID_INPUT_PARAM);
-
-
-    mmuRamReg = (physical_addr & MMU_ADDR_MASK);
-    mmuRamReg = (mmuRamReg) | ((endianism << 9) |  (element_size << 7)
-                    | (mixedSize << 6));
-
-    /* write values to register */
-    MMUMMU_RAMWriteRegister32(base_address, mmuRamReg);
-
-    return status;
-
-}
-
-UInt32 hw_mmu_pte_phyaddr(UInt32 pte_val, UInt32 pte_size)
-{
-    UInt32    ret_val = 0;
-
-    switch (pte_size) {
-
-    case HW_PAGE_SIZE_4KB:
-        ret_val = pte_val & MMU_SMALL_PAGE_MASK;
-        break;
-    case HW_PAGE_SIZE_64KB:
-        ret_val = pte_val & MMU_LARGE_PAGE_MASK;
-        break;
-
-    case HW_PAGE_SIZE_1MB:
-        ret_val = pte_val & MMU_SECTION_ADDR_MASK;
-        break;
-    case HW_PAGE_SIZE_16MB:
-        ret_val = pte_val & MMU_SSECTION_ADDR_MASK;
-        break;
-    default:
-        /*  Invalid  */
-        break;
-
-    }
-
-    return ret_val;
-}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.h b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/hw_mmu.h
deleted file mode 100644 (file)
index 7977b31..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- *  @file  hw_mbox.h
- *
- *  @brief  Functions required to program MMU
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-#ifndef __HW_MMU_H
-#define __HW_MMU_H
-
-
-/* Bitmasks for interrupt sources */
-#define HW_MMU_TRANSLATION_FAULT   0x2
-#define HW_MMU_ALL_INTERRUPTS      0x1F
-
-#define HW_MMU_COARSE_PAGE_SIZE 0x400
-
-/* hw_mmu_mixed_size_t:  Enumerated Type used to specify whether to follow
-            CPU/TLB Element size */
-enum hw_mmu_mixed_size_t {
-    HW_MMU_TLBES,
-    HW_MMU_CPUES
-
-} ;
-
-/* hw_mmu_map_attrs_t:  Struct containing MMU mapping attributes */
-struct hw_mmu_map_attrs_t {
-    enum hw_endianism_t     endianism;
-    enum hw_elemnt_siz_t   element_size;
-    enum hw_mmu_mixed_size_t  mixedSize;
-} ;
-
-extern hw_status hw_mmu_enable(const UInt32 base_address);
-
-extern hw_status hw_mmu_disable(const UInt32 base_address);
-
-extern hw_status hw_mmu_numlocked_set(const UInt32 base_address,
-                      UInt32 num_lcked_entries);
-
-extern hw_status hw_mmu_victim_numset(const UInt32 base_address,
-                      UInt32 vctm_entry_num);
-
-/* For MMU faults */
-extern hw_status hw_mmu_eventack(const UInt32 base_address,
-                 UInt32 irq_mask);
-
-extern hw_status hw_mmu_event_disable(const UInt32 base_address,
-                      UInt32 irq_mask);
-
-extern hw_status hw_mmu_event_enable(const UInt32 base_address,
-                     UInt32 irq_mask);
-
-extern hw_status hw_mmu_event_status(const UInt32 base_address,
-                     UInt32 *irq_mask);
-
-extern hw_status hw_mmu_flt_adr_rd(const UInt32 base_address,
-                   UInt32 *addr);
-
-/* Set the TT base address */
-extern hw_status hw_mmu_ttbset(const UInt32 base_address,
-                   UInt32 ttb_phys_addr);
-
-extern hw_status hw_mmu_twl_enable(const UInt32 base_address);
-
-extern hw_status hw_mmu_twl_disable(const UInt32 base_address);
-
-extern hw_status hw_mmu_tlb_flush(const UInt32 base_address,
-                  UInt32 virtual_addr,
-                  UInt32 page_size);
-
-extern hw_status hw_mmu_tlb_flushAll(const UInt32 base_address);
-
-extern hw_status hw_mmu_tlb_add(const UInt32     base_address,
-                UInt32       physical_addr,
-                UInt32       virtual_addr,
-                UInt32       page_size,
-                UInt32        entryNum,
-                struct hw_mmu_map_attrs_t *map_attrs,
-                enum hw_set_clear_t    preserve_bit,
-                enum hw_set_clear_t    valid_bit);
-
-
-/* For PTEs */
-extern hw_status hw_mmu_pte_set(const UInt32     pg_tbl_va,
-                UInt32       physical_addr,
-                UInt32       virtual_addr,
-                UInt32       page_size,
-                struct hw_mmu_map_attrs_t *map_attrs);
-
-extern hw_status hw_mmu_pte_clear(const UInt32   pg_tbl_va,
-                  UInt32     pg_size,
-                  UInt32     virtual_addr);
-
-static inline UInt32 hw_mmu_pte_addr_l1(UInt32 l1_base, UInt32 va)
-{
-    UInt32 pte_addr;
-    UInt32 VA_31_to_20;
-
-    VA_31_to_20  = va >> (20 - 2); /* Left-shift by 2 here itself */
-    VA_31_to_20 &= 0xFFFFFFFCUL;
-    pte_addr = l1_base + VA_31_to_20;
-
-    return pte_addr;
-}
-
-static inline UInt32 hw_mmu_pte_addr_l2(UInt32 l2_base, UInt32 va)
-{
-    UInt32 pte_addr;
-
-    pte_addr = (l2_base & 0xFFFFFC00) | ((va >> 10) & 0x3FC);
-
-    return pte_addr;
-}
-
-static inline UInt32 hw_mmu_pte_coarsel1(UInt32 pte_val)
-{
-    UInt32 pteCoarse;
-
-    pteCoarse = pte_val & 0xFFFFFC00;
-
-    return pteCoarse;
-}
-
-static inline UInt32 hw_mmu_pte_sizel1(UInt32 pte_val)
-{
-    UInt32 pte_size = 0;
-
-    if ((pte_val & 0x3) == 0x1) {
-        /* Points to L2 PT */
-        pte_size = HW_MMU_COARSE_PAGE_SIZE;
-    }
-
-    if ((pte_val & 0x3) == 0x2) {
-        if (pte_val & (1 << 18))
-            pte_size = HW_PAGE_SIZE_16MB;
-        else
-            pte_size = HW_PAGE_SIZE_1MB;
-    }
-
-    return pte_size;
-}
-
-static inline UInt32 hw_mmu_pte_sizel2(UInt32 pte_val)
-{
-    UInt32 pte_size = 0;
-
-    if (pte_val & 0x2)
-        pte_size = HW_PAGE_SIZE_4KB;
-    else if (pte_val & 0x1)
-        pte_size = HW_PAGE_SIZE_64KB;
-
-    return pte_size;
-}
-extern hw_status hw_mmu_tlb_dump(UInt32 base_address, BOOL shw_inv_entries);
-
-extern UInt32 hw_mmu_pte_phyaddr(UInt32 pte_val, UInt32 pte_size);
-
-#endif  /* __HW_MMU_H */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430Dmm.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430Dmm.c
deleted file mode 100644 (file)
index 1902b32..0000000
+++ /dev/null
@@ -1,393 +0,0 @@
-/*
- *  @file  omap4430Dmm.c
- *
- *  @brief  MMU programming module
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-/*
- *  ======== dmm.c ========
- *  Purpose:
- *The Dynamic Memory Manager (DMM) module manages the DSP Virtual address
- *space that can be directly mapped to any MPU buffer or memory region
- *
- * Public Functions:
- * ----------------------
- *    dmm_create_tables            -- Done
- *    dmm_create                    -- Done
- *    dmm_destroy                -- Done
- *    dmm_exit
- *    dmm_init                    -- Done
- *    dmm_map_memory            -- Done
- *    DMM_Reset
- *    dmm_reserve_memory        -- Done
- *    dmm_unmap_memory
- *    dmm_unreserve_memory        -- Done
- *
- * Private Functions:
- * -------------------
- *    add_region
- *    create_region
- *    get_region
- *    get_free_region                -- Done
- *    get_mapped_region            -- Done
- *
- *  Notes:
- *Region: Generic memory entity having a start address and a size
- *Chunk:  Reserved region
- *
- *!
- */
-
-#include <errno.h>
-#include <ti/syslink/Std.h>
-#include "OMAP4430Dmm.h"
-#include <OsalMutex.h>
-
-#define DMM_ADDR_VIRTUAL(x, a)                        \
-    do {                                \
-        x = (((struct map_page *)(a) - p_virt_mapping_tbl) * PAGE_SIZE \
-                        + dyn_mem_map_begin);\
-    } while (0)
-
-#define DMM_ADDR_TO_INDEX(i, a)                        \
-    do {                                \
-        i = (((a) - dyn_mem_map_begin) / PAGE_SIZE);        \
-    } while (0)
-
-struct map_page {
-    u32 region_size:31;
-    u32 b_reserved:1;
-};
-
-/*  Create the free list */
-static struct map_page *p_virt_mapping_tbl;
-static u32 i_freeregion;    /* The index of free region */
-static u32 i_freesize;
-static u32 table_size;/* The size of virtual and physical pages tables */
-static u32 dyn_mem_map_begin;
-OsalMutex_Handle     dmm_lock;
-
-/*
- *  ======== get_mapped_region ========
- *  Purpose:
- *  Returns the requestedmapped region
- */
-struct map_page *get_mapped_region(u32 addr)
-{
-    u32 i = 0;
-    struct map_page *curr_region = NULL;
-
-    if (p_virt_mapping_tbl == NULL)
-        return curr_region;
-
-    DMM_ADDR_TO_INDEX(i, addr);
-    if (i < table_size && (p_virt_mapping_tbl[i].b_reserved))
-        curr_region = p_virt_mapping_tbl + i;
-    return curr_region;
-}
-
-
-
-/*
- *  ======== get_free_region ========
- *  Purpose:
- *  Returns the requested free region
- */
-struct map_page *get_free_region(u32 size)
-{
-    struct map_page *curr_region = NULL;
-    u32 i = 0;
-    u32 region_size = 0;
-    u32 next_i = 0;
-
-    if (p_virt_mapping_tbl == NULL)
-        return curr_region;
-    if (size > i_freesize) {
-        /* Find the largest free region
-        * (coalesce during the traversal) */
-        while (i < table_size) {
-            region_size = p_virt_mapping_tbl[i].region_size;
-            next_i = i+region_size;
-            if (p_virt_mapping_tbl[i].b_reserved == false) {
-                /* Coalesce, if possible */
-                if (next_i < table_size &&
-                p_virt_mapping_tbl[next_i].b_reserved
-                            == false) {
-                    p_virt_mapping_tbl[i].region_size +=
-                    p_virt_mapping_tbl[next_i].region_size;
-                    continue;
-                }
-                region_size *= PAGE_SIZE;
-                if (region_size > i_freesize)     {
-                    i_freeregion = i;
-                    i_freesize = region_size;
-                }
-            }
-            i = next_i;
-        }
-    }
-    if (size <= i_freesize) {
-        curr_region = p_virt_mapping_tbl + i_freeregion;
-        i_freeregion += (size / PAGE_SIZE);
-        i_freesize -= size;
-    }
-    return curr_region;
-}
-
-
-
-
-/*
- *  ======== dmm_delete_tables ========
- *  Purpose:
- *Delete DMM Tables.
- */
-void dmm_delete_tables(void)
-{
-    /* Delete all DMM tables */
-    IArg key = 0;
-    OsalMutex_enter(dmm_lock);
-    if (p_virt_mapping_tbl != NULL) {
-        free(p_virt_mapping_tbl);
-        p_virt_mapping_tbl = NULL;
-    }
-    OsalMutex_leave(dmm_lock, key);
-}
-
-
-
-
-/*  ======== dmm_create_tables ========
- *  Purpose:
- *Create table to hold information of the virtual memory that is reserved
- *for DSP.
- */
-int dmm_create_tables(u32 addr, u32 size)
-{
-    int status = 0;
-
-    IArg key = 0;
-
-    dmm_delete_tables();
-    OsalMutex_enter(dmm_lock);
-
-    dyn_mem_map_begin = addr;
-    table_size = (size/PAGE_SIZE) + 1;
-    /*  Create the free list */
-    p_virt_mapping_tbl = (struct map_page *)malloc(
-                    table_size*sizeof(struct map_page));
-    if (p_virt_mapping_tbl == NULL)
-        status = -ENOMEM;
-    /* On successful allocation,
-    * all entries are zero ('free') */
-    i_freeregion = 0;
-    i_freesize = table_size*PAGE_SIZE;
-    p_virt_mapping_tbl[0].region_size = table_size;
-    OsalMutex_leave(dmm_lock, key);
-
-    return status;
-}
-
-/*
- *  ======== dmm_create ========
- *  Purpose:
- *Create a dynamic memory manager object.
- */
-int dmm_create(void)
-{
-    int status = 0;
-    dmm_lock = OsalMutex_create (OsalMutex_Type_Interruptible);
-
-    return status;
-}
-
-
-
-/*
- *  ======== dmm_destroy ========
- *  Purpose:
- *Release the communication memory manager resources.
- */
-void dmm_destroy(void)
-{
-    dmm_delete_tables();
-    OsalMutex_delete(&dmm_lock);
-}
-
-
-
-
-/*
- *  ======== dmm_init ========
- *  Purpose:
- *Initializes private state of DMM module.
- */
-void dmm_init(void)
-{
-    p_virt_mapping_tbl = NULL ;
-    table_size = 0;
-}
-
-/*
- *  ======== dmm_reserve_memory ========
- *  Purpose:
- *Reserve a chunk of virtually contiguous DSP/IVA address space.
- */
-int dmm_reserve_memory(u32 size, u32 *p_rsv_addr)
-{
-
-    int status = 0;
-
-    struct map_page *node;
-    u32 rsv_addr = 0;
-    u32 rsv_size = 0;
-    IArg key = 0;
-
-
-     OsalMutex_enter(dmm_lock);
-
-    /* Try to get a DSP chunk from the free list */
-    node = get_free_region(size);
-    if (node != NULL) {
-        /*  DSP chunk of given size is available. */
-        DMM_ADDR_VIRTUAL(rsv_addr, node);
-        /* Calculate the number entries to use */
-        rsv_size = size/PAGE_SIZE;
-        if (rsv_size < node->region_size) {
-            /* Mark remainder of free region */
-            node[rsv_size].b_reserved = false;
-            node[rsv_size].region_size =
-                node->region_size - rsv_size;
-        }
-        /*  get_region will return first fit chunk. But we only use what
-            is requested. */
-        node->b_reserved = true;
-        node->region_size = rsv_size;
-        /* Return the chunk's starting address */
-        *p_rsv_addr = rsv_addr;
-    } else
-        /*dSP chunk of given size is not available */
-        status = -ENOMEM;
-    OsalMutex_leave(dmm_lock, key);
-
-    return status;
-}
-
-
-/*
- *  ======== dmm_unreserve_memory ========
- *  Purpose:
- *Free a chunk of reserved DSP/IVA address space.
- */
-
-int dmm_unreserve_memory(u32 rsv_addr, u32 *psize)
-{
-    int status = 0;
-
-    struct map_page *chunk;
-    IArg key = 0;
-
-     OsalMutex_enter(dmm_lock);
-    /* Find the chunk containing the reserved address */
-    chunk = get_mapped_region(rsv_addr);
-    if (chunk == NULL)
-        status = -ENXIO;
-    if(status < 0); // why is this required -- Vikas KM
-    if (status == 0) {
-        chunk->b_reserved = false;
-        *psize = chunk->region_size * PAGE_SIZE;
-        /* NOTE: We do NOT coalesce free regions here.
-         * Free regions are coalesced in get_region(), as it traverses
-         *the whole mapping table
-         */
-    }
-    OsalMutex_leave(dmm_lock, key);
-
-    return status;
-}
-
-#ifdef DSP_DMM_DEBUG
-int dmm_mem_map_dump(void)
-{
-
-    struct map_page *curNode = NULL;
-    u32 i;
-    u32 freemem = 0;
-    u32 bigsize = 0;
-
-    IArg key = 0;
-    OsalMutex_enter(dmm_lock);
-
-    if (p_virt_mapping_tbl != NULL) {
-        for (i = 0; i < table_size; i +=
-                p_virt_mapping_tbl[i].region_size) {
-            curNode = p_virt_mapping_tbl + i;
-            if (curNode->b_reserved == true)    {
-                printf("RESERVED size = 0x%x, "
-                    "Map size = 0x%x\n",
-                    (curNode->region_size * PAGE_SIZE),
-                    (curNode->b_mapped == false) ? 0 :
-                    (curNode->mapped_size * PAGE_SIZE));
-            } else {
-                printf("UNRESERVED size = 0x%x\n",
-                    (curNode->region_size * PAGE_SIZE));
-
-                freemem += (curNode->region_size * PAGE_SIZE);
-                if (curNode->region_size > bigsize)
-                    bigsize = curNode->region_size;
-            }
-        }
-    }
-    printf("Total DSP VA FREE memory = %d Mbytes\n",
-            freemem/(1024*1024));
-    printf("Total DSP VA USED memory= %d Mbytes \n",
-            (((table_size * PAGE_SIZE)-freemem))/(1024*1024));
-    printf("DSP VA - Biggest FREE block = %d Mbytes \n\n",
-            (bigsize*PAGE_SIZE/(1024*1024)));
-    OsalMutex_leave(dmm_lock, key);
-
-    return 0;
-}
-#endif
-
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiEnabler.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiEnabler.c
deleted file mode 100644 (file)
index 5d487fe..0000000
+++ /dev/null
@@ -1,1839 +0,0 @@
-/*
- *  @file  Omap4430DucatiEnabler.c
- *
- *  @brief  MMU programming module
- *
- *
- *  ============================================================================
- *
- *  Copyright (c) 2010-2011, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-#include <errno.h>
-#include <unistd.h>
-#include <ti/syslink/Std.h>
-
-/* OSAL and utils headers */
-#include <ti/syslink/utils/List.h>
-#include <ti/syslink/utils/Trace.h>
-#include <ti/syslink/utils/OsalPrint.h>
-
-/* Module level headers */
-#include <OsalDrv.h>
-#include <_ProcDefs.h>
-#include <Processor.h>
-#include <hw/inout.h>
-#include <sys/mman.h>
-
-#include <hw_defs.h>
-#include <hw_mmu.h>
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalMmu.h>
-#include <OMAP4430DucatiPhyShmem.h>
-#include <OMAP4430DucatiEnabler.h>
-#include <stdbool.h>
-#include <stdint.h>
-
-#define MMU_REGS_SIZE (sizeof(OMAP4430Ducati_MMURegs) / sizeof (UInt32))
-static UInt32 mmu_regs[MMU_REGS_SIZE];
-
-
-#define PAGE_SIZE 0x1000
-static UInt32 nr_tlbs = 0;
-#define NR_TLBS_MAX 32
-struct iotlb_entry ducati_tlbs[NR_TLBS_MAX];
-//struct iotlb_entry tesla_tlbs[NR_TLBS_MAX];
-
-/* Attributes of L2 page tables for DSP MMU.*/
-struct page_info {
-    /* Number of valid PTEs in the L2 PT*/
-    UInt32 num_entries;
-};
-
-
-/* Attributes used to manage the DSP MMU page tables */
-struct pg_table_attrs {
-    struct sync_cs_object *hcs_object;/* Critical section object handle */
-    UInt32 l1_base_pa; /* Physical address of the L1 PT */
-    UInt32 l1_base_va; /* Virtual  address of the L1 PT */
-    UInt32 l1_size; /* Size of the L1 PT */
-    UInt32 l1_tbl_alloc_pa;
-    /* Physical address of Allocated mem for L1 table. May not be aligned */
-    UInt32 l1_tbl_alloc_va;
-    /* Virtual address of Allocated mem for L1 table. May not be aligned */
-    UInt32 l1_tbl_alloc_sz;
-    /* Size of consistent memory allocated for L1 table.
-     * May not be aligned */
-    UInt32 l2_base_pa;        /* Physical address of the L2 PT */
-    UInt32 l2_base_va;        /* Virtual  address of the L2 PT */
-    UInt32 l2_size;        /* Size of the L2 PT */
-    UInt32 l2_tbl_alloc_pa;
-    /* Physical address of Allocated mem for L2 table. May not be aligned */
-    UInt32 l2_tbl_alloc_va;
-    /* Virtual address of Allocated mem for L2 table. May not be aligned */
-    UInt32 ls_tbl_alloc_sz;
-    /* Size of consistent memory allocated for L2 table.
-     * May not be aligned */
-    UInt32 l2_num_pages;    /* Number of allocated L2 PT */
-    struct page_info *pg_info;
-};
-
-
-static struct pg_table_attrs *p_pt_attrs = NULL;
-
-enum pagetype {
-    SECTION = 0,
-    LARGE_PAGE = 1,
-    SMALL_PAGE = 2,
-    SUPER_SECTION  = 3
-};
-
-static UInt32 shm_phys_addr;
-#define INREG32(x) in32((uintptr_t)x)
-#define OUTREG32(x, y) out32((uintptr_t)x, y)
-#define SIZE 0x4
-
-static UInt32 iotlb_dump_cr (struct cr_regs *cr, char *buf);
-static Int load_iotlb_entry (OMAP4430DUCATI_HalObject * halObject,
-                             struct iotlb_entry *e);
-static Int iotlb_cr_valid (struct cr_regs *cr);
-
-static Int ducati_mem_map (OMAP4430DUCATI_HalObject * halObject,
-                            UInt32 mpu_addr, UInt32 ul_virt_addr,
-                            UInt32 num_bytes, UInt32 map_attr);
-static Int ducati_mem_unmap (OMAP4430DUCATI_HalObject * halObject, UInt32 da,
-                              UInt32 num_bytes);
-
-
-static Void iotlb_cr_to_e (struct cr_regs *cr, struct iotlb_entry *e)
-{
-    e->da       = cr->cam & MMU_CAM_VATAG_MASK;
-    e->pa       = cr->ram & MMU_RAM_PADDR_MASK;
-    e->valid    = cr->cam & MMU_CAM_V;
-    e->prsvd    = cr->cam & MMU_CAM_P;
-    e->pgsz     = cr->cam & MMU_CAM_PGSZ_MASK;
-    e->endian   = cr->ram & MMU_RAM_ENDIAN_MASK;
-    e->elsz     = cr->ram & MMU_RAM_ELSZ_MASK;
-    e->mixed    = cr->ram & MMU_RAM_MIXED;
-}
-
-static Void iotlb_getLock (OMAP4430DUCATI_HalObject * halObject,
-                           struct iotlb_lock *l)
-{
-    ULONG reg;
-    OMAP4430Ducati_MMURegs * mmuRegs =
-                                   (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-    reg = INREG32(&mmuRegs->LOCK);
-    l->base = MMU_LOCK_BASE(reg);
-    l->vict = MMU_LOCK_VICT(reg);
-}
-
-static Void iotlb_setLock (OMAP4430DUCATI_HalObject * halObject,
-                           struct iotlb_lock *l)
-{
-    ULONG reg;
-    OMAP4430Ducati_MMURegs * mmuRegs =
-                                   (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-    reg = (l->base << MMU_LOCK_BASE_SHIFT);
-    reg |= (l->vict << MMU_LOCK_VICT_SHIFT);
-    OUTREG32(&mmuRegs->LOCK, reg);
-}
-
-static void omap4_tlb_read_cr (OMAP4430DUCATI_HalObject * halObject,
-                               struct cr_regs *cr)
-{
-    OMAP4430Ducati_MMURegs * mmuRegs =
-                                   (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-    cr->cam = INREG32(&mmuRegs->READ_CAM);
-    cr->ram = INREG32(&mmuRegs->READ_RAM);
-}
-
-/* only used for iotlb iteration in for-loop */
-static struct cr_regs __iotlb_read_cr (OMAP4430DUCATI_HalObject * halObject,
-                                       int n)
-{
-     struct cr_regs cr;
-     struct iotlb_lock l;
-     iotlb_getLock(halObject, &l);
-     l.vict = n;
-     iotlb_setLock(halObject, &l);
-     omap4_tlb_read_cr(halObject, &cr);
-     return cr;
-}
-
-#define for_each_iotlb_cr(n, __i, cr)                \
-    for (__i = 0;                            \
-         (__i < (n)) && (cr = __iotlb_read_cr(halObject, __i), TRUE);    \
-         __i++)
-
-static Int save_tlbs (OMAP4430DUCATI_HalObject * halObject, UINT32 procId)
-{
-    Int i =0;
-    struct cr_regs cr_tmp;
-    struct iotlb_lock l;
-
-    iotlb_getLock(halObject, &l);
-
-    nr_tlbs = l.base;
-    if (procId == PROCTYPE_SYSM3 || procId == PROCTYPE_APPM3) {
-        for_each_iotlb_cr(nr_tlbs, i, cr_tmp) {
-            iotlb_cr_to_e(&cr_tmp, &ducati_tlbs[i]);
-        }
-    }
-    //else if (procId == PROCTYPE_TESLA) {
-            //TODO: Add along with the Tesla support.
-    //}
-    else {
-        GT_setFailureReason(curTrace,GT_2CLASS,"save_tlbs",
-                            EINVAL, "Invalid Processor Id");
-        return -EINVAL;
-    }
-
-    return 0;
-
-}
-
-static Int restore_tlbs (OMAP4430DUCATI_HalObject * halObject, UInt32 procId)
-{
-    Int i = 0;
-    Int status = -1;
-    struct iotlb_lock save;
-
-    /* Reset the base and victim values */
-    save.base = 0;
-    save.vict = 0;
-    iotlb_setLock(halObject, &save);
-
-    if (procId == PROCTYPE_SYSM3 || procId == PROCTYPE_APPM3) {
-        for (i = 0; i < nr_tlbs; i++) {
-            status = load_iotlb_entry(halObject, &ducati_tlbs[i]);
-            if (status < 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "restore_tlbs",
-                                     status,
-                                     "Error restoring the tlbs");
-                goto err;
-            }
-        }
-    }
-    //else if (procId == PROCTYPE_TESLA) {
-        //TODO: Add along with the Tesla support.
-    //}
-    else {
-        status = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "restore_tlbs",
-                             status,
-                             "Invalid ProcId");
-        goto err;
-    }
-
-    return 0;
-
-err:
-    return status;
-}
-
-static Int save_mmu_regs (OMAP4430DUCATI_HalObject * halObject, UInt32 procId)
-{
-    UInt32 i = 0;
-
-    if (halObject == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "save_mmu_regs",
-                             -ENOMEM,
-                             "halObject is NULL");
-        return -ENOMEM;
-    }
-
-    if (halObject->mmuBase == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "save_mmu_regs",
-                             -ENOMEM,
-                             "halObject->mmuBase is 0");
-        return -ENOMEM;
-    }
-
-    for (i = 0; i < MMU_REGS_SIZE; i++) {
-        mmu_regs[i] = INREG32(halObject->mmuBase + (i * 4));
-    }
-
-    return 0;
-}
-
-static Int restore_mmu_regs (OMAP4430DUCATI_HalObject * halObject,
-                             UInt32 procId)
-{
-    UInt32 i = 0;
-
-    if (halObject == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "restore_mmu_regs",
-                             -ENOMEM,
-                             "halObject is NULL");
-        return -ENOMEM;
-    }
-
-    if (halObject->mmuBase == 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "restore_mmu_regs",
-                             -ENOMEM,
-                             "halObject->mmuBase is 0");
-        return -ENOMEM;
-    }
-
-    for (i = 0; i < MMU_REGS_SIZE; i++) {
-        OUTREG32(halObject->mmuBase + (i * 4), mmu_regs[i]);
-    }
-
-    return 0;
-}
-
-Int save_mmu_ctxt (OMAP4430DUCATI_HalObject * halObject, UInt32 procId)
-{
-    Int status = -1;
-
-    status = save_mmu_regs(halObject, procId);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "save_mmu_ctxt",
-                             status,
-                             "Unable to save MMU Regs");
-        return status;
-    }
-
-    status = save_tlbs(halObject, procId);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "save_mmu_ctxt",
-                             status,
-                             "Unable to save TLBs");
-        return status;
-    }
-    return status;
-
-}
-
-Int restore_mmu_ctxt (OMAP4430DUCATI_HalObject * halObject, UInt32 procId)
-{
-    Int status = -1;
-
-    status = restore_mmu_regs(halObject, procId);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "restore_mmu_ctxt",
-                             status,
-                             "Unable to restore MMU Regs");
-        return status;
-    }
-
-    status = restore_tlbs(halObject, procId);
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "restore_mmu_ctxt",
-                             status,
-                             "Unable to restore TLBS");
-        return status;
-    }
-
-    return status;
-}
-
-
- /*=========================================
- * Decides a TLB entry size
- *
- */
-static Int get_mmu_entry_size (UInt32 pa, UInt32 size, enum pagetype *size_tlb,
-                               UInt32 *entry_size)
-{
-    Int     status = 0;
-    Bool    page_align_4kb  = false;
-    Bool    page_align_64kb = false;
-    Bool    page_align_1mb = false;
-    Bool    page_align_16mb = false;
-    UInt32  phys_addr = pa;
-
-
-    /*  First check the page alignment*/
-    if ((phys_addr % PAGE_SIZE_4KB)  == 0)
-        page_align_4kb  = true;
-    if ((phys_addr % PAGE_SIZE_64KB) == 0)
-        page_align_64kb = true;
-    if ((phys_addr % PAGE_SIZE_1MB)  == 0)
-        page_align_1mb  = true;
-    if ((phys_addr % PAGE_SIZE_16MB)  == 0)
-        page_align_16mb  = true;
-
-    if ((!page_align_64kb) && (!page_align_1mb)  && (!page_align_4kb)) {
-        status = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "get_mmu_entry_size",
-                             status,
-                             "phys_addr is not properly aligned");
-        goto error_exit;
-    }
-
-    /*  Now decide the entry size */
-    if (size >= PAGE_SIZE_16MB) {
-        if (page_align_16mb) {
-            *size_tlb   = SUPER_SECTION;
-            *entry_size = PAGE_SIZE_16MB;
-        } else if (page_align_1mb) {
-            *size_tlb   = SECTION;
-            *entry_size = PAGE_SIZE_1MB;
-        } else if (page_align_64kb) {
-            *size_tlb   = LARGE_PAGE;
-            *entry_size = PAGE_SIZE_64KB;
-        } else if (page_align_4kb) {
-            *size_tlb   = SMALL_PAGE;
-            *entry_size = PAGE_SIZE_4KB;
-        } else {
-            status = -EINVAL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "get_mmu_entry_size",
-                                 status,
-                                 "size and alignment are invalid");
-            goto error_exit;
-        }
-    } else if (size >= PAGE_SIZE_1MB && size < PAGE_SIZE_16MB) {
-        if (page_align_1mb) {
-            *size_tlb   = SECTION;
-            *entry_size = PAGE_SIZE_1MB;
-        } else if (page_align_64kb) {
-            *size_tlb   = LARGE_PAGE;
-            *entry_size = PAGE_SIZE_64KB;
-        } else if (page_align_4kb) {
-            *size_tlb   = SMALL_PAGE;
-            *entry_size = PAGE_SIZE_4KB;
-        } else {
-            status = -EINVAL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "get_mmu_entry_size",
-                                 status,
-                                 "size and alignment are invalid");
-            goto error_exit;
-        }
-    } else if (size > PAGE_SIZE_4KB && size < PAGE_SIZE_1MB) {
-        if (page_align_64kb) {
-            *size_tlb   = LARGE_PAGE;
-            *entry_size = PAGE_SIZE_64KB;
-        } else if (page_align_4kb) {
-            *size_tlb   = SMALL_PAGE;
-            *entry_size = PAGE_SIZE_4KB;
-        } else {
-            status = -EINVAL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "get_mmu_entry_size",
-                                 status,
-                                 "size and alignment are invalid");
-            goto error_exit;
-        }
-    } else if (size == PAGE_SIZE_4KB) {
-        if (page_align_4kb) {
-            *size_tlb   = SMALL_PAGE;
-            *entry_size = PAGE_SIZE_4KB;
-        } else {
-            status = -EINVAL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "get_mmu_entry_size",
-                                 status,
-                                 "size and alignment are invalid");
-            goto error_exit;
-        }
-    } else {
-        status = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "get_mmu_entry_size",
-                             status,
-                             "size is invalid");
-        goto error_exit;
-    }
-    return 0;
-
-error_exit:
-    return status;
-}
-
-
-/*=========================================
- * Add DSP MMU entries corresponding to given MPU-Physical address
- * and DSP-virtual address
- */
-static Int add_dsp_mmu_entry (OMAP4430DUCATI_HalObject * halObject,
-                              UInt32 *phys_addr, UInt32 *dsp_addr, UInt32 size)
-{
-    UInt32 mapped_size = 0;
-    enum pagetype size_tlb = SECTION;
-    UInt32 entry_size = 0;
-    int status = 0;
-    struct iotlb_entry tlb_entry;
-    int retval = 0;
-
-    while ((mapped_size < size) && (status == 0)) {
-        status = get_mmu_entry_size(*phys_addr, (size - mapped_size),
-                                    &size_tlb, &entry_size);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "add_dsp_mmu_entry",
-                                 status,
-                                 "get_mmu_entry_size failed");
-            goto error_exit;
-        }
-
-        if (size_tlb == SUPER_SECTION)
-            tlb_entry.pgsz = MMU_CAM_PGSZ_16M;
-
-        else if (size_tlb == SECTION)
-            tlb_entry.pgsz = MMU_CAM_PGSZ_1M;
-
-        else if (size_tlb == LARGE_PAGE)
-            tlb_entry.pgsz = MMU_CAM_PGSZ_64K;
-
-        else if (size_tlb == SMALL_PAGE)
-            tlb_entry.pgsz = MMU_CAM_PGSZ_4K;
-
-        tlb_entry.elsz = MMU_RAM_ELSZ_16;
-        tlb_entry.endian = MMU_RAM_ENDIAN_LITTLE;
-        tlb_entry.mixed = MMU_RAM_MIXED;
-        tlb_entry.prsvd = MMU_CAM_P;
-        tlb_entry.valid = MMU_CAM_V;
-
-        tlb_entry.da = *dsp_addr;
-        tlb_entry.pa = *phys_addr;
-        retval = load_iotlb_entry(halObject, &tlb_entry);
-        if (retval < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "add_dsp_mmu_entry",
-                                 retval,
-                                 "load_iotlb_entry failed");
-            goto error_exit;
-        }
-        mapped_size  += entry_size;
-        *phys_addr   += entry_size;
-        *dsp_addr   += entry_size;
-    }
-
-    return 0;
-
-error_exit:
-    printf("pte set failure retval = 0x%x, status = 0x%x \n",
-                            retval, status);
-
-    return retval;
-}
-
-
-static Int add_entry_ext (OMAP4430DUCATI_HalObject * halObject,
-                          UInt32 *phys_addr, UInt32 *dsp_addr, UInt32 size)
-{
-    UInt32 mapped_size = 0;
-    enum pagetype     size_tlb = SECTION;
-    UInt32 entry_size = 0;
-    Int status = 0;
-    UInt32 page_size = HW_PAGE_SIZE_1MB;
-    UInt32 flags = 0;
-
-    flags = (DSP_MAPELEMSIZE32 | DSP_MAPLITTLEENDIAN |
-                    DSP_MAPPHYSICALADDR);
-    while ((mapped_size < size) && (status == 0)) {
-
-        /*  get_mmu_entry_size fills the size_tlb and entry_size
-        based on alignment and size of memory to map
-        to DSP - size */
-        status = get_mmu_entry_size (*phys_addr,
-                                     (size - mapped_size),
-                                     &size_tlb,
-                                     &entry_size);
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "add_entry_ext",
-                                 status,
-                                 "get_mmu_entry_size failed");
-            break;
-        }
-        else {
-            if (size_tlb == SUPER_SECTION)
-                page_size = HW_PAGE_SIZE_16MB;
-            else if (size_tlb == SECTION)
-                page_size = HW_PAGE_SIZE_1MB;
-            else if (size_tlb == LARGE_PAGE)
-                page_size = HW_PAGE_SIZE_64KB;
-            else if (size_tlb == SMALL_PAGE)
-                page_size = HW_PAGE_SIZE_4KB;
-
-            if (status == 0) {
-                status = ducati_mem_map (halObject,
-                                          *phys_addr,
-                                          *dsp_addr,
-                                          page_size,
-                                          flags);
-                if (status < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "add_entry_ext",
-                                         status,
-                                         "ducati_mem_map failed");
-                    break;
-                }
-                mapped_size  += entry_size;
-                *phys_addr   += entry_size;
-                *dsp_addr   += entry_size;
-            }
-        }
-    }
-    return status;
-}
-
-static Int __dump_tlb_entries (OMAP4430DUCATI_HalObject * halObject,
-                               struct cr_regs *crs, int num)
-{
-    int i;
-    struct iotlb_lock saved;
-    struct cr_regs tmp;
-    struct cr_regs *p = crs;
-
-    iotlb_getLock(halObject, &saved);
-    for_each_iotlb_cr(num, i, tmp) {
-        if (!iotlb_cr_valid(&tmp))
-            continue;
-        *p++ = tmp;
-    }
-    iotlb_setLock(halObject, &saved);
-    return  p - crs;
-}
-
-UInt32 get_DucatiVirtAdd(OMAP4430DUCATI_HalObject * halObject, UInt32 physAdd)
-{
-    int i, num;
-    struct cr_regs *cr;
-    struct cr_regs *p = NULL;
-    //DWORD dwPhys;
-    UInt32 lRetVal = 0;
-    num = 32;
-    if(shm_phys_addr == 0)
-        return 0;
-    cr = mmap(NULL,
-              sizeof(struct cr_regs) * num,
-              PROT_NOCACHE | PROT_READ | PROT_WRITE,
-              MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-              NOFD,
-              0);
-    if (cr == MAP_FAILED)
-    {
-        return NULL;
-    }
-
-    memset(cr, 0, sizeof(struct cr_regs) * num);
-
-    num = __dump_tlb_entries(halObject, cr, num);
-    for (i = 0; i < num; i++)
-    {
-        p = cr + i;
-        if(physAdd >= (p->ram & 0xFFFFF000) &&  physAdd < ((p + 1)->ram & 0xFFFFF000))
-        {
-            lRetVal = ((p->cam & 0xFFFFF000) + (physAdd - (p->ram & 0xFFFFF000)));
-        }
-    }
-    munmap(cr, sizeof(struct cr_regs) * num);
-
-    return lRetVal;
-}
-
-
-/**
- * dump_tlb_entries - dump cr arrays to given buffer
- * @obj:    target iommu
- * @buf:    output buffer
- **/
-static UInt32 dump_tlb_entries (OMAP4430DUCATI_HalObject * halObject,
-                                char *buf, UInt32 bytes)
-{
-    Int i, num;
-    struct cr_regs *cr;
-    Char *p = buf;
-
-    num = bytes / sizeof(*cr);
-    num = min(32, num);
-    cr = mmap(NULL,
-            sizeof(struct cr_regs) * num,
-              PROT_NOCACHE | PROT_READ | PROT_WRITE,
-              MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-              NOFD,
-              0);
-    if (!cr)
-    {
-        return NULL;
-
-    }
-    memset(cr, 0, sizeof(struct cr_regs) * num);
-
-    num = __dump_tlb_entries(halObject, cr, num);
-    for (i = 0; i < num; i++)
-        p += iotlb_dump_cr(cr + i, p);
-    munmap(cr, sizeof(struct cr_regs) * num);
-    return p - buf;
-}
-
-
-static Void ducati_tlb_dump (OMAP4430DUCATI_HalObject * halObject)
-{
-    Char *p;
-
-    p = mmap(NULL,
-             1000,
-             PROT_NOCACHE | PROT_READ | PROT_WRITE,
-             MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-             NOFD,
-             0);
-    if (MAP_FAILED != p)
-    {
-        dump_tlb_entries(halObject, p, 1000);
-        munmap(p, 1000);
-    }
-
-    return;
-}
-
-
-/*================================
- * Initialize the Ducati MMU.
- *===============================*/
-
-static Int ducati_mmu_init(OMAP4430DUCATI_HalObject * halObject)
-{
-    Int ret_val = 0;
-    UInt32 phys_addr = 0;
-    UInt32 num_l4_entries;
-    UInt32 i = 0;
-    UInt32 num_l3_mem_entries = 0;
-    UInt32 virt_addr = 0;
-    OMAP4430Ducati_MMURegs * mmuRegs = NULL;
-
-    if (halObject == NULL) {
-        ret_val = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mmu_init",
-                             ret_val,
-                             "halObject is NULL");
-        goto error_exit;
-    }
-
-    if (halObject->mmuBase == 0) {
-        ret_val = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mmu_init",
-                             ret_val,
-                             "halObject->mmuBase is 0");
-        goto error_exit;
-    }
-    mmuRegs = (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-    num_l4_entries = (sizeof(l4_map) / sizeof(struct mmu_entry));
-    num_l3_mem_entries = sizeof(l3_memory_regions) /
-                      sizeof(struct memory_entry);
-
-    /*  Disable the MMU & TWL */
-    hw_mmu_disable(halObject->mmuBase);
-    hw_mmu_twl_disable(halObject->mmuBase);
-
-
-    printf("  Programming Ducati memory regions\n");
-    printf("=========================================\n");
-
-    for (i = 0; i < num_l3_mem_entries; i++) {
-        ret_val = Processor_translateAddr(halObject->procHandle, &phys_addr,
-                               (unsigned int)l3_memory_regions[i].ul_virt_addr);
-        if (ret_val < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "ducati_mmu_init",
-                                 ret_val,
-                                 "Processor_translateAddr failed");
-            goto error_exit;
-        }
-        printf( "VA = [0x%x] of size [0x%x] at PA = [0x%x]\n",
-                (unsigned int)l3_memory_regions[i].ul_virt_addr,
-                (unsigned int)l3_memory_regions[i].ul_size,
-                (unsigned int)phys_addr);
-
-        /* OMAP4430 SDC code */
-        /* Adjust below logic if using cacheable shared memory */
-        if (l3_memory_regions[i].ul_virt_addr == \
-            IPU_MEM_IPC_VRING) {
-            shm_phys_addr = phys_addr;
-        }
-        virt_addr = l3_memory_regions[i].ul_virt_addr;
-        ret_val = add_dsp_mmu_entry(halObject, &phys_addr, &virt_addr,
-                                    (l3_memory_regions[i].ul_size));
-        if (ret_val < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "ducati_mmu_init",
-                                 ret_val,
-                                 "add_dsp_mmu_entry failed");
-            goto error_exit;
-        }
-    }
-
-    printf( "  Programming Ducati L4 peripherals\n");
-    printf( "=========================================\n");
-    for (i = 0; i < num_l4_entries; i++) {
-        printf("PA [0x%x] VA [0x%x] size [0x%x]\n",
-                (unsigned int)l4_map[i].ul_phy_addr,
-                (unsigned int)l4_map[i].ul_virt_addr,
-                (unsigned int)l4_map[i].ul_size);
-
-        virt_addr = l4_map[i].ul_virt_addr;
-        phys_addr = l4_map[i].ul_phy_addr;
-        if (i == 0||i == 1||i == 2){
-            ret_val = add_entry_ext(halObject, &phys_addr, &virt_addr,
-                                    (l4_map[i].ul_size));
-        } else {
-            ret_val = add_dsp_mmu_entry(halObject, &phys_addr, &virt_addr,
-                                        (l4_map[i].ul_size));
-        }
-        if (ret_val < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "ducati_mmu_init",
-                                 ret_val,
-                                 "add_dsp_mmu_entry or add_entry_ext failed");
-            goto error_exit;
-        }
-    }
-
-    /* Set the TTB to point to the L1 page table's physical address */
-    OUTREG32(&mmuRegs->TTB, p_pt_attrs->l1_base_pa);
-
-    /* Enable the TWL */
-    hw_mmu_twl_enable(halObject->mmuBase);
-
-    hw_mmu_enable(halObject->mmuBase);
-
-    ducati_tlb_dump(halObject);
-    return 0;
-error_exit:
-    return ret_val;
-}
-
-
-/****************************************************
-*
-*  Function which sets the TWL of the ducati
-*
-*
-*****************************************************/
-
-static Int ducati_set_twl (OMAP4430DUCATI_HalObject * halObject, Bool on)
-{
-    Int status = 0;
-    OMAP4430Ducati_MMURegs * mmuRegs = NULL;
-    ULONG reg;
-
-    if (halObject == NULL) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_set_twl",
-                             status,
-                             "halObject is NULL");
-    }
-    else if (halObject->mmuBase == 0) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_set_twl",
-                             status,
-                             "halObject->mmuBase is NULL");
-    }
-    else {
-        mmuRegs = (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-        /* Setting MMU to Smart Idle Mode */
-        reg = INREG32(&mmuRegs->SYSCONFIG);
-        reg &= ~MMU_SYS_IDLE_MASK;
-        reg |= (MMU_SYS_IDLE_SMART | MMU_SYS_AUTOIDLE);
-        OUTREG32(&mmuRegs->SYSCONFIG, reg);
-
-        /* Enabling MMU */
-        reg =  INREG32(&mmuRegs->CNTL);
-
-        if (on)
-            OUTREG32(&mmuRegs->IRQENABLE, MMU_IRQ_TWL_MASK);
-        else
-            OUTREG32(&mmuRegs->IRQENABLE, MMU_IRQ_TLB_MISS_MASK);
-
-        reg &= ~MMU_CNTL_MASK;
-        if (on)
-            reg |= (MMU_CNTL_MMU_EN | MMU_CNTL_TWL_EN);
-        else
-            reg |= (MMU_CNTL_MMU_EN);
-
-        OUTREG32(&mmuRegs->CNTL, reg);
-    }
-
-    return status;
-}
-
-
-/*========================================
- * This sets up the Ducati processor MMU Page tables
- *
- */
-static Int init_mmu_page_attribs (UInt32 l1_size,
-                                  UInt32 l1_allign,
-                                  UInt32 ls_num_of_pages)
-{
-    UInt32 pg_tbl_pa = 0;
-    off64_t offset = 0;
-    UInt32 pg_tbl_va = 0;
-    UInt32 align_size = 0;
-    UInt32 len = 0;
-    int status = 0;
-
-    p_pt_attrs = Memory_alloc (NULL, sizeof(struct pg_table_attrs), 0, NULL);
-    if (p_pt_attrs)
-        Memory_set (p_pt_attrs, 0, sizeof(struct pg_table_attrs));
-    else {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "init_mmu_page_attribs",
-                             status,
-                             "Memory_alloc failed");
-        goto error_exit;
-    }
-
-    p_pt_attrs->l1_size = l1_size;
-    align_size = p_pt_attrs->l1_size;
-    p_pt_attrs->l1_tbl_alloc_sz = 0x100000;
-    /* Align sizes are expected to be power of 2 */
-    /* we like to get aligned on L1 table size */
-    pg_tbl_va = (UInt32) mmap64 (NULL,
-                                 p_pt_attrs->l1_tbl_alloc_sz,
-                                 PROT_NOCACHE | PROT_READ | PROT_WRITE,
-                                 MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-                                 NOFD,
-                                 0x0);
-    if (pg_tbl_va == (UInt32)MAP_FAILED) {
-        pg_tbl_va = 0;
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "init_mmu_page_attribs",
-                             status,
-                             "mmap64 failed");
-        goto error_exit;
-    }
-    else {
-        /* Make sure the memory is contiguous */
-        status = mem_offset64 ((void *)pg_tbl_va, NOFD,
-                               p_pt_attrs->l1_tbl_alloc_sz, &offset, &len);
-        pg_tbl_pa = (UInt32)offset;
-        if (len != p_pt_attrs->l1_tbl_alloc_sz) {
-            status = -ENOMEM;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "init_mmu_page_attribs",
-                                 status,
-                                 "phys mem is not contiguous");
-        }
-        if (status != 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "init_mmu_page_attribs",
-                                 status,
-                                 "mem_offset64 failed");
-            goto error_exit;
-        }
-    }
-    /* Check if the PA is aligned for us */
-    if ((pg_tbl_pa) & (align_size-1)) {
-        /* PA not aligned to page table size ,*/
-        /* try with more allocation and align */
-        munmap((void *)pg_tbl_va, p_pt_attrs->l1_tbl_alloc_sz);
-        p_pt_attrs->l1_tbl_alloc_sz = p_pt_attrs->l1_tbl_alloc_sz*2;
-        /* we like to get aligned on L1 table size */
-        pg_tbl_va = (UInt32) mmap64 (NULL,
-                                     p_pt_attrs->l1_tbl_alloc_sz,
-                                     PROT_NOCACHE | PROT_READ | PROT_WRITE,
-                                     MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-                                     NOFD,
-                                     0);
-        if (pg_tbl_va == (UInt32)MAP_FAILED) {
-            pg_tbl_va = 0;
-            status = -ENOMEM;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "init_mmu_page_attribs",
-                                 status,
-                                 "mmap64 failed");
-            goto error_exit;
-        }
-        else {
-            /* Make sure the memory is contiguous */
-            status = mem_offset64 ((void *)pg_tbl_va, NOFD,
-                                   p_pt_attrs->l1_tbl_alloc_sz, &offset, &len);
-            pg_tbl_pa = (UInt32)offset;
-            if (len != p_pt_attrs->l1_tbl_alloc_sz) {
-                status = -ENOMEM;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "init_mmu_page_attribs",
-                                     status,
-                                     "phys mem is not contiguous");
-            }
-            if (status != 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "init_mmu_page_attribs",
-                                     status,
-                                     "mem_offset64 failed");
-                goto error_exit;
-            }
-        }
-        /* We should be able to get aligned table now */
-        p_pt_attrs->l1_tbl_alloc_pa = pg_tbl_pa;
-        p_pt_attrs->l1_tbl_alloc_va = pg_tbl_va;
-        /* Align the PA to the next 'align'  boundary */
-        p_pt_attrs->l1_base_pa = ((pg_tbl_pa) + (align_size-1)) &
-                            (~(align_size-1));
-        p_pt_attrs->l1_base_va = pg_tbl_va + (p_pt_attrs->l1_base_pa -
-                                pg_tbl_pa);
-    } else {
-        /* We got aligned PA, cool */
-        p_pt_attrs->l1_tbl_alloc_pa = pg_tbl_pa;
-        p_pt_attrs->l1_tbl_alloc_va = pg_tbl_va;
-        p_pt_attrs->l1_base_pa = pg_tbl_pa;
-        p_pt_attrs->l1_base_va = pg_tbl_va;
-    }
-
-    if (p_pt_attrs->l1_base_va)
-        memset((UInt8*)p_pt_attrs->l1_base_va, 0x00, p_pt_attrs->l1_size);
-    p_pt_attrs->l2_num_pages = ls_num_of_pages;
-    p_pt_attrs->l2_size = HW_MMU_COARSE_PAGE_SIZE * p_pt_attrs->l2_num_pages;
-    align_size = 4; /* Make it UInt32 aligned  */
-    /* we like to get aligned on L1 table size */
-    pg_tbl_va = p_pt_attrs->l1_base_va + 0x80000;
-    pg_tbl_pa = p_pt_attrs->l1_base_pa + 0x80000;
-    p_pt_attrs->l2_tbl_alloc_pa = pg_tbl_pa;
-    p_pt_attrs->l2_tbl_alloc_va = pg_tbl_va;
-    p_pt_attrs->ls_tbl_alloc_sz = p_pt_attrs->l2_size;
-    p_pt_attrs->l2_base_pa = pg_tbl_pa;
-    p_pt_attrs->l2_base_va = pg_tbl_va;
-    if (p_pt_attrs->l2_base_va)
-        memset((UInt8*)p_pt_attrs->l2_base_va, 0x00, p_pt_attrs->l2_size);
-
-    p_pt_attrs->pg_info = Memory_alloc(NULL, sizeof(struct page_info), 0, NULL);
-    if (p_pt_attrs->pg_info)
-        Memory_set (p_pt_attrs->pg_info, 0, sizeof(struct page_info));
-    else {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "init_mmu_page_attribs",
-                             status,
-                             "Memory_alloc failed");
-        goto error_exit;
-    }
-    return 0;
-
-error_exit:
-    if (p_pt_attrs) {
-        if (p_pt_attrs->pg_info)
-            Memory_free (NULL, p_pt_attrs->pg_info, sizeof(struct page_info));
-        if (p_pt_attrs->l1_tbl_alloc_va) {
-            munmap ((void *)p_pt_attrs->l1_tbl_alloc_va,
-                    p_pt_attrs->l1_tbl_alloc_sz);
-        }
-        Memory_free (NULL, p_pt_attrs, sizeof(struct pg_table_attrs));
-        p_pt_attrs = NULL;
-    }
-
-    return status;
-}
-
-
-/*========================================
- * This destroys the Ducati processor MMU Page tables
- *
- */
-static Void deinit_mmu_page_attribs (Void)
-{
-    if (p_pt_attrs) {
-        if (p_pt_attrs->pg_info)
-            Memory_free (NULL, p_pt_attrs->pg_info, sizeof(struct page_info));
-        if (p_pt_attrs->l1_tbl_alloc_va) {
-            munmap ((void *)p_pt_attrs->l1_tbl_alloc_va,
-                    p_pt_attrs->l1_tbl_alloc_sz);
-        }
-        Memory_free (NULL, p_pt_attrs, sizeof(struct pg_table_attrs));
-        p_pt_attrs = NULL;
-    }
-}
-
-
-
-/*============================================
- * This function calculates PTE address (MPU virtual) to be updated
- *  It also manages the L2 page tables
- */
-static Int pte_set (UInt32 pa, UInt32 va, UInt32 size,
-                    struct hw_mmu_map_attrs_t *attrs)
-{
-    UInt32 i;
-    UInt32 pte_val;
-    UInt32 pte_addr_l1;
-    UInt32 pte_size;
-    UInt32 pg_tbl_va; /* Base address of the PT that will be updated */
-    UInt32 l1_base_va;
-     /* Compiler warns that the next three variables might be used
-     * uninitialized in this function. Doesn't seem so. Working around,
-     * anyways.  */
-    UInt32 l2_base_va = 0;
-    UInt32 l2_base_pa = 0;
-    UInt32 l2_page_num = 0;
-    struct pg_table_attrs *pt = p_pt_attrs;
-    struct iotlb_entry    *mapAttrs;
-    int status = 0;
-    OMAP4430DUCATI_HalMmuEntryInfo setPteInfo;
-    mapAttrs = Memory_alloc(0, sizeof(struct iotlb_entry), 0, NULL);
-
-    l1_base_va = pt->l1_base_va;
-    pg_tbl_va = l1_base_va;
-    if ((size == HW_PAGE_SIZE_64KB) || (size == HW_PAGE_SIZE_4KB)) {
-        /* Find whether the L1 PTE points to a valid L2 PT */
-        pte_addr_l1 = hw_mmu_pte_addr_l1(l1_base_va, va);
-        if (pte_addr_l1 <= (pt->l1_base_va + pt->l1_size)) {
-            pte_val = *(UInt32 *)pte_addr_l1;
-            pte_size = hw_mmu_pte_sizel1(pte_val);
-        } else {
-            return -EINVAL;
-        }
-        /* FIX ME */
-        /* TODO: ADD synchronication element*/
-        /*        sync_enter_cs(pt->hcs_object);*/
-        if (pte_size == HW_MMU_COARSE_PAGE_SIZE) {
-            /* Get the L2 PA from the L1 PTE, and find
-             * corresponding L2 VA */
-            l2_base_pa = hw_mmu_pte_coarsel1(pte_val);
-            l2_base_va = l2_base_pa - pt->l2_base_pa +
-            pt->l2_base_va;
-            l2_page_num = (l2_base_pa - pt->l2_base_pa) /
-                    HW_MMU_COARSE_PAGE_SIZE;
-        } else if (pte_size == 0) {
-            /* L1 PTE is invalid. Allocate a L2 PT and
-             * point the L1 PTE to it */
-            /* Find a free L2 PT. */
-            for (i = 0; (i < pt->l2_num_pages) &&
-                (pt->pg_info[i].num_entries != 0); i++)
-                ;;
-            if (i < pt->l2_num_pages) {
-                l2_page_num = i;
-                l2_base_pa = pt->l2_base_pa + (l2_page_num *
-                       HW_MMU_COARSE_PAGE_SIZE);
-                l2_base_va = pt->l2_base_va + (l2_page_num *
-                       HW_MMU_COARSE_PAGE_SIZE);
-                /* Endianness attributes are ignored for
-                 * HW_MMU_COARSE_PAGE_SIZE */
-                mapAttrs->endian = attrs->endianism;
-                mapAttrs->mixed = attrs->mixedSize;
-                mapAttrs->elsz= attrs->element_size;
-                mapAttrs->da = va;
-                mapAttrs->pa = pa;
-                status = hw_mmu_pte_set(pg_tbl_va, pa, va, size, attrs);
-            } else {
-                status = -ENOMEM;
-            }
-        } else {
-            /* Found valid L1 PTE of another size.
-             * Should not overwrite it. */
-            status = -EINVAL;
-        }
-        if (status == 0) {
-            pg_tbl_va = l2_base_va;
-            if (size == HW_PAGE_SIZE_64KB)
-                pt->pg_info[l2_page_num].num_entries += 16;
-            else
-                pt->pg_info[l2_page_num].num_entries++;
-        }
-    }
-    if (status == 0) {
-        mapAttrs->endian = attrs->endianism;
-        mapAttrs->mixed = attrs->mixedSize;
-        mapAttrs->elsz= attrs->element_size;
-        mapAttrs->da = va;
-        mapAttrs->pa = pa;
-        mapAttrs->pgsz = MMU_CAM_PGSZ_16M;
-        setPteInfo.elementSize = attrs->element_size;
-        setPteInfo.endianism = attrs->endianism;
-        setPteInfo.masterPhyAddr = pa;
-        setPteInfo.mixedSize = attrs->mixedSize;
-        setPteInfo.size = size;
-        setPteInfo.slaveVirtAddr = va;
-
-        status = hw_mmu_pte_set(pg_tbl_va, pa, va, size, attrs);
-        if (status == RET_OK)
-            status = 0;
-    }
-    Memory_free(0, mapAttrs, sizeof(struct iotlb_entry));
-    return status;
-}
-
-
-/*=============================================
- * This function calculates the optimum page-aligned addresses and sizes
- * Caller must pass page-aligned values
- */
-static Int pte_update (UInt32 pa, UInt32 va, UInt32 size,
-                       struct hw_mmu_map_attrs_t *map_attrs)
-{
-    UInt32 i;
-    UInt32 all_bits;
-    UInt32 pa_curr = pa;
-    UInt32 va_curr = va;
-    UInt32 num_bytes = size;
-    Int status = 0;
-    UInt32 pg_size[] = {HW_PAGE_SIZE_16MB, HW_PAGE_SIZE_1MB,
-               HW_PAGE_SIZE_64KB, HW_PAGE_SIZE_4KB};
-    while (num_bytes && (status == 0)) {
-        /* To find the max. page size with which both PA & VA are
-         * aligned */
-        all_bits = pa_curr | va_curr;
-        for (i = 0; i < 4; i++) {
-            if ((num_bytes >= pg_size[i]) && ((all_bits &
-               (pg_size[i] - 1)) == 0)) {
-                status = pte_set(pa_curr,
-                    va_curr, pg_size[i], map_attrs);
-                pa_curr += pg_size[i];
-                va_curr += pg_size[i];
-                num_bytes -= pg_size[i];
-                 /* Don't try smaller sizes. Hopefully we have
-                 * reached an address aligned to a bigger page
-                 * size */
-                break;
-            }
-        }
-    }
-    return status;
-}
-
-
-/*============================================
- * This function maps MPU buffer to the DSP address space. It performs
-* linear to physical address translation if required. It translates each
-* page since linear addresses can be physically non-contiguous
-* All address & size arguments are assumed to be page aligned (in proc.c)
- *
- */
-static Int ducati_mem_map (OMAP4430DUCATI_HalObject * halObject,
-                           UInt32 mpu_addr, UInt32 ul_virt_addr,
-                           UInt32 num_bytes, UInt32 map_attr)
-{
-    UInt32 attrs;
-    Int status = 0;
-    struct hw_mmu_map_attrs_t hw_attrs;
-    Int pg_i = 0;
-
-    if (halObject == NULL) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mem_map",
-                             status,
-                             "halObject is NULL");
-    }
-    else if (halObject->mmuBase == 0) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mem_map",
-                             status,
-                             "halObject->mmuBase is 0");
-    }
-    else if (num_bytes == 0) {
-        status = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mem_map",
-                             status,
-                             "num_bytes is 0");
-    }
-    else {
-        if (map_attr != 0) {
-            attrs = map_attr;
-            attrs |= DSP_MAPELEMSIZE32;
-        } else {
-            /* Assign default attributes */
-            attrs = DSP_MAPVIRTUALADDR | DSP_MAPELEMSIZE32;
-        }
-        /* Take mapping properties */
-        if (attrs & DSP_MAPBIGENDIAN)
-            hw_attrs.endianism = HW_BIG_ENDIAN;
-        else
-            hw_attrs.endianism = HW_LITTLE_ENDIAN;
-
-        hw_attrs.mixedSize = (enum hw_mmu_mixed_size_t)
-                     ((attrs & DSP_MAPMIXEDELEMSIZE) >> 2);
-        /* Ignore element_size if mixedSize is enabled */
-        if (hw_attrs.mixedSize == 0) {
-            if (attrs & DSP_MAPELEMSIZE8) {
-                /* Size is 8 bit */
-                hw_attrs.element_size = HW_ELEM_SIZE_8BIT;
-            } else if (attrs & DSP_MAPELEMSIZE16) {
-                /* Size is 16 bit */
-                hw_attrs.element_size = HW_ELEM_SIZE_16BIT;
-            } else if (attrs & DSP_MAPELEMSIZE32) {
-                /* Size is 32 bit */
-                hw_attrs.element_size = HW_ELEM_SIZE_32BIT;
-            } else if (attrs & DSP_MAPELEMSIZE64) {
-                /* Size is 64 bit */
-                hw_attrs.element_size = HW_ELEM_SIZE_64BIT;
-            } else {
-                /* Mixedsize isn't enabled, so size can't be
-                 * zero here */
-                status = -EINVAL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "ducati_mem_map",
-                                     status,
-                                     "MMU element size is zero");
-            }
-        }
-
-        if (status >= 0) {
-            /*
-             * Do OS-specific user-va to pa translation.
-             * Combine physically contiguous regions to reduce TLBs.
-             * Pass the translated pa to PteUpdate.
-             */
-            if ((attrs & DSP_MAPPHYSICALADDR)) {
-                status = pte_update(mpu_addr, ul_virt_addr, num_bytes,
-                                    &hw_attrs);
-            }
-
-            /* Don't propogate Linux or HW status to upper layers */
-            if (status < 0) {
-                /*
-                 * Roll out the mapped pages incase it failed in middle of
-                 * mapping
-                 */
-                if (pg_i)
-                    ducati_mem_unmap(halObject, ul_virt_addr,
-                                     (pg_i * PAGE_SIZE));
-            }
-
-            /* In any case, flush the TLB
-             * This is called from here instead from pte_update to avoid
-             * unnecessary repetition while mapping non-contiguous physical
-             * regions of a virtual region */
-            hw_mmu_tlb_flushAll(halObject->mmuBase);
-        }
-    }
-    return status;
-}
-
-
-
-/*
- *  ======== ducati_mem_unmap ========
- *      Invalidate the PTEs for the DSP VA block to be unmapped.
- *
- *      PTEs of a mapped memory block are contiguous in any page table
- *      So, instead of looking up the PTE address for every 4K block,
- *      we clear consecutive PTEs until we unmap all the bytes
- */
-static Int ducati_mem_unmap (OMAP4430DUCATI_HalObject * halObject,
-                             UInt32 da, UInt32 num_bytes)
-{
-    UInt32 L1_base_va;
-    UInt32 L2_base_va;
-    UInt32 L2_base_pa;
-    UInt32 L2_page_num;
-    UInt32 pte_val;
-    UInt32 pte_size;
-    UInt32 pte_count;
-    UInt32 pte_addr_l1;
-    UInt32 pte_addr_l2 = 0;
-    UInt32 rem_bytes;
-    UInt32 rem_bytes_l2;
-    UInt32 vaCurr;
-    Int status = 0;
-    UInt32 temp;
-    UInt32 pAddr;
-    UInt32 numof4Kpages = 0;
-
-    if (halObject == NULL) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mem_unmap",
-                             status,
-                             "halObject is NULL");
-    }
-    else if (halObject->mmuBase == 0) {
-        status = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "ducati_mem_unmap",
-                             status,
-                             "halObject->mmuBase is 0");
-    }
-    else {
-        vaCurr = da;
-        rem_bytes = num_bytes;
-        rem_bytes_l2 = 0;
-        L1_base_va = p_pt_attrs->l1_base_va;
-        pte_addr_l1 = hw_mmu_pte_addr_l1(L1_base_va, vaCurr);
-        while (rem_bytes) {
-            UInt32 vaCurrOrig = vaCurr;
-            /* Find whether the L1 PTE points to a valid L2 PT */
-            pte_addr_l1 = hw_mmu_pte_addr_l1(L1_base_va, vaCurr);
-            pte_val = *(UInt32 *)pte_addr_l1;
-            pte_size = hw_mmu_pte_sizel1(pte_val);
-            if (pte_size == HW_MMU_COARSE_PAGE_SIZE) {
-                /*
-                 * Get the L2 PA from the L1 PTE, and find
-                 * corresponding L2 VA
-                 */
-                L2_base_pa = hw_mmu_pte_coarsel1(pte_val);
-                L2_base_va = L2_base_pa - p_pt_attrs->l2_base_pa
-                            + p_pt_attrs->l2_base_va;
-                L2_page_num = (L2_base_pa - p_pt_attrs->l2_base_pa) /
-                        HW_MMU_COARSE_PAGE_SIZE;
-                /*
-                 * Find the L2 PTE address from which we will start
-                 * clearing, the number of PTEs to be cleared on this
-                 * page, and the size of VA space that needs to be
-                 * cleared on this L2 page
-                 */
-                pte_addr_l2 = hw_mmu_pte_addr_l2(L2_base_va, vaCurr);
-                pte_count = pte_addr_l2 & (HW_MMU_COARSE_PAGE_SIZE - 1);
-                pte_count = (HW_MMU_COARSE_PAGE_SIZE - pte_count) /
-                        sizeof(UInt32);
-                if (rem_bytes < (pte_count * PAGE_SIZE))
-                    pte_count = rem_bytes / PAGE_SIZE;
-
-                rem_bytes_l2 = pte_count * PAGE_SIZE;
-                /*
-                 * Unmap the VA space on this L2 PT. A quicker way
-                 * would be to clear pte_count entries starting from
-                 * pte_addr_l2. However, below code checks that we don't
-                 * clear invalid entries or less than 64KB for a 64KB
-                 * entry. Similar checking is done for L1 PTEs too
-                 * below
-                 */
-                while (rem_bytes_l2) {
-                    pte_val = *(UInt32 *)pte_addr_l2;
-                    pte_size = hw_mmu_pte_sizel2(pte_val);
-                    /* vaCurr aligned to pte_size? */
-                    if ((pte_size != 0) && (rem_bytes_l2
-                        >= pte_size) &&
-                        !(vaCurr & (pte_size - 1))) {
-                        /* Collect Physical addresses from VA */
-                        pAddr = (pte_val & ~(pte_size - 1));
-                        if (pte_size == HW_PAGE_SIZE_64KB)
-                            numof4Kpages = 16;
-                        else
-                            numof4Kpages = 1;
-                        temp = 0;
-
-                        if (hw_mmu_pte_clear(pte_addr_l2,
-                            vaCurr, pte_size) == RET_OK) {
-                            rem_bytes_l2 -= pte_size;
-                            vaCurr += pte_size;
-                            pte_addr_l2 += (pte_size >> 12)
-                                * sizeof(UInt32);
-                        } else {
-                            status = -EFAULT;
-                            goto EXIT_LOOP;
-                        }
-                    } else
-                        status = -EFAULT;
-                }
-                if (rem_bytes_l2 != 0) {
-                    status = -EFAULT;
-                    goto EXIT_LOOP;
-                }
-                p_pt_attrs->pg_info[L2_page_num].num_entries -=
-                            pte_count;
-                if (p_pt_attrs->pg_info[L2_page_num].num_entries
-                                    == 0) {
-                    /*
-                     * Clear the L1 PTE pointing to the
-                     * L2 PT
-                     */
-                    if (RET_OK != hw_mmu_pte_clear(L1_base_va,
-                        vaCurrOrig, HW_MMU_COARSE_PAGE_SIZE)) {
-                        status = -EFAULT;
-                        goto EXIT_LOOP;
-                    }
-                }
-                rem_bytes -= pte_count * PAGE_SIZE;
-            } else
-                /* vaCurr aligned to pte_size? */
-                /* pte_size = 1 MB or 16 MB */
-                if ((pte_size != 0) && (rem_bytes >= pte_size) &&
-                   !(vaCurr & (pte_size - 1))) {
-                    if (pte_size == HW_PAGE_SIZE_1MB)
-                        numof4Kpages = 256;
-                    else
-                        numof4Kpages = 4096;
-                    temp = 0;
-                    /* Collect Physical addresses from VA */
-                    pAddr = (pte_val & ~(pte_size - 1));
-                    if (hw_mmu_pte_clear(L1_base_va, vaCurr,
-                            pte_size) == RET_OK) {
-                        rem_bytes -= pte_size;
-                        vaCurr += pte_size;
-                    } else {
-                        status = -EFAULT;
-                        goto EXIT_LOOP;
-                    }
-            } else {
-                status = -EFAULT;
-            }
-        }
-    }
-    /*
-     * It is better to flush the TLB here, so that any stale old entries
-     * get flushed
-     */
-EXIT_LOOP:
-    hw_mmu_tlb_flushAll(halObject->mmuBase);
-    return status;
-}
-
-
-/*========================================
- * This sets up the Ducati processor
- *
- */
-Int ducati_setup(OMAP4430DUCATI_HalObject * halObject)
-{
-    Int ret_val = 0;
-
-    if (halObject->procId == PROCTYPE_SYSM3) {
-        ret_val = init_mmu_page_attribs(0x10000, 14, 128);
-        if (ret_val < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "ducati_setup",
-                                 ret_val,
-                                 "init_mmu_page_attribs failed");
-        }
-        else {
-            /* Disable TWL  */
-            ret_val = ducati_set_twl(halObject, FALSE);
-            if (ret_val < 0) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "ducati_setup",
-                                     ret_val,
-                                     "ducati_set_twl to FALSE failed");
-            }
-            else {
-                ret_val = ducati_mmu_init (halObject);
-                if (ret_val < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "ducati_setup",
-                                         ret_val,
-                                         "ducati_mmu_init failed");
-                }
-                else {
-                    ret_val = ducati_set_twl(halObject, TRUE);
-                    if (ret_val < 0) {
-                        GT_setFailureReason (curTrace,
-                                             GT_4CLASS,
-                                             "ducati_setup",
-                                             ret_val,
-                                             "benelli_set_twl to TRUE failed");
-                    }
-                }
-            }
-        }
-    }
-    return ret_val;
-}
-
-
-
-Void ducati_destroy(OMAP4430DUCATI_HalObject * halObject)
-{
-    if (halObject->procId == PROCTYPE_SYSM3) {
-        shm_phys_addr = 0;
-        deinit_mmu_page_attribs();
-    }
-}
-
-
-static Void iotlb_load_cr (OMAP4430DUCATI_HalObject * halObject,
-                           struct cr_regs *cr)
-{
-    ULONG reg;
-    OMAP4430Ducati_MMURegs * mmuRegs =
-                                   (OMAP4430Ducati_MMURegs *)halObject->mmuBase;
-
-    reg = cr->cam | MMU_CAM_V;
-    OUTREG32(&mmuRegs->CAM, reg);
-
-    reg = cr->ram;
-    OUTREG32(&mmuRegs->RAM, reg);
-
-    reg = 1;
-    OUTREG32(&mmuRegs->FLUSH_ENTRY, reg);
-
-    reg = 1;
-    OUTREG32(&mmuRegs->LD_TLB, reg);
-}
-
-
-/**
- * iotlb_dump_cr - Dump an iommu tlb entry into buf
- * @obj:    target iommu
- * @cr:        contents of cam and ram register
- * @buf:    output buffer
- **/
-static UInt32 iotlb_dump_cr (struct cr_regs *cr, char *buf)
-{
-    Char *p = buf;
-
-    if(!cr || !buf)
-        return 0;
-
-    /* FIXME: Need more detail analysis of cam/ram */
-    p += sprintf(p, "%08x %08x %01x\n", (unsigned int)cr->cam,
-                    (unsigned int)cr->ram,
-                    (cr->cam & MMU_CAM_P) ? 1 : 0);
-    return (p - buf);
-}
-
-
-
-static Int iotlb_cr_valid (struct cr_regs *cr)
-{
-    if (!cr)
-        return -EINVAL;
-
-    return (cr->cam & MMU_CAM_V);
-}
-
-
-
-static struct cr_regs *omap4_alloc_cr (struct iotlb_entry *e)
-{
-    struct cr_regs *cr;
-
-    if (e->da & ~(get_cam_va_mask(e->pgsz))) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "omap4_alloc_cr",
-                             -EINVAL,
-                             "failed mask check");
-        return NULL;
-    }
-
-    cr = mmap(NULL,
-              sizeof(struct cr_regs),
-              PROT_NOCACHE | PROT_READ | PROT_WRITE,
-              MAP_ANON | MAP_PHYS | MAP_PRIVATE,
-              NOFD,
-              0);
-
-    if (MAP_FAILED == cr)
-    {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "omap4_alloc_cr",
-                             -EINVAL,
-                             "mmap failed");
-        return NULL;
-    }
-
-    cr->cam = (e->da & MMU_CAM_VATAG_MASK) | e->prsvd | e->pgsz | e->valid;
-    cr->ram = e->pa | e->endian | e->elsz | e->mixed;
-    return cr;
-}
-
-
-
-static struct cr_regs *iotlb_alloc_cr (struct iotlb_entry *e)
-{
-    if (!e) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "iotlb_alloc_cr",
-                             -EINVAL,
-                             "e is NULL");
-        return NULL;
-    }
-
-    return omap4_alloc_cr(e);
-}
-
-
-
-/**
- * load_iotlb_entry - Set an iommu tlb entry
- * @obj:    target iommu
- * @e:        an iommu tlb entry info
- **/
-static Int load_iotlb_entry (OMAP4430DUCATI_HalObject * halObject,
-                             struct iotlb_entry *e)
-{
-    Int err = 0;
-    struct iotlb_lock l;
-    struct cr_regs *cr;
-
-    if (halObject == NULL) {
-        err = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "load_iotlb_entry",
-                             err,
-                             "halObject is NULL");
-        goto out;
-    }
-
-    if (halObject->mmuBase == NULL) {
-        err = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "load_iotlb_entry",
-                             err,
-                             "halObject->mmuBase is NULL");
-        goto out;
-    }
-
-    if (!e) {
-        err = -EINVAL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "load_iotlb_entry",
-                             err,
-                             "e is NULL");
-        goto out;
-    }
-
-    iotlb_getLock(halObject, &l);
-
-    if (l.base == 32) {
-        err = -EBUSY;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "load_iotlb_entry",
-                             err,
-                             "l.base is full");
-        goto out;
-    }
-    if (!e->prsvd) {
-        int i;
-        struct cr_regs tmp;
-
-        for_each_iotlb_cr(32, i, tmp)
-            if (!iotlb_cr_valid(&tmp))
-                break;
-
-        if (i == 32) {
-            err = -EBUSY;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "load_iotlb_entry",
-                                 err,
-                                 "i == 32");
-            goto out;
-        }
-
-        iotlb_getLock(halObject, &l);
-    } else {
-        l.vict = l.base;
-        iotlb_setLock(halObject, &l);
-    }
-
-    cr = iotlb_alloc_cr(e);
-    if (!cr){
-        err = -ENOMEM;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "load_iotlb_entry",
-                             err,
-                             "iotlb_alloc_cr failed");
-        goto out;
-    }
-
-    iotlb_load_cr(halObject, cr);
-    munmap(cr, sizeof(struct cr_regs));
-
-    if (e->prsvd)
-        l.base++;
-    /* increment victim for next tlb load */
-    if (++l.vict == 32)
-        l.vict = l.base;
-    iotlb_setLock(halObject, &l);
-
-out:
-    return err;
-}
-
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHal.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHal.c
deleted file mode 100644 (file)
index 9b3b389..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- *  @file   omap4430DucatiHal.c
- *
- *  @brief      Top-level Hardware Abstraction Module implementation
- *
- *              This module implements the top-level Hardware Abstraction Layer
- *              for OMAP4430.
- *              The implementation is specific to OMAP4430.
- *
- *
- *  @ver        02.00.00.44_pre-alpha3
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2009, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* OSAL & utils headers */
-#include <ti/syslink/utils/Trace.h>
-
-/* Hardware Abstraction Layer headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiPhyShmem.h>
-#include <ti/syslink/utils/OsalPrint.h>
-#define INREG32(x) in32(x)
-#define OUTREG32(x, y) out32(x, y)
-
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/* =============================================================================
- * APIs called by OMAP4430DUCATIPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize the HAL object
- *
- *  @param      halObj      Return parameter: Pointer to the HAL object
- *  @param      initParams  Optional initialization parameters
- *
- *  @sa         OMAP4430DUCATI_halExit
- *              OMAP4430DUCATI_phyShmemInit
- */
-Int
-OMAP4430DUCATI_halInit (Ptr * halObj, Ptr params,UInt16 procId)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-    OMAP4430DUCATIPROC_Params *lpParams = params;
-    GT_2trace (curTrace, GT_ENTER, "OMAP4430DUCATI_halInit", halObj, params);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj ;
-    *halObj = Memory_calloc (NULL, sizeof (OMAP4430DUCATI_HalObject), 0, NULL);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (halObject == NULL) {
-        /*! @retval PROCESSOR_E_MEMORY Memory allocation failed */
-        status = PROCESSOR_E_MEMORY;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATI_halInit",
-                             status,
-                             "Memory allocation failed for HAL object!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        halObject = (OMAP4430DUCATI_HalObject *) *halObj ;
-        halObject->procId = procId;
-        halObject->procHandle = lpParams->procHandle;
-
-        status = OMAP4430DUCATI_phyShmemInit (*halObj, lpParams->memEntries);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halInit",
-                                 status,
-                                 "OMAP4430DUCATI_phyShmemInit failed!");
-            Memory_free (NULL, *halObj, sizeof (OMAP4430DUCATI_HalObject));
-            *halObj = NULL;
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_halInit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to finalize the HAL object
- *
- *  @param      halObj      Pointer to the HAL object
- *
- *  @sa         OMAP4430DUCATI_halInit
- *              OMAP4430DUCATI_phyShmemExit
- */
-Int
-OMAP4430DUCATI_halExit (Ptr halObj, Ptr params)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-    OMAP4430DUCATIPROC_Params *lpParams = params;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATI_halExit", halObj);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj ;
-    status = OMAP4430DUCATI_phyShmemExit(halObj, lpParams->memEntries);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATI_halExit",
-                             status,
-                             "OMAP4430DUCATI_phyShmemExit failed!");
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    if (halObj != NULL) {
-        /* Free the memory for the HAL object. */
-        Memory_free (NULL, halObj, sizeof (OMAP4430DUCATI_HalObject));
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_halExit", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalMmu.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalMmu.c
deleted file mode 100644 (file)
index d311eb5..0000000
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- *  @file   omap4430DucatiHalMmu.c
- *
- *  @brief      Hardware abstraction for Memory Management Unit module.
- *
- *              This module is responsible for handling slave MMU-related
- *              hardware- specific operations.
- *              The implementation is specific to OMAP4430DUCATI.
- *
- *
- *  @ver        02.00.00.44_pre-alpha3
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2009, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* OSAL and utils headers */
-#include <ti/syslink/utils/List.h>
-#include <ti/syslink/utils/Trace.h>
-#include <ti/syslink/utils/OsalPrint.h>
-
-/* Module level headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-
-/* Hardware Abstraction Layer headers */
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalMmu.h>
-#include <OMAP4430DucatiPhyShmem.h>
-#include <OMAP4430DucatiEnabler.h>
-#include <MMUAccInt.h>
-#include <hw/inout.h>
-
-/*QNX specific header include */
-#include <sys/neutrino.h>
-#include <errno.h>
-#include <pthread.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-/*!
- *  @brief  CAM register field values
- */
-#define MMU_CAM_PRESERVE          (1 << 3)
-#define MMU_CAM_VALID             (1 << 2)
-
-/*!
- *  @brief  Addresses lower than this do not go through the DSP's MMU
- */
-#define MMU_GLOBAL_MEMORY         0x11000000
-
-/*!
- *  @brief  Interrupt Id for DSP MMU faults
- */
-#define MMU_FAULT_INTERRUPT          132
-
-/*!
- *  @brief  Size constants
- */
-#define SIZE_4KB                 0x1000
-#define SIZE_64KB               0x10000
-#define SIZE_1MB               0x100000
-#define SIZE_16MB             0x1000000
-
-#define MMU_SECTION_ADDR_MASK    0xFFF00000
-#define MMU_SSECTION_ADDR_MASK   0xFF000000
-#define MMU_PAGE_TABLE_MASK      0xFFFFFC00
-#define MMU_LARGE_PAGE_MASK      0xFFFF0000
-#define MMU_SMALL_PAGE_MASK      0xFFFFF000
-
-
-#define SLAVEVIRTADDR(x)  ((x)->addr [ProcMgr_AddrType_SlaveVirt])
-#define SLAVEPHYSADDR(x)  ((x)->addr [ProcMgr_AddrType_SlavePhys])
-#define MASTERPHYSADDR(x) ((x)->addr [ProcMgr_AddrType_MasterPhys])
-
-#define MMUPAGE_ALIGN(size, psz)  (((size) + psz - 1) & ~(psz -1))
-
-#define IOPTE_SHIFT     12
-#define IOPTE_SIZE      (1 << IOPTE_SHIFT)
-#define IOPTE_MASK      (~(IOPTE_SIZE - 1))
-#define IOPAGE_MASK     IOPTE_MASK
-
-/*!
- *  @def    REG32
- *  @brief  Regsiter access method.
- */
-#define REG32(x)        (*(volatile UInt32 *) (x))
-
-/* =============================================================================
- *  Structures used in this file
- * =============================================================================
- */
-
-/* =============================================================================
- *  Forward declarations of internal functions
- * =============================================================================
- */
-/* Enables the MMU for GEM Module. */
-Int _OMAP4430DUCATI_halMmuEnable (OMAP4430DUCATI_HalObject * halObject,
-                                UInt32                   numMemEntries,
-                                ProcMgr_AddrInfo *       memTable);
-
-/* Disables the MMU for GEM Module. */
-Int _OMAP4430DUCATI_halMmuDisable (OMAP4430DUCATI_HalObject * halObject);
-
-/* This function configures the specified addr to be in the TLB */
-Int _OMAP4430DUCATI_halMmuAddEntry (OMAP4430DUCATI_HalObject * halObject,
-                                        OMAP4430DUCATI_HalMmuEntryInfo * entry);
-
-int _OMAP4430DUCATI_halMmuAddStaticEntries (OMAP4430DUCATI_HalObject * halObject,
-                                          UInt32               numMemEntries,
-                                          ProcMgr_AddrInfo *   memTable);
-
-
-/* Delete entry from TLB. */
-Int _OMAP4430DUCATI_halMmuDeleteEntry (OMAP4430DUCATI_HalObject * halObject,
-                                        OMAP4430DUCATI_HalMmuEntryInfo * entry);
-
-/* Set entry in to TLB. */
-Int _OMAP4430DUCATI_halMmuPteSet (OMAP4430DUCATI_HalObject       * halObject,
-                        OMAP4430DUCATI_HalMmuEntryInfo * setPteInfo);
-
-
-/* =============================================================================
- * APIs called by OMAP4430DUCATIPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control MMU operations for this slave device.
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     MMU control command
- *  @param      arg     Arguments specific to the MMU control command
- *
- *  @sa
- */
-Int
-OMAP4430DUCATI_halMmuCtrl (Ptr halObj, Processor_MmuCtrlCmd cmd, Ptr args)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-
-    GT_3trace (curTrace, GT_ENTER, "OMAP4430DUCATI_halMmuCtrl", halObj, cmd, args);
-
-    GT_assert (curTrace, (halObj != NULL));
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj ;
-
-    switch (cmd) {
-        case Processor_MmuCtrlCmd_Enable:
-        {
-            OMAP4430DUCATI_HalMmuCtrlArgs_Enable * enableArgs;
-            enableArgs = (OMAP4430DUCATI_HalMmuCtrlArgs_Enable *) args;
-            halObject = (OMAP4430DUCATI_HalObject *) halObj;
-            status = _OMAP4430DUCATI_halMmuEnable (halObject,
-                                          enableArgs->numMemEntries,
-                                          enableArgs->memEntries);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status < 0) {
-                /*! @retval PROCESSOR_E_FAIL Failed to configure DSP MMU. */
-                status = PROCESSOR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATI_halMmuCtrl",
-                                     status,
-                                     "Failed to configure DSP MMU");
-            }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-        break;
-
-        case Processor_MmuCtrlCmd_Disable:
-        {
-            /* args are not used. */
-            halObject = (OMAP4430DUCATI_HalObject *) halObj;
-            status = _OMAP4430DUCATI_halMmuDisable (halObject);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status < 0) {
-                /*! @retval PROCESSOR_E_FAIL Failed to configure DSP MMU. */
-                status = PROCESSOR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATI_halMmuCtrl",
-                                     status,
-                                     "Failed to disable DSP MMU");
-            }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-        break ;
-
-        case Processor_MmuCtrlCmd_AddEntry:
-        {
-            OMAP4430DUCATI_HalMmuCtrlArgs_AddEntry * addEntry;
-            addEntry = (OMAP4430DUCATI_HalMmuCtrlArgs_AddEntry *) args;
-
-            halObject = (OMAP4430DUCATI_HalObject *) halObj;
-           /* Add the entry in TLB for new request */
-            //status = _OMAP4430DUCATI_halMmuAddEntry (halObject,addEntry) ;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status < 0) {
-                status = PROCESSOR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATI_halMmuCtrl",
-                                     status,
-                                     "Failed to dynamically add DSP MMU entry");
-            }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        }
-        break;
-
-        case Processor_MmuCtrlCmd_DeleteEntry:
-        {
-            OMAP4430DUCATI_HalMmuCtrlArgs_DeleteEntry * deleteEntry;
-            deleteEntry = (OMAP4430DUCATI_HalMmuCtrlArgs_DeleteEntry *) args;
-
-            halObject = (OMAP4430DUCATI_HalObject *) halObj;
-
-            //status = _OMAP5430DUCATI_halMmuDeleteEntry (halObject,deleteEntry);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status < 0) {
-                status = PROCESSOR_E_FAIL;
-                GT_setFailureReason (curTrace,
-                                  GT_4CLASS,
-                                  "OMAP4430DUCATI_halMmuCtrl",
-                                  status,
-                                  "Failed to dynamically delete DSP MMU entry");
-            }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-        break;
-           default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halMmuCtrl",
-                                 status,
-                                 "Unsupported MMU ctrl cmd specified");
-        }
-        break;
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_halMmuCtrl",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-/* =============================================================================
- * Internal functions
- * =============================================================================
- */
-/*!
- *  @brief      Enables and configures the DSP MMU as per provided memory map.
- *
- *  @param      halObject       Pointer to the HAL object
- *  @param      numMemEntries   Number of memory entries in memTable
- *  @param      memTable        Table of memory entries to be configured
- *
- *  @sa
- */
-
-Int
-_OMAP4430DUCATI_halMmuAddStaticEntries (OMAP4430DUCATI_HalObject * halObject,
-                                  UInt32               numMemEntries,
-                                  ProcMgr_AddrInfo *   memTable)
-{
-    Int                           status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalMmuEntryInfo      staticEntry;
-    UInt32                        i;
-
-    GT_3trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuAddStaticEntries",
-               halObject, numMemEntries, memTable);
-
-    GT_assert (curTrace, (halObject != NULL));
-    /* It is possible that numMemEntries may be 0, if user does not want to
-     * configure any default regions.
-     * memTable may also be NULL.
-     */
-
-    for (i = 0 ; i < numMemEntries && (status >= 0) ; i++) {
-        if (SLAVEVIRTADDR (&memTable [i]) >= MMU_GLOBAL_MEMORY) {
-            /* Configure the TLB */
-            if (memTable [i].size != 0)
-            {
-                staticEntry.slaveVirtAddr =
-                                         SLAVEVIRTADDR (&memTable [i]);
-                staticEntry.size          = memTable[i].size;
-                staticEntry.masterPhyAddr =
-                                         MASTERPHYSADDR (&memTable [i]);
-                /*TBD : elementSize, endianism, mixedSized are hard
-                 *      coded now, must be configurable later*/
-                staticEntry.elementSize   = MMU_RAM_ELSZ_16;
-                staticEntry.endianism     = LITTLE_ENDIAN;
-                staticEntry.mixedSize     = MMU_TLBES;
-                status = _OMAP4430DUCATI_halMmuAddEntry (halObject,
-                                                   &staticEntry);
-                if (status < 0) {
-                    /*! @retval PROCESSOR_E_FAIL Failed to add MMU entry. */
-                    status = PROCESSOR_E_FAIL;
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "_OMAP4430DUCATI_halMmuAddStaticEntries",
-                                         status,
-                                         "Failed to add MMU entry!");
-                }
-            }
-        }
-    }
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuAddStaticEntries", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status ;
-}
-
-
-/* =============================================================================
- * Internal functions
- * =============================================================================
- */
-/*!
- *  @brief      Function to check and clear the remote proc interrupt
- *
- *  @param      arg     Optional argument to the function.
- *
- *  @sa         _OMAP4430DUCATI_halMmuInt_isr
- */
-static
-Bool
-_OMAP4430DUCATI_halMmuCheckAndClearFunc (Ptr arg)
-{
-    OMAP4430DUCATI_HalObject * halObject = (OMAP4430DUCATI_HalObject *)arg;
-    OMAP4430DUCATI_HalMmuObject * mmuObj = &(halObject->mmuObj);
-
-    /* Check the interrupt status */
-    mmuObj->mmuIrqStatus = REG32(halObject->mmuBase + MMU_MMU_IRQSTATUS_OFFSET);
-    mmuObj->mmuIrqStatus &= MMU_IRQ_MASK;
-    if (!(mmuObj->mmuIrqStatus))
-        return (FALSE);
-
-    /* Get the fault address. */
-    mmuObj->mmuFaultAddr = REG32(halObject->mmuBase + MMU_MMU_FAULT_AD_OFFSET);
-
-    /* Print the fault information */
-    GT_0trace (curTrace, GT_4CLASS,
-               "**************** Ducati-MMU Fault ****************");
-    GT_1trace (curTrace, GT_4CLASS,
-               "****    addr: 0x%x", mmuObj->mmuFaultAddr);
-    if (mmuObj->mmuIrqStatus & MMU_IRQ_TLBMISS)
-        GT_0trace (curTrace, GT_4CLASS, "****    TLBMISS");
-    if (mmuObj->mmuIrqStatus & MMU_IRQ_TRANSLATIONFAULT)
-        GT_0trace (curTrace, GT_4CLASS, "****    TRANSLATIONFAULT");
-    if (mmuObj->mmuIrqStatus & MMU_IRQ_EMUMISS)
-        GT_0trace (curTrace, GT_4CLASS, "****    EMUMISS");
-    if (mmuObj->mmuIrqStatus & MMU_IRQ_TABLEWALKFAULT)
-        GT_0trace (curTrace, GT_4CLASS, "****    TABLEWALKFAULT");
-    if (mmuObj->mmuIrqStatus & MMU_IRQ_MULTIHITFAULT)
-        GT_0trace (curTrace, GT_4CLASS, "****    MULTIHITFAULT");
-    GT_0trace (curTrace, GT_4CLASS,
-               "**************************************************");
-
-    /* Clear the interrupt and disable further interrupts. */
-    REG32(halObject->mmuBase + MMU_MMU_IRQENABLE_OFFSET) = 0x0;
-    REG32(halObject->mmuBase + MMU_MMU_IRQSTATUS_OFFSET) = mmuObj->mmuIrqStatus;
-
-    /* This is not a shared interrupt, so interrupt has always occurred */
-    /*! @retval TRUE Interrupt has occurred. */
-    return (TRUE);
-}
-
-/*!
- *  @brief      Interrupt Service Routine for Omap4430DucatiHalMmu module
- *
- *  @param      arg     Optional argument to the function.
- *
- *  @sa         _OMAP4430DUCATI_halMmuCheckAndClearFunc
- */
-static
-Bool
-_OMAP4430DUCATI_halMmuInt_isr (Ptr arg)
-{
-    OMAP4430DUCATI_HalObject * halObject = (OMAP4430DUCATI_HalObject *)arg;
-    OMAP4430DUCATIPROC_Object * proc4430Object = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuInt_isr", arg);
-    OMAP4430DUCATIPROC_open((OMAP4430DUCATIPROC_Handle *)&proc4430Object, halObject->procId);
-    Processor_setState(proc4430Object->procHandle, ProcMgr_State_Mmu_Fault);
-    OMAP4430DUCATIPROC_close((OMAP4430DUCATIPROC_Handle *)&proc4430Object);
-
-
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuInt_isr", TRUE);
-
-    /*! @retval TRUE Interrupt has been handled. */
-    return (TRUE);
-}
-
-/*!
- *  @brief      Enables and configures the DSP MMU as per provided memory map.
- *
- *  @param      halObject       Pointer to the HAL object
- *  @param      numMemEntries   Number of memory entries in memTable
- *  @param      memTable        Table of memory entries to be configured
- *
- *  @sa
- */
-Int
-_OMAP4430DUCATI_halMmuEnable (OMAP4430DUCATI_HalObject * halObject,
-                            UInt32                   numMemEntries,
-                            ProcMgr_AddrInfo *       memTable)
-{
-    Int                           status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalMmuObject *       mmuObj;
-    OsalIsr_Params isrParams;
-
-    GT_3trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuEnable",
-               halObject, numMemEntries, memTable);
-
-    GT_assert (curTrace, (halObject != NULL));
-    /* It is possible that numMemEntries may be 0, if user does not want to
-     * configure any default regions.
-     * memTable may also be NULL.
-     */
-    mmuObj = &(halObject->mmuObj);
-
-    /* Create the ISR to listen for MMU Faults */
-    isrParams.sharedInt        = FALSE;
-    isrParams.checkAndClearFxn = &_OMAP4430DUCATI_halMmuCheckAndClearFunc;
-    isrParams.fxnArgs          = halObject;
-    isrParams.intId            = MMU_FAULT_INTERRUPT;
-    mmuObj->isrHandle = OsalIsr_create (&_OMAP4430DUCATI_halMmuInt_isr,
-                                        halObject,
-                                        &isrParams);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (mmuObj->isrHandle == NULL) {
-        /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed */
-        status = PROCESSOR_E_FAIL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_OMAP4430DUCATI_halMmuEnable",
-                             status,
-                             "OsalIsr_create failed");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        status = OsalIsr_install (mmuObj->isrHandle);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_OMAP4430DUCATI_halMmuEnable",
-                                 status,
-                                 "OsalIsr_install failed");
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuEnable", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status ;
-}
-
-
-/*!
- *  @brief      Disables the DSP MMU.
- *
- *  @param      halObject       Pointer to the HAL object
- *
- *  @sa
- */
-Int
-_OMAP4430DUCATI_halMmuDisable (OMAP4430DUCATI_HalObject * halObject)
-{
-    Int                        status    = PROCESSOR_SUCCESS;
-    Int                        tmpStatus = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalMmuObject *    mmuObj;
-
-    GT_1trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuDisable", halObject);
-
-    GT_assert (curTrace, (halObject != NULL));
-    mmuObj = &(halObject->mmuObj);
-
-    status = OsalIsr_uninstall (mmuObj->isrHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status < 0) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_OMAP4430DUCATI_halMmuDisable",
-                             status,
-                             "OsalIsr_uninstall failed");
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    tmpStatus =
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        OsalIsr_delete (&(mmuObj->isrHandle));
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if ((status >= 0) && (tmpStatus < 0)) {
-        status = tmpStatus;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "_OMAP4430DUCATI_halMmuDisable",
-                             status,
-                             "OsalIsr_delete failed");
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuDisable", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status;
-}
-
-
-/*!
- *  @brief      This function adds an MMU entry for the specfied address and
- *              size.
- *
- *  @param      halObject   Pointer to the HAL object
- *  @param      slaveVirtAddr DSP virtual address of the memory region
- *  @param      size        Size of the memory region to be configured
- *  @param      isDynamic   Is the MMU entry being dynamically added?
- *
- *  @sa
- */
-Int _OMAP4430DUCATI_halMmuAddEntry (OMAP4430DUCATI_HalObject * halObject,
-                                        OMAP4430DUCATI_HalMmuEntryInfo * entry)
-{
-    Int                         status = PROCESSOR_SUCCESS;
-    UInt32  *                   ppgd = NULL;
-    UInt32  *                   ppte = NULL;
-    OMAP4430DUCATI_HalMmuEntryInfo    currentEntry;
-    OMAP4430DUCATI_HalMmuEntryInfo    te;
-    Int32                       currentEntrySize;
-
-    GT_2trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuAddEntry",
-               halObject, entry);
-
-    GT_assert (curTrace, (halObject != NULL));
-    GT_assert (curTrace, (entry     != NULL));
-
-    /* Add the entry (or entries) */
-    if (status >= 0) {
-        Memory_copy(&currentEntry,
-                    entry,
-                    sizeof(OMAP4430DUCATI_HalMmuEntryInfo));
-
-        /* Align the addresses to page size */
-        currentEntry.size += (currentEntry.slaveVirtAddr & (PAGE_SIZE_4KB -1));
-        currentEntry.slaveVirtAddr &= ~(PAGE_SIZE_4KB-1);
-        currentEntry.masterPhyAddr &= ~(PAGE_SIZE_4KB-1);
-
-        /* Align the size as well */
-        currentEntry.size = MMUPAGE_ALIGN(currentEntry.size, PAGE_SIZE_4KB);
-        currentEntrySize = currentEntry.size;
-
-        /* Check every page if exists */
-        do {
-            /* Lookup if the entry exists */
-            if (1)//!*ppgd || !*ppte)
-            {
-                /* Entry doesnot exists, insert this page */
-                te.size = PAGE_SIZE_4KB;
-                te.slaveVirtAddr = currentEntry.slaveVirtAddr;
-                te.masterPhyAddr = currentEntry.masterPhyAddr;
-                te.elementSize   = ELEM_SIZE_16BIT;
-                te.endianism     = LITTLE_ENDIAN;
-                te.mixedSize     = MMU_TLBES;
-                status = _OMAP4430DUCATI_halMmuPteSet (halObject, &te);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                if (status < 0) {
-                    GT_setFailureReason (
-                                    curTrace,
-                                    GT_4CLASS,
-                                    "_OMAP4430DUCATI_halMmuAddEntry",
-                                    status,
-                                    "Failed to in _OMAP4430DUCATI_halMmuPteSet!");
-                }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            }
-            else if (*ppgd && *ppte) {
-                if (currentEntry.masterPhyAddr != (*ppte & IOPAGE_MASK)) {
-                    /* Entry doesnot exists, insert this page */
-                    te.size = PAGE_SIZE_4KB;
-                    te.slaveVirtAddr = currentEntry.slaveVirtAddr;
-                    te.masterPhyAddr = currentEntry.masterPhyAddr;
-                    te.elementSize   = ELEM_SIZE_16BIT;
-                    te.endianism     = LITTLE_ENDIAN;
-                    te.mixedSize     = MMU_TLBES;
-                    status = _OMAP4430DUCATI_halMmuPteSet (halObject, &te);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (status < 0) {
-                        GT_setFailureReason (
-                                        curTrace,
-                                        GT_4CLASS,
-                                        "_OMAP4430DUCATI_halMmuAddEntry",
-                                        status,
-                                        "Failed to in _OMAP4430DUCATI_halMmuPteSet!");
-                    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                }
-            }
-
-            currentEntrySize -= PAGE_SIZE_4KB;
-            currentEntry.slaveVirtAddr += PAGE_SIZE_4KB;
-            currentEntry.masterPhyAddr += PAGE_SIZE_4KB;
-        } while (currentEntrySize);
-
-    }
-
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuAddEntry", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status;
-}
-
-
-/*!
- *  @brief      This function deletes an MMU entry for the specfied address and
- *              size.
- *
- *  @param      halObject   Pointer to the HAL object
- *  @param      slaveVirtAddr DSP virtual address of the memory region
- *  @param      size        Size of the memory region to be configured
- *  @param      isDynamic   Is the MMU entry being dynamically added?
- *
- *  @sa
- */
-Int _OMAP4430DUCATI_halMmuDeleteEntry (OMAP4430DUCATI_HalObject * halObject,
-                                        OMAP4430DUCATI_HalMmuEntryInfo * entry)
-{
-    Int                         status      = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalMmuObject *     mmuObj;
-
-
-    GT_2trace (curTrace, GT_ENTER, "_OMAP4430DUCATI_halMmuDeleteEntry",
-               halObject, entry);
-
-    GT_assert (curTrace, (halObject            != NULL));
-    GT_assert (curTrace, (entry                != NULL));
-    //GT_assert (curTrace, (entry->slaveVirtAddr != 0)); // 0 is a valid slave virtual addr
-    GT_assert (curTrace, (entry->size          != 0));
-
-    mmuObj = &(halObject->mmuObj);
-
-    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuDeleteEntry", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status;
-}
-
-static ULONG HAL_MMU_PteAddrL1(const ULONG L1_base, const ULONG va)
-{
-    ULONG TTB_13_to_7, VA_31_to_20, desc_13_to_0;
-
-    TTB_13_to_7  = L1_base & (0x7FUL << 13);
-    VA_31_to_20  = va >> (20 - 2); /* Left-shift by 2 here itself */
-    desc_13_to_0 = (TTB_13_to_7 + VA_31_to_20) & (0xFFFUL << 2);
-
-    return ( (L1_base & 0xFFFFC000) | desc_13_to_0 );
-}
-
-static ULONG HAL_MMU_PteAddrL2(const ULONG L2_base, const ULONG va)
-{
-    return ( (L2_base & 0xFFFFFC00) | ( (va >> 10) & 0x3FC ) );
-}
-
-#define OUTREG32(x, y)      WRITE_REGISTER_ULONG(x, (ULONG)(y))
-
-int OMAP4430DUCATI_InternalMMU_PteSet (const ULONG        pgTblVa,
-                                      struct iotlb_entry    *mapAttrs)
-{
-    Int status = 0;
-    ULONG pteAddr, pteVal;
-    Int  numEntries = 1;
-    ULONG  physicalAddr = mapAttrs->pa;
-    ULONG  virtualAddr  = mapAttrs->da;
-
-    switch (mapAttrs->pgsz)
-    {
-    case MMU_CAM_PGSZ_4K:
-        pteAddr = HAL_MMU_PteAddrL2(pgTblVa, virtualAddr & MMU_SMALL_PAGE_MASK);
-        pteVal = ( (physicalAddr & MMU_SMALL_PAGE_MASK) |
-                    (mapAttrs->endian << 9) |
-                    (mapAttrs->elsz << 4) |
-                    (mapAttrs->mixed << 11) | 2
-                  );
-        break;
-
-    case MMU_CAM_PGSZ_64K:
-        numEntries = 16;
-        pteAddr = HAL_MMU_PteAddrL2(pgTblVa, virtualAddr & MMU_LARGE_PAGE_MASK);
-        pteVal = ( (physicalAddr & MMU_LARGE_PAGE_MASK) |
-                    (mapAttrs->endian << 9) |
-                    (mapAttrs->elsz << 4) |
-                    (mapAttrs->mixed << 11) | 1
-                  );
-        break;
-
-    case MMU_CAM_PGSZ_1M:
-        pteAddr = HAL_MMU_PteAddrL1(pgTblVa, virtualAddr & MMU_SECTION_ADDR_MASK);
-        pteVal = ( ( ( (physicalAddr & MMU_SECTION_ADDR_MASK) |
-                     (mapAttrs->endian << 15) |
-                     (mapAttrs->elsz << 10) |
-                     (mapAttrs->mixed << 17)) &
-                     ~0x40000) | 0x2
-                 );
-        break;
-
-    case MMU_CAM_PGSZ_16M:
-        numEntries = 16;
-        pteAddr = HAL_MMU_PteAddrL1(pgTblVa, virtualAddr & MMU_SSECTION_ADDR_MASK);
-        pteVal = ( ( (physicalAddr & MMU_SSECTION_ADDR_MASK) |
-                      (mapAttrs->endian << 15) |
-                      (mapAttrs->elsz << 10) |
-                      (mapAttrs->mixed << 17)
-                    ) | 0x40000 | 0x2
-                  );
-        break;
-
-    default:
-        return -1;
-    }
-
-    while (--numEntries >= 0)
-    {
-#ifdef MMUTEST
-        ((ULONG*)pteAddr)[numEntries] = pteVal;
-#endif
-    }
-
-    return status;
-}
-/*!
- *  @brief      Updates entries in table.
- *
- *  @param      refData Argument provided to the ISR registration function
- *
- *  @sa
- */
-Int
-_OMAP4430DUCATI_halMmuPteSet (OMAP4430DUCATI_HalObject *      halObject,
-                        OMAP4430DUCATI_HalMmuEntryInfo* setPteInfo)
-{
-    OMAP4430DUCATI_HalMmuObject *     mmuObj;
-    struct iotlb_entry tlb_entry;
-    Int    status = PROCESSOR_SUCCESS;
-//    Commented as TRACEENTER log takes long time
-//    GT_2trace (curTrace,
-//               GT_ENTER,
-//               "_OMAP4430DUCATI_halMmuPteSet",
-//               halObject,
-//               setPteInfo);
-
-    GT_assert (curTrace, (halObject  != NULL));
-    GT_assert (curTrace, (setPteInfo != NULL));
-
-    mmuObj = &(halObject->mmuObj);
-    GT_assert(curTrace, (mmuObj != NULL));
-
-    switch (setPteInfo->size) {
-        case PAGE_SIZE_16MB:
-             tlb_entry.pgsz = MMU_CAM_PGSZ_16M;
-             break;
-        case PAGE_SIZE_1MB:
-             tlb_entry.pgsz = MMU_CAM_PGSZ_1M;
-             break;
-        case PAGE_SIZE_64KB:
-             tlb_entry.pgsz = MMU_CAM_PGSZ_64K;
-             break;
-        case PAGE_SIZE_4KB:
-             tlb_entry.pgsz = MMU_CAM_PGSZ_4K;
-             break;
-        default :
-            status = PROCESSOR_E_INVALIDARG;
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid Page size passed!. */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "_OMAP4430DUCATI_halMmuPteSet",
-                                 status,
-                                 "Invalid Page size passed!");
-    }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status >= 0) {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        tlb_entry.prsvd  = MMU_CAM_PRESERVE;
-        tlb_entry.valid  = MMU_CAM_VALID;
-        /*TBD : elsz parameter has to be configured*/
-        switch (setPteInfo->elementSize) {
-            case ELEM_SIZE_8BIT:
-                 tlb_entry.elsz = MMU_RAM_ELSZ_8;
-                 break;
-            case ELEM_SIZE_16BIT:
-                 tlb_entry.elsz = MMU_RAM_ELSZ_16;
-                 break;
-            case ELEM_SIZE_32BIT:
-                 tlb_entry.elsz = MMU_RAM_ELSZ_32;
-                 break;
-            case ELEM_SIZE_64BIT:
-                 tlb_entry.elsz = 0x3; /* No translation */
-                 break;
-            default :
-                status = PROCESSOR_E_INVALIDARG;
-                /*! @retval PROCESSOR_E_INVALIDARG Invalid elementSize passed!*/
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "_OMAP4430DUCATI_halMmuPteSet",
-                                     status,
-                                     "Invalid elementSize passed!");
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status >= 0) {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            /*TBD : endian parameter has to configured*/
-            switch (setPteInfo->endianism) {
-                case LITTLE_ENDIAN:
-                        tlb_entry.endian = MMU_RAM_ENDIAN_LITTLE;
-                        break;
-                case BIG_ENDIAN:
-                        tlb_entry.endian = MMU_RAM_ENDIAN_BIG;
-                        break;
-                default :
-                    status = PROCESSOR_E_INVALIDARG;
-                    /*! @retval PROCESSOR_E_INVALIDARG Invalid endianism
-                     *                                 passed!. */
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "_OMAP4430DUCATI_halMmuPteSet",
-                                         status,
-                                         "Invalid endianism passed!");
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (status >= 0) {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                /*TBD : mixed parameter has to configured*/
-                switch (setPteInfo->mixedSize) {
-                    case MMU_TLBES:
-                            tlb_entry.mixed = MMU_RAM_DEFAULT;
-                            break;
-                    case MMU_CPUES:
-                            tlb_entry.mixed = MMU_RAM_MIXED;
-                            break;
-                    default :
-                        status = PROCESSOR_E_INVALIDARG;
-                        /*! @retval PROCESSOR_E_INVALIDARG Invalid
-                         *                                 mixed size passed!*/
-                        GT_setFailureReason (curTrace,
-                                             GT_4CLASS,
-                                             "_OMAP4430DUCATI_halMmuPteSet",
-                                             status,
-                                             "Invalid mixed size passed!");
-                }
-
-                tlb_entry.da = setPteInfo->slaveVirtAddr;
-                tlb_entry.pa = setPteInfo->masterPhyAddr;
-
-                if (OMAP4430DUCATI_InternalMMU_PteSet(halObject->mmuBase, &tlb_entry)){
-                    status = PROCESSOR_E_STOREENTERY;
-                    GT_setFailureReason (curTrace,
-                            GT_4CLASS,
-                            "_OMAP4430DUCATI_halMmuPteSet",
-                            status,
-                            "iopgtable_store_entry failed!");
-                }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            }
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-//    GT_1trace (curTrace, GT_LEAVE, "_OMAP4430DUCATI_halMmuPteSet", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation completed successfully. */
-    return status;
-}
-
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalReset.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiHalReset.c
deleted file mode 100644 (file)
index 0d07ff4..0000000
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- *  @file   omap4430DucatiHalReset.c
- *
- *  @brief      Reset control module.
- *
- *              This module is responsible for handling reset-related hardware-
- *              specific operations.
- *              The implementation is specific to OMAP4430DUCATI.
- *
- *
- *  @ver        02.00.00.44_pre-alpha3
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2009, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-/*QNX specific header include */
-#include <errno.h>
-
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/Trace.h>
-#include <Bitops.h>
-
-/* Module level headers */
-#include <_ProcDefs.h>
-#include <Processor.h>
-#include <OsalDrv.h>
-
-/* Hardware Abstraction Layer headers */
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalReset.h>
-#include "OMAP4430DucatiEnabler.h"
-#include <hw/inout.h>
-#include <_ipu_pm.h>
-#include <ipu_pm.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-#define GPT_IRQSTATUS_OFFSET 0x28
-
-/* =============================================================================
- * APIs called by OMAP4430DUCATIPROC module
- * =============================================================================
- */
-/*!
- *  @brief      Function to control reset operations
- *
- *  @param      halObj  Pointer to the HAL object
- *  @param      cmd     Reset control command
- *  @param      arg     Arguments specific to the reset control command
- *
- *  @sa
- */
-Int
-OMAP4430DUCATI_halResetCtrl (Ptr halObj, Processor_ResetCtrlCmd cmd,UInt32 entryPt)
-{
-    Int                  status    = PROCESSOR_SUCCESS;
-    OMAP4430DUCATI_HalObject * halObject = NULL;
-    UINT32 pa;
-    int counter = 10;
-    UINT32 M3RstCtrl;
-    UINT32 M3ClkCtrl;
-    UINT32 M3RstSt;
-    UINT32 M3ClkStCtrl;
-    Int ret;
-
-    GT_3trace (curTrace, GT_ENTER, "OMAP4430DUCATI_halResetCtrl", halObj, cmd, entryPt);
-
-    GT_assert (curTrace, (halObj != NULL));
-    GT_assert (curTrace, (cmd < Processor_ResetCtrlCmd_EndValue));
-
-    ULONG reg = 0;
-    ULONG resets = 0;
-    pa = RM_MPU_M3_RSTCTRL;
-    M3RstCtrl = (UINT32)OsalDrv_ioMap(pa, sizeof(ULONG));
-
-    pa = CM_MPU_M3_MPU_M3_CLKCTRL;
-    M3ClkCtrl = (UINT32)OsalDrv_ioMap(pa, sizeof(ULONG));
-
-    pa = RM_MPU_M3_RSTST;
-    M3RstSt = (UINT32)OsalDrv_ioMap(pa, sizeof(ULONG));
-    pa = CM_MPU_M3_CLKSTCTRL;
-    M3ClkStCtrl = (UINT32)OsalDrv_ioMap(pa, sizeof(ULONG));
-
-    halObject = (OMAP4430DUCATI_HalObject *) halObj ;
-
-    switch (cmd) {
-        case Processor_ResetCtrlCmd_Reset:
-        {
-            switch (halObject->procId) {
-                case PROCTYPE_SYSM3:
-                    /* Put SYSM3 into reset */
-                    SETBITREG32(M3RstCtrl, RM_MPU_M3_RST1_BIT);
-                    /* Read back the reset control register */
-                    reg = INREG32(M3RstCtrl);
-                    /* Disable the GPT3 clock, which is used by CORE0 */
-                    ret = ipu_pm_gpt_stop(GPTIMER_3);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to stop gpt 3");
-                    }
-                    ret = ipu_pm_gpt_disable(GPTIMER_3);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to disable gpt 3");
-                    }
-                    break;
-                case PROCTYPE_APPM3:
-                    /* Put APPM3 into reset */
-                    SETBITREG32(M3RstCtrl, RM_MPU_M3_RST2_BIT);
-#ifndef SYSLINK_SYSBIOS_SMP
-                    /* Disable the GPT4 clock, which is used by CORE1 */
-                    ret = ipu_pm_gpt_stop(GPTIMER_4);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to stop gpt 4");
-                    }
-                    ret = ipu_pm_gpt_disable(GPTIMER_4);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to disable gpt 4");
-                    }
-#endif
-                    break;
-                default:
-                    break;
-            }
-        }
-        break;
-
-        case Processor_ResetCtrlCmd_MMU_Reset:
-        {
-            switch (halObject->procId) {
-                case PROCTYPE_SYSM3:
-                    /* Put M3  MMU into reset */
-                    SETBITREG32(M3RstCtrl, RM_MPU_M3_RST3_BIT);
-                    /* Disable the M3 clock */
-                    OUTREG32(M3ClkCtrl, 0x01);
-                    break;
-                case PROCTYPE_APPM3:
-                    break;
-                default:
-                    break;
-            }
-        }
-        break;
-
-        case Processor_ResetCtrlCmd_MMU_Release:
-        {
-            reg = INREG32(M3RstSt);
-            if (reg != 0x0) {
-                Osal_printf("OMAP4430DUCATI_halResetCtrl: clearing reset status!");
-                OUTREG32(M3RstSt,reg);
-                do {
-                    if ((reg = INREG32(M3RstSt)) == 0x0)
-                        break;
-                } while (--counter);
-
-                if (reg == 0x0) {
-                    Osal_printf("OMAP4430DUCATI_halResetCtrl: reset state reset!");
-                }
-                else {
-                    status = PROCESSOR_E_FAIL;
-                    GT_setFailureReason (curTrace, GT_4CLASS,
-                                         "OMAP4430DUCATI_halResetCtrl", status,
-                                         "Failed to clear reset status");
-                }
-            }
-            if (status >= 0) {
-                reg = INREG32(M3RstCtrl);
-                Osal_printf("OMAP4430DUCATI_halResetCtrl: Reset Control [0x%x]",
-                            reg);
-
-                switch (halObject->procId) {
-                    case PROCTYPE_SYSM3:
-                        /* Module is managed automatically by HW */
-                        OUTREG32(M3ClkCtrl,
-                                 CM_MPU_M3_MPU_M3_CLKCTRL_MODULEMODE_HWAUTO);
-                        /* Enable the M3 clock */
-                        OUTREG32(M3ClkStCtrl, CM_MPU_M3_CLKSTCTRL_CTRL_SW_WKUP);
-
-                        counter = 10;
-                        do {
-                            if (TESTBITREG32(M3ClkStCtrl,
-                                         CM_MPU_M3_CLKSTCTRL_CLKACTIVITY_BIT)) {
-                                Osal_printf("M3 clock enabled:"
-                                            "CORE_CM2_DUCATI_CLKSTCTRL = 0x%x",
-                                            INREG32(M3ClkStCtrl));
-                                break;
-                            }
-                        } while (--counter);
-
-                        if (counter == 0) {
-                            Osal_printf("FAILED TO ENABLE DUCATI M3 CLOCK !");
-                            return PROCESSOR_E_OSFAILURE;
-                        }
-
-                        /* Check that releasing resets would indeed be
-                         * effective */
-                        reg = INREG32(M3RstCtrl);
-                        resets = RM_MPU_M3_RST3 | RM_MPU_M3_RST2 | RM_MPU_M3_RST1;
-                        if (reg != resets) {
-                            Osal_printf("OMAP4430DUCATI_halResetCtrl: "
-                                        "Resets in not proper state! [0x%x]",
-                                        reg);
-                            OUTREG32(M3RstCtrl,resets);
-                            counter = 10;
-                            do {
-                                if ((INREG32(M3RstCtrl) & resets) == resets)
-                                    break;
-                            } while (--counter);
-
-                            if (counter == 0) {
-                                status = PROCESSOR_E_FAIL;
-                                GT_setFailureReason (curTrace, GT_4CLASS,
-                                        "OMAP4430DUCATI_halResetCtrl",
-                                        status,
-                                        "Failed to put resets in proper state");
-                            }
-                        }
-
-                        if (status >= 0) {
-                            /* De-assert RST3, and clear the Reset status */
-                            Osal_printf("De-assert RST3");
-                            CLRBITREG32(M3RstCtrl, RM_MPU_M3_RST3_BIT);
-
-                            counter = 10;
-                            do {
-                                if (INREG32(M3RstSt) & RM_MPU_M3_RST3ST)
-                                    break;
-                            } while (--counter);
-                            if (counter == 0) {
-                                status = PROCESSOR_E_FAIL;
-                                GT_setFailureReason (curTrace, GT_4CLASS,
-                                                  "OMAP4430DUCATI_halResetCtrl",
-                                                  status,
-                                                  "Failed to release RST3");
-                            }
-                            else {
-                                Osal_printf("RST3 released!");
-                                SETBITREG32(M3RstSt, RM_MPU_M3_RST3ST_BIT);
-                            }
-                        }
-                        break;
-                    case PROCTYPE_APPM3:
-                        break;
-                    default:
-                        Osal_printf("proc4430_start: ERROR input");
-                        break;
-                }
-            }
-        }
-        break;
-
-        case Processor_ResetCtrlCmd_Release:
-        {
-            switch (halObject->procId) {
-                case PROCTYPE_SYSM3:
-                    /* Enable the GPT3 clock, which is used by CORE0 */
-                    ret = ipu_pm_gpt_enable(GPTIMER_3);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to enable gpt 3");
-                    }
-                    else {
-                        restore_gpt_context(GPTIMER_3);
-                        ret = ipu_pm_gpt_start(GPTIMER_3);
-                        if (ret != EOK) {
-                            status = PROCESSOR_E_FAIL;
-                            GT_setFailureReason (curTrace, GT_4CLASS,
-                                                 "OMAP4430DUCATI_halResetCtrl",
-                                                 status,
-                                                 "Failed to start gpt 3");
-                        }
-                        else {
-                            /* De-assert RST1, and clear the Reset status */
-                            Osal_printf("De-assert RST1");
-                            CLRBITREG32(M3RstCtrl, RM_MPU_M3_RST1_BIT);
-
-                            counter = 10;
-                            do {
-                                if (INREG32(M3RstSt) & RM_MPU_M3_RST1)
-                                    break;
-                            } while (--counter);
-                            if (counter == 0) {
-                                status = PROCESSOR_E_FAIL;
-                                GT_setFailureReason (curTrace, GT_4CLASS,
-                                                  "OMAP4430DUCATI_halResetCtrl",
-                                                  status,
-                                                  "Failed to release RST1");
-                            }
-                            else {
-                                Osal_printf("RST1 released!");
-                                SETBITREG32(M3RstSt, RM_MPU_M3_RST1ST_BIT);
-
-                                /* Setting to HW_AUTO Mode */
-                                reg = INREG32(M3ClkStCtrl);
-                                reg &= ~CM_MPU_M3_CLKSTCTRL_CTRL_BITMASK;
-                                reg |= CM_MPU_M3_CLKSTCTRL_CTRL_HW_AUTO;
-                                OUTREG32(M3ClkStCtrl, reg);
-                            }
-                        }
-                    }
-                    break;
-                case PROCTYPE_APPM3:
-#ifndef SYSLINK_SYSBIOS_SMP
-                    /* Enable the GPT4 clock, which is used by CORE1 */
-                    ret = ipu_pm_gpt_enable(GPTIMER_4);
-                    if (ret != EOK) {
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace, GT_4CLASS,
-                                             "OMAP4430DUCATI_halResetCtrl",
-                                             status,
-                                             "Failed to enable gpt 4");
-                    }
-                    else {
-                        restore_gpt_context(GPTIMER_4);
-                        ipu_pm_gpt_start(GPTIMER_4);
-#endif
-
-                        /* De-assert RST2, and clear the Reset status */
-                        CLRBITREG32(M3RstCtrl, RM_MPU_M3_RST2_BIT);
-
-                        counter = 10;
-                        do {
-                            if (INREG32(M3RstSt) & RM_MPU_M3_RST2)
-                                break;
-                        } while (--counter);
-                        if (counter == 0) {
-                            status = PROCESSOR_E_FAIL;
-                            GT_setFailureReason (curTrace, GT_4CLASS,
-                                                 "OMAP4430DUCATI_halResetCtrl",
-                                                 status,
-                                                 "Failed to release RST2");
-                        }
-                        else {
-                            Osal_printf("RST2 released!");
-                            SETBITREG32(M3RstSt, RM_MPU_M3_RST2ST_BIT);
-                            /* Wait until ducati is in idle */
-                            //while(TESTBITREG32(M3ClkStCtrl,
-                            //            CM_MPU_M3_CLKSTCTRL_CLKACTIVITY_BIT));
-                        }
-#ifndef SYSLINK_SYSBIOS_SMP
-                    }
-#endif
-                    break;
-                default:
-                    Osal_printf("OMAP430DUCATI_halResetCtrl: ERROR input");
-                    break;
-            }
-        }
-        break;
-
-        default:
-        {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halResetCtrl",
-                                 status,
-                                 "Unsupported reset ctrl cmd specified");
-        }
-        break;
-    }
-    OsalDrv_ioUnmap(M3ClkStCtrl, sizeof(ULONG));
-    OsalDrv_ioUnmap(M3ClkCtrl, sizeof(ULONG));
-    OsalDrv_ioUnmap(M3RstCtrl, sizeof(ULONG));
-    OsalDrv_ioUnmap(M3RstSt, sizeof(ULONG));
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATI_halResetCtrl", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-
-    return status;
-}
-
-
-#if defined (__cplusplus)
-}
-#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiProc.c b/qnx/src/ipc3x_dev/ti/syslink/family/omap4430/ipu/omap4430DucatiProc.c
deleted file mode 100644 (file)
index 4575686..0000000
+++ /dev/null
@@ -1,2056 +0,0 @@
-/*
- *  @file   omap4430DucatiProc.c
- *
- * @brief       Processor implementation for OMAP4430DUCATI.
- *
- *              This module is responsible for taking care of device-specific
- *              operations for the processor. This module can be used
- *              stand-alone or as part of ProcMgr.
- *              The implementation is specific to OMAP4430DUCATI.
- *
- *
- *  @ver        02.00.00.44_pre-alpha3
- *
- *  ============================================================================
- *
- *  Copyright (c) 2008-2009, Texas Instruments Incorporated
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions
- *  are met:
- *
- *  *  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *
- *  *  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- *  *  Neither the name of Texas Instruments Incorporated nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- *  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- *  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- *  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- *  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *  Contact information for paper mail:
- *  Texas Instruments
- *  Post Office Box 655303
- *  Dallas, Texas 75265
- *  Contact information:
- *  http://www-k.ext.ti.com/sc/technical-support/product-information-centers.htm?
- *  DCMP=TIHomeTracking&HQS=Other+OT+home_d_contact
- *  ============================================================================
- *
- */
-
-
-/* Standard headers */
-#include <ti/syslink/Std.h>
-
-/* OSAL & Utils headers */
-#include <ti/syslink/utils/IGateProvider.h>
-#include <ti/syslink/utils/GateMutex.h>
-#include <ti/syslink/utils/Trace.h>
-
-/* Module level headers */
-#include <ProcDefs.h>
-#include <Processor.h>
-#include <OMAP4430DucatiHal.h>
-#include <OMAP4430DucatiHalReset.h>
-#include <OMAP4430DucatiHalMmu.h>
-#include <OMAP4430DucatiProc.h>
-#include <OMAP4430DucatiEnabler.h>
-#include <_MultiProc.h>
-#include <hw/inout.h>
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-#define INREG32(x) in32(x)
-#define OUTREG32(x, y) out32(x, y)
-
-
-/* =============================================================================
- *  Macros and types
- * =============================================================================
- */
-
-/*!
- *  @brief  Checks if a value lies in given range.
- */
-#define IS_RANGE_VALID(x,min,max) (((x) < (max)) && ((x) >= (min)))
-
-
-
-/*!
- *  @brief  OMAP4430DUCATIPROC Module state object
- */
-
-
-/*OMAP4430 Module state object */
-typedef struct OMAP4430DUCATIPROC_module_object_tag {
-    UInt32                              cfgSize;
-    /* Size of configuration structure */
-    struct OMAP4430DUCATIPROC_Config    cfg;
-    /* OMAP4430 configuration structure */
-    struct OMAP4430DUCATIPROC_Config    defCfg;
-    /* Default module configuration */
-    Bool                                isSetup;
-    /* Flag to indicate if module is setup */
-    OMAP4430DUCATIPROC_Handle           procHandle;
-    /* Processor handle array. */
-    IGateProvider_Handle                gateHandle;
-    /* void * of gate to be used for local thread safety */
-}OMAP4430DUCATIPROC_ModuleObject;
-
-
-
-#define SYSLINK_CARVEOUT
-/* Default memory regions */
-static ProcMgr_AddrInfo OMAP4430DUCATIPROC_defaultMemRegions [] =
-#ifdef SYSLINK_CARVEOUT
-{
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0xA0000000, -1u},
-        /*size     = */0x00100000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x80000000, -1u},
-        /*size     = */0x02900000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x9F000000, -1u},
-        /*size     = */0x00100000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x00000000, -1u},
-        /*size     = */0x00600000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-};
-#else
-{
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0xA0000000, -1u},
-        /*size     = */0x00100000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x9F000000, -1u},
-        /*size     = */0x00100000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x00000000, -1u},
-        /*size     = */0x00600000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-    {
-        /*addr     = */{ -1u, -1u, -1u, 0x80000000, -1u},
-        /*size     = */0x06000000,
-        /*isCached = */FALSE,
-        /*isMapped = */FALSE,
-        /*mapMask  = */ProcMgr_SLAVEVIRT | ProcMgr_MASTERKNLVIRT
-    },
-};
-#endif
-
-/* =============================================================================
- *  Globals
- * =============================================================================
- */
-/*!
- *  @var    OMAP4430DUCATIPROC_state
- *
- *  @brief  OMAP4430DUCATIPROC state object variable
- */
-#if !defined(SYSLINK_BUILD_DEBUG)
-static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
-OMAP4430DUCATIPROC_ModuleObject OMAP4430SYSM3PROC_state =
-{
-    sizeof (OMAP4430DUCATIPROC_Config),
-    {0},
-    {0},
-    FALSE,
-    NULL,
-    NULL
-};
-
-OMAP4430DUCATIPROC_ModuleObject OMAP4430APPM3PROC_state =
-{
-    sizeof (OMAP4430DUCATIPROC_Config),
-    {0},
-    {0},
-    FALSE,
-    NULL,
-    NULL
-};
-
-
-/* =============================================================================
- * APIs directly called by applications
- * =============================================================================
- */
-/*!
- *  @brief      Function to get the default configuration for the
- *              OMAP4430DUCATIPROC module.
- *
- *              This function can be called by the application to get their
- *              configuration parameter to OMAP4430DUCATIPROC_setup filled in by
- *              the OMAP4430DUCATIPROC module with the default parameters. If
- *              the user does not wish to make any change in the default
- *              parameters, this API is not required to be called.
- *
- *  @param      cfg        Pointer to the OMAP4430DUCATIPROC module
- *                         configuration structure in which the default config
- *                         is to be returned.
- *
- *  @sa         OMAP4430DUCATIPROC_setup
- */
-Void
-OMAP4430DUCATIPROC_get_config (OMAP4430DUCATIPROC_Config * cfg, Int ProcType)
-{
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_get_config", cfg);
-
-    GT_assert (curTrace, (cfg != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (cfg == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_get_config",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (OMAP4430DUCATIPROC_Config *) "
-                             "passed is null!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        switch (ProcType)
-        {
-            case PROCTYPE_SYSM3:
-                Memory_copy (cfg,
-                             &(OMAP4430SYSM3PROC_state.defCfg),
-                             sizeof (OMAP4430DUCATIPROC_Config));
-                break;
-
-            case PROCTYPE_APPM3:
-                Memory_copy (cfg,
-                             &(OMAP4430APPM3PROC_state.defCfg),
-                             sizeof (OMAP4430DUCATIPROC_Config));
-            break;
-
-            //case PROCTYPE_TESLA:
-            //    Memory_copy (cfg,
-            //                 &(OMAP4430TESLAPROC_state.defCfg),
-            //                 sizeof (OMAP4430DUCATIPROC_Config));
-            //break;
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_0trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_get_config");
-}
-
-
-/*!
- *  @brief      Function to setup the OMAP4430DUCATIPROC module.
- *
- *              This function sets up the OMAP4430DUCATIPROC module. This
- *              function must be called before any other instance-level APIs
- *              can be invoked.
- *              Module-level configuration needs to be provided to this
- *              function. If the user wishes to change some specific config
- *              parameters, then OMAP4430DUCATIPROC_getConfig can be called to
- *              get the configuration filled with the default values. After
- *              this, only the required configuration values can be changed. If
- *              the user does not wish to make any change in the default
- *              parameters, the application can simply call
- *              OMAP4430DUCATIPROC_setup with NULL parameters. The default
- *              parameters would get automatically used.
- *
- *  @param      cfg   Optional OMAP4430DUCATIPROC module configuration. If
- *                    provided as NULL, default configuration is used.
- *
- *  @sa         OMAP4430DUCATIPROC_destroy
- *              GateMutex_create
- */
-Int
-OMAP4430DUCATIPROC_setup (OMAP4430DUCATIPROC_Config * cfg, Int ProcType)
-{
-    Int                                 status  = PROCESSOR_SUCCESS;
-    OMAP4430DUCATIPROC_Config           tmpCfg;
-    OMAP4430DUCATIPROC_ModuleObject *   pState  = NULL;
-    Error_Block                         eb;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_setup", cfg);
-
-    Error_init(&eb);
-
-    if (cfg == NULL) {
-        OMAP4430DUCATIPROC_get_config (&tmpCfg, ProcType);
-        cfg = &tmpCfg;
-    }
-
-    switch (ProcType)
-    {
-        case PROCTYPE_SYSM3:
-            pState = &OMAP4430SYSM3PROC_state;
-            break;
-        case PROCTYPE_APPM3:
-            pState = &OMAP4430APPM3PROC_state;
-            break;
-        //case PROCTYPE_TESLA:
-        //    pState = &OMAP4430TESLAPROC_state;
-        //    break;
-    }
-
-    if (pState == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_setup",
-                             PROCESSOR_E_INVALIDARG,
-                             "Unsupported procType");
-        return PROCESSOR_E_INVALIDARG;
-    }
-
-    /* Create a default gate handle for local module protection. */
-    pState->gateHandle = (IGateProvider_Handle)
-                               GateMutex_create ((GateMutex_Params *)NULL, &eb);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (pState->gateHandle == NULL) {
-        /*! @retval PROCESSOR_E_FAIL Failed to create GateMutex! */
-        status = PROCESSOR_E_FAIL;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_setup",
-                             status,
-                             "Failed to create GateMutex!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        /* Copy the user provided values into the state object. */
-        Memory_copy (&pState->cfg,
-                     cfg,
-                     sizeof (OMAP4430DUCATIPROC_Config));
-
-        /* Initialize the name to handles mapping array. */
-        pState->procHandle = NULL;
-
-        pState->isSetup = TRUE;
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_setup", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to destroy the OMAP4430DUCATIPROC module.
- *
- *              Once this function is called, other OMAP4430DUCATIPROC module
- *              APIs, except for the OMAP4430DUCATIPROC_getConfig API cannot be
- *              called anymore.
- *
- *  @sa         OMAP4430DUCATIPROC_setup
- *              GateMutex_delete
- */
-Int
-OMAP4430DUCATIPROC_destroy (Int ProcType)
-{
-    Int                                 status  = PROCESSOR_SUCCESS;
-    OMAP4430DUCATIPROC_ModuleObject *   pState  = NULL;
-
-    GT_0trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_destroy");
-
-    switch(ProcType)
-    {
-        case PROCTYPE_SYSM3:
-            pState = &OMAP4430SYSM3PROC_state;
-            break;
-        case PROCTYPE_APPM3:
-            pState = &OMAP4430APPM3PROC_state;
-            break;
-        //case PROCTYPE_TESLA:
-        //    pState = &OMAP4430TESLAPROC_state;
-        //    break;
-    }
-
-    if (pState == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_setup",
-                             PROCESSOR_E_INVALIDARG,
-                             "Unsupported procType");
-        return PROCESSOR_E_INVALIDARG;
-    }
-
-    /* Check if any OMAP4430DUCATIPROC instances have not been deleted so far.
-     * If not, delete them.
-     */
-    if (pState->procHandle != NULL) {
-        OMAP4430DUCATIPROC_delete(&pState->procHandle);
-    }
-
-    if (pState->gateHandle != NULL) {
-        GateMutex_delete ((GateMutex_Handle *)
-                                &(pState->gateHandle));
-    }
-
-    pState->isSetup = FALSE;
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_destroy", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to initialize the parameters for this Processor
- *              instance.
- *
- *  @param      params  Configuration parameters to be returned
- *
- *  @sa         OMAP4430DUCATIPROC_create
- */
-Void
-OMAP4430DUCATIPROC_Params_init (OMAP4430DUCATIPROC_Handle handle,
-                                OMAP4430DUCATIPROC_Params * params,
-                                Int ProcType)
-{
-    OMAP4430DUCATIPROC_Object * procObject =
-                                           (OMAP4430DUCATIPROC_Object *) handle;
-    UInt32                      numMemEntries   = 0;
-    ProcMgr_AddrInfo *          pMemRegn        = NULL;
-
-    GT_2trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_Params_init",
-               handle, params);
-
-    GT_assert (curTrace, (params != NULL));
-
-    switch(ProcType)
-    {
-        case PROCTYPE_SYSM3:
-            pMemRegn = OMAP4430DUCATIPROC_defaultMemRegions;
-            numMemEntries = sizeof (OMAP4430DUCATIPROC_defaultMemRegions) /
-                                sizeof(ProcMgr_AddrInfo);
-            break;
-        case PROCTYPE_APPM3:
-            pMemRegn = OMAP4430DUCATIPROC_defaultMemRegions;
-            numMemEntries = sizeof (OMAP4430DUCATIPROC_defaultMemRegions) /
-                                sizeof(ProcMgr_AddrInfo);
-            break;
-        //case PROCTYPE_TESLA:
-        //    pMemRegn = OMAP4430TESLAPROC_defaultMemRegions;
-        //    break;
-    }
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_Params_init",
-                             PROCESSOR_E_INVALIDARG,
-                             "Argument of type (OMAP4430DUCATIPROC_Params *) "
-                             "passed is null!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        if (handle == NULL) {
-            params->numMemEntries =  numMemEntries;
-            Memory_copy ((Ptr) params->memEntries,
-                         pMemRegn,
-                         (sizeof(ProcMgr_AddrInfo) * params->numMemEntries));
-        }
-        else {
-            /* Return updated OMAP4430DUCATIPROC instance specific parameters */
-            Memory_copy (params,
-                         &(procObject->params),
-                         sizeof (OMAP4430DUCATIPROC_Params));
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_0trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_Params_init");
-}
-
-/*!
- *  @brief      Function to create an instance of this Processor.
- *
- *  @param      name    Name of the Processor instance.
- *  @param      params  Configuration parameters.
- *
- *  @sa         OMAP4430DUCATIPROC_delete
- */
-
-OMAP4430DUCATIPROC_Handle
-OMAP4430DUCATIPROC_create (UInt16 procId,
-                           const OMAP4430DUCATIPROC_Params * params)
-{
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    Int                                 status    = PROCESSOR_SUCCESS;
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-    Processor_Object *                  handle    = NULL;
-    OMAP4430DUCATIPROC_Object *         object    = NULL;
-    IArg                                key;
-    OMAP4430DUCATIPROC_ModuleObject *   pState    = NULL;
-    List_Params                         listParams;
-
-    switch(procId)
-    {
-        case PROCTYPE_SYSM3:
-            pState = &OMAP4430SYSM3PROC_state;
-            break;
-        case PROCTYPE_APPM3:
-            pState = &OMAP4430APPM3PROC_state;
-            break;
-        //case PROCTYPE_TESLA:
-        //    pState = &OMAP4430TESLAPROC_state;
-        //    break;
-    }
-
-    GT_2trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_create", procId, params);
-
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (pState == NULL) {
-        /* Not setting status here since this function does not return status.*/
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "Invalid procId specified");
-    }
-    else if (params == NULL) {
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_create",
-                             PROCESSOR_E_INVALIDARG,
-                             "params passed is NULL!");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        /* Enter critical section protection. */
-        key = IGateProvider_enter (pState->gateHandle);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        /* Check if the Processor already exists for specified procId. */
-        if (pState->procHandle!= NULL) {
-            status = PROCESSOR_E_ALREADYEXIST;
-            GT_setFailureReason (curTrace,
-                              GT_4CLASS,
-                              "OMAP4430DUCATIPROC_create",
-                              status,
-                              "Processor already exists for specified procId!");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            /* Allocate memory for the handle */
-            handle = (Processor_Object *) Memory_calloc (NULL,
-                                                      sizeof (Processor_Object),
-                                                      0,
-                                                      NULL);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if (handle == NULL) {
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATIPROC_create",
-                                     PROCESSOR_E_MEMORY,
-                                     "Memory allocation failed for handle!");
-            }
-            else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                /* Populate the handle fields */
-                handle->procFxnTable.attach      = &OMAP4430DUCATIPROC_attach;
-                handle->procFxnTable.detach      = &OMAP4430DUCATIPROC_detach;
-                handle->procFxnTable.start       = &OMAP4430DUCATIPROC_start;
-                handle->procFxnTable.stop        = &OMAP4430DUCATIPROC_stop;
-                handle->procFxnTable.read        = &OMAP4430DUCATIPROC_read;
-                handle->procFxnTable.write       = &OMAP4430DUCATIPROC_write;
-                handle->procFxnTable.control     = &OMAP4430DUCATIPROC_control;
-                handle->procFxnTable.map         = &OMAP4430DUCATIPROC_map;
-                handle->procFxnTable.unmap       = &OMAP4430DUCATIPROC_unmap;
-                handle->procFxnTable.translateAddr = &OMAP4430DUCATIPROC_translate;
-                handle->procFxnTable.virtToPhys  = &OMAP4430DUCATI_virtToPhys;
-                handle->procFxnTable.getProcInfo = &OMAP4430DUCATIPROC_procInfo;
-                handle->state = ProcMgr_State_Unknown;
-
-                /* Allocate memory for the OMAP4430DUCATIPROC handle */
-                handle->object = Memory_calloc (NULL,
-                                             sizeof (OMAP4430DUCATIPROC_Object),
-                                             0,
-                                             NULL);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                if (handle->object == NULL) {
-                    status = PROCESSOR_E_MEMORY;
-                    GT_setFailureReason (curTrace,
-                                GT_4CLASS,
-                                "OMAP4430DUCATIPROC_create",
-                                status,
-                                "Memory allocation failed for handle->object!");
-                }
-                else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                    handle->procId = procId;
-                    object = (OMAP4430DUCATIPROC_Object *) handle->object;
-                    object->halObject = NULL;
-                    object->procHandle = (Processor_Handle)handle;
-                    /* Copy params into instance object. */
-                    Memory_copy (&(object->params),
-                                 (Ptr) params,
-                                 sizeof (OMAP4430DUCATIPROC_Params));
-                    object->params.procHandle = object->procHandle;
-
-                    /* Set the handle in the state object. */
-                    pState->procHandle = handle->object;
-
-                    /* Initialize the list of listeners */
-                    List_Params_init(&listParams);
-                    handle->registeredNotifiers = List_create(&listParams);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                    if (handle->registeredNotifiers == NULL) {
-                        /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed */
-                        status = PROCESSOR_E_FAIL;
-                        GT_setFailureReason (curTrace,
-                                             GT_4CLASS,
-                                             "OMAP4430DUCATIPROC_create",
-                                             status,
-                                             "List_create failed");
-                    }
-                    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-                        handle->notifiersLock =
-                                 OsalMutex_create(OsalMutex_Type_Interruptible);
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                        if (handle->notifiersLock == NULL) {
-                            /*! @retval PROCESSOR_E_FAIL OsalIsr_create failed*/
-                            status = PROCESSOR_E_FAIL;
-                            GT_setFailureReason (curTrace,
-                                                 GT_4CLASS,
-                                                 "OMAP4430DUCATIPROC_create",
-                                                 status,
-                                                 "OsalMutex_create failed");
-                        }
-                    }
-                }
-            }
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (pState->gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (status < 0) {
-        if (handle !=  NULL) {
-            if (handle->registeredNotifiers != NULL) {
-                List_delete (&handle->registeredNotifiers);
-            }
-            if (handle->object != NULL) {
-                Memory_free (NULL,
-                             handle->object,
-                             sizeof (OMAP4430DUCATIPROC_Object));
-            }
-            Memory_free (NULL, handle, sizeof (Processor_Object));
-        }
-        /*! @retval NULL Function failed */
-        handle = NULL;
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_create", handle);
-
-    /*! @retval Valid-Handle Operation successful */
-    return (void*) handle;
-}
-
-
-/*!
- *  @brief      Function to delete an instance of this Processor.
- *
- *              The user provided pointer to the handle is reset after
- *              successful completion of this function.
- *
- *  @param      handlePtr  Pointer to Handle to the Processor instance
- *
- *  @sa         OMAP4430DUCATIPROC_create
- */
-Int
-OMAP4430DUCATIPROC_delete (OMAP4430DUCATIPROC_Handle * handlePtr)
-{
-    Int                                 status  = PROCESSOR_SUCCESS;
-    OMAP4430DUCATIPROC_Object *         object  = NULL;
-    Processor_Object *                  handle  = NULL;
-    IArg                                key     = NULL;
-    OMAP4430DUCATIPROC_ModuleObject *   pState  = NULL;
-    List_Elem *                         elem    = NULL;
-    Processor_RegisterElem *            regElem = NULL;
-
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_delete", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_delete",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_delete",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        handle = (Processor_Object *) (*handlePtr);
-        /* Enter critical section protection. */
-        if (handle->object != NULL) {
-            object = (OMAP4430DUCATIPROC_Object *) handle->object;
-            switch (handle->procId)
-            {
-                case PROCTYPE_SYSM3:
-                    pState = &OMAP4430SYSM3PROC_state;
-                    break;
-                case PROCTYPE_APPM3:
-                    pState = &OMAP4430APPM3PROC_state;
-                    break;
-                //case PROCTYPE_TESLA:
-                //    pState = &OMAP4430TESLAPROC_state;
-                //    break;
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (pState == NULL) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_delete",
-                                 PROCESSOR_E_INVALIDARG,
-                                 "Unsupported procType");
-            return PROCESSOR_E_INVALIDARG;
-        }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-        key = IGateProvider_enter (pState->gateHandle);
-
-        /* Reset handle in PwrMgr handle array. */
-        GT_assert (curTrace, IS_VALID_PROCID (handle->procId));
-        pState->procHandle = NULL;
-
-        /* Free memory used for the PROC object. */
-        Memory_free (NULL,
-                     handle->object,
-                     sizeof (Ptr));
-        handle->object = NULL;
-
-        /*
-         * Check the list of listeners to see if any are remaining
-         * and reply to them
-         */
-        OsalMutex_delete(&handle->notifiersLock);
-
-        while ((elem = List_dequeue(handle->registeredNotifiers)) != NULL) {
-            regElem = (Processor_RegisterElem *)elem;
-
-            /* Check if there is an associated timer and cancel it */
-            if (regElem->timer != -1) {
-                struct itimerspec value ;
-                value.it_value.tv_sec = 0;
-                value.it_value.tv_nsec = 0;
-                value.it_interval.tv_sec = 0;
-                value.it_interval.tv_nsec = 0;
-                timer_settime(regElem->timer, 0, &value, NULL);
-
-                timer_delete(regElem->timer);
-                regElem->timer = -1;
-            }
-
-            /* Call the callback function so it can clean up. */
-            regElem->info->cbFxn(handle->procId,
-                                 NULL,
-                                 handle->state,
-                                 handle->state,
-                                 ProcMgr_EventStatus_Canceled,
-                                 regElem->info->arg);
-            /* Free the memory */
-            Memory_free(NULL, regElem, sizeof(Processor_RegisterElem));
-        }
-
-        /* Delete the list of listeners */
-        List_delete(&handle->registeredNotifiers);
-
-        /* Free memory used for the Processor object. */
-        Memory_free (NULL, handle, sizeof (Processor_Object));
-        *handlePtr = NULL;
-
-        /* Leave critical section protection. */
-        IGateProvider_leave (pState->gateHandle, key);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_delete", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return (status);
-}
-
-
-/*!
- *  @brief      Function to open a handle to an instance of this Processor. This
- *              function is called when access to the Processor is required from
- *              a different process.
- *
- *  @param      handlePtr   Handle to the Processor instance
- *  @param      procId      Processor ID addressed by this Processor instance.
- *
- *  @sa         OMAP4430DUCATIPROC_close
- */
-Int
-OMAP4430DUCATIPROC_open (OMAP4430DUCATIPROC_Handle * handlePtr, UInt16 procId)
-{
-    Int                                 status  = PROCESSOR_SUCCESS;
-    OMAP4430DUCATIPROC_ModuleObject *   pState  = NULL;
-
-    GT_2trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_open",
-               handlePtr, procId);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, IS_VALID_PROCID (procId));
-
-    switch(procId)
-    {
-        case PROCTYPE_SYSM3:
-            pState = &OMAP4430SYSM3PROC_state;
-            break;
-        case PROCTYPE_APPM3:
-            pState = &OMAP4430APPM3PROC_state;
-            break;
-        //case PROCTYPE_TESLA:
-        //    pState = &OMAP4430TESLAPROC_state;
-        //    break;
-    }
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_open",
-                             status,
-                             "Invalid NULL handlePtr specified");
-    }
-    else if (pState == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid procId specified */
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_open",
-                             status,
-                             "Invalid procId specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        /* Initialize return parameter handle. */
-        *handlePtr = NULL;
-
-        /* Check if the PwrMgr exists and return the handle if found. */
-        if (pState->procHandle == NULL) {
-            /*! @retval PROCESSOR_E_NOTFOUND Specified instance not found */
-            status = PROCESSOR_E_NOTFOUND;
-            GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_open",
-                             status,
-                             "Specified instance does not exist!");
-        }
-        else {
-            *handlePtr = pState->procHandle;
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_open", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to close a handle to an instance of this Processor.
- *
- *  @param      handlePtr  Pointer to Handle to the Processor instance
- *
- *  @sa         OMAP4430DUCATIPROC_open
- */
-Int
-OMAP4430DUCATIPROC_close (OMAP4430DUCATIPROC_Handle * handlePtr)
-{
-    Int status = PROCESSOR_SUCCESS;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430M3VIDEOPROC_close", handlePtr);
-
-    GT_assert (curTrace, (handlePtr != NULL));
-    GT_assert (curTrace, ((handlePtr != NULL) && (*handlePtr != NULL)));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_INVALIDARG Invalid NULL handlePtr pointer
-                                         specified*/
-        status = PROCESSOR_E_INVALIDARG;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_close",
-                             status,
-                             "Invalid NULL handlePtr pointer specified");
-    }
-    else if (*handlePtr == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid NULL *handlePtr specified */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_close",
-                             status,
-                             "Invalid NULL *handlePtr specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        /* Nothing to be done for close. */
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430M3VIDEOPROC_close", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/* =============================================================================
- * APIs called by Processor module (part of function table interface)
- * =============================================================================
- */
-/*!
- *  @brief      Function to initialize the slave processor
- *
- *  @param      handle  Handle to the Processor instance
- *  @param      params  Attach parameters
- *
- *  @sa         OMAP4430DUCATIPROC_detach
- */
-Int
-OMAP4430DUCATIPROC_attach (Processor_Handle         handle,
-                           Processor_AttachParams * params)
-{
-
-    Int                            status       = PROCESSOR_SUCCESS ;
-    Processor_Object *             procHandle   = (Processor_Object *) handle;
-    OMAP4430DUCATIPROC_Object *    object       = NULL;
-    ProcMgr_AddrInfo *             me;
-    OMAP4430DUCATIPROC_ModuleObject *       pState;
-    OMAP4430DUCATI_HalMmuCtrlArgs_Enable    enableArgs;
-
-    GT_2trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_attach", handle, params);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-
-    switch(procHandle->procId)
-    {
-        case PROCTYPE_SYSM3:
-            pState = &OMAP4430SYSM3PROC_state;
-            break;
-        case PROCTYPE_APPM3:
-            pState = &OMAP4430APPM3PROC_state;
-            break;
-    }
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_attach",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (params == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_attach",
-                                 status,
-                                 "Invalid params specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        object = (OMAP4430DUCATIPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        /* Added for Netra Ducati core0 is cortex M3 */
-        params->procArch = Processor_ProcArch_M3;
-        GT_0trace (curTrace,
-                   GT_2CLASS,
-                   "    OMAP4430DUCATIPROC_attach: Mapping memory regions");
-
-        /* Populate the return params */
-
-        status = OMAP4430DUCATI_halInit (&(object->halObject), &object->params,
-                                         procHandle->procId);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (status < 0) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_attach",
-                                 status,
-                                 "OMAP4430DUCATI_halInit failed");
-        }
-        else if (object->params.numMemEntries > ProcMgr_MAX_MEMORY_REGIONS) {
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_attach",
-                                 PROCESSOR_E_INVALIDARG,
-                                 "numMemEntries out of range");
-        }
-        else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            me = object->params.memEntries;
-            params->numMemEntries = object->params.numMemEntries;
-
-            Memory_copy ((Ptr) params->memEntries,
-                         (Ptr) object->params.memEntries,
-                         sizeof (ProcMgr_AddrInfo) * params->numMemEntries);
-
-            if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
-                ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)) {
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                if (status < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "OMAP4430DUCATIPROC_attach",
-                                         status,
-                                         "Failed to reset the slave processor");
-                }
-                else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-                    GT_0trace (curTrace,
-                               GT_1CLASS,
-                               "    OMAP4430DUCATIPROC_attach: Slave is now "
-                               "in reset!");
-
-                    if (procHandle->procId == PROCTYPE_SYSM3) {
-                        /* Enable MMU */
-                        GT_0trace (curTrace,
-                                   GT_2CLASS,
-                                   "OMAP4430DUCATIPROC_attach: "
-                                   "Enabling Slave MMU ...");
-                        enableArgs.memEntries = NULL;
-                        enableArgs.numMemEntries = 0;
-                        status = OMAP4430DUCATI_halMmuCtrl (object->halObject,
-                                                    Processor_MmuCtrlCmd_Enable,
-                                                    &enableArgs);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                        if (status < 0) {
-                            GT_setFailureReason (curTrace,
-                                              GT_4CLASS,
-                                              "OMAP4430DUCATIPROC_attach",
-                                              status,
-                                              "Failed to enable the slave MMU");
-                        }
-                    }
-                }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_attach", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-
-}
-
-
-/*!
- *  @brief      Function to detach from the Processor.
- *
- *  @param      handle  Handle to the Processor instance
- *
- *  @sa         OMAP4430DUCATIPROC_attach
- */
-Int
-OMAP4430DUCATIPROC_detach (Processor_Handle handle)
-{
-    Int                       status     = PROCESSOR_SUCCESS;
-    Int                       tmpStatus  = PROCESSOR_SUCCESS;
-    Processor_Object *        procHandle = (Processor_Object *) handle;
-    OMAP4430DUCATIPROC_Object * object   = NULL;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_detach", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_detach",
-                             PROCESSOR_E_HANDLE,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        object = (OMAP4430DUCATIPROC_Object *) procHandle->object;
-        GT_assert (curTrace, (object != NULL));
-
-        if (    (procHandle->bootMode == ProcMgr_BootMode_Boot)
-            ||  (procHandle->bootMode == ProcMgr_BootMode_NoLoad_Pwr)) {
-            if (procHandle->procId == PROCTYPE_SYSM3) {
-                /* Disable MMU */
-                GT_0trace (curTrace,
-                           GT_2CLASS,
-                           "    OMAP4430DUCATIPROC_detach: "
-                           "Disabling Slave MMU ...");
-                status = OMAP4430DUCATI_halMmuCtrl (object->halObject,
-                                                   Processor_MmuCtrlCmd_Disable,
-                                                   NULL);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-                if (status < 0) {
-                    GT_setFailureReason (curTrace,
-                                         GT_4CLASS,
-                                         "OMAP4430DUCATIPROC_detach",
-                                         status,
-                                         "Failed to disable the slave MMU");
-                }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-            }
-            //No need to reset.. that will be done in STOP
-           /* tmpStatus = OMAP4430DUCATI_halResetCtrl (object->halObject,
-                                                   Processor_ResetCtrlCmd_Reset,
-                                                   NULL);
-            GT_0trace (curTrace,
-                       GT_2CLASS,
-                       "    OMAP4430DUCATIPROC_detach: Slave processor is "
-                       "now in reset");*/
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-            if ((tmpStatus < 0) && (status >= 0)) {
-                status = tmpStatus;
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATIPROC_detach",
-                                     status,
-                                     "Failed to reset the slave processor");
-            }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        }
-
-        GT_0trace (curTrace,
-                   GT_2CLASS,
-                   "    OMAP4430DUCATIPROC_detach: Unmapping memory regions");
-
-        tmpStatus = OMAP4430DUCATI_halExit(object->halObject, &object->params);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if ((tmpStatus < 0) && (status >= 0)) {
-            status = tmpStatus;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_detach",
-                                 status,
-                                 "Failed to finalize HAL object");
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_detach", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to start the slave processor
- *
- *              Start the slave processor running from its entry point.
- *              Depending on the boot mode, this involves configuring the boot
- *              address and releasing the slave from reset.
- *
- *  @param      handle    Handle to the Processor instance
- *
- *  @sa         OMAP4430DUCATIPROC_stop, OMAP4430DUCATIPROC_halBootCtrl,
- *              OMAP4430DUCATIPROC_halResetCtrl
- */
-Int
-OMAP4430DUCATIPROC_start (Processor_Handle        handle,
-                          UInt32                  entryPt,
-                          Processor_StartParams * params)
-{
-    Int                          status        = PROCESSOR_SUCCESS ;
-    Processor_Object *           procHandle    = (Processor_Object *) handle;
-    OMAP4430DUCATIPROC_Object  * object        = procHandle->object;
-
-    GT_3trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_start",
-               handle, entryPt, params);
-
-    GT_assert (curTrace, (handle != NULL));
-    GT_assert (curTrace, (params != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_start",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (params == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_start",
-                                 status,
-                                 "Invalid params specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        status = OMAP4430DUCATI_halResetCtrl(object->halObject,
-                                             Processor_ResetCtrlCmd_MMU_Release,
-                                             entryPt);
-        if (status < 0) {
-            /*! @retval status */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halResetCtrl",
-                                 status,
-                                 "Reset MMU_Release failed");
-        }
-        else {
-            ducati_setup(object->halObject);
-            status = OMAP4430DUCATI_halResetCtrl(object->halObject,
-                                                 Processor_ResetCtrlCmd_Release,
-                                                 entryPt);
-            if (status < 0) {
-                /*! @retval status */
-                GT_setFailureReason (curTrace,
-                                     GT_4CLASS,
-                                     "OMAP4430DUCATI_halResetCtrl",
-                                     status,
-                                     "Reset Release failed");
-            }
-        }
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        return status;
-}
-
-
-/*!
- *  @brief      Function to stop the slave processor
- *
- *              Stop the execution of the slave processor. Depending on the boot
- *              mode, this may result in placing the slave processor in reset.
- *
- *  @param      handle    Handle to the Processor instance
- *
- *  @sa         OMAP4430DUCATIPROC_start, OMAP4430DUCATIPROC_halResetCtrl
- */
-Int
-OMAP4430DUCATIPROC_stop (Processor_Handle handle)
-{
-    Int                         status       = PROCESSOR_SUCCESS ;
-    Processor_Object *          procHandle   = (Processor_Object *) handle;
-    OMAP4430DUCATIPROC_Object * object       = procHandle->object;
-
-    GT_1trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_stop", handle);
-
-    GT_assert (curTrace, (handle != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_stop",
-                             status,
-                             "Invalid handle specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        status = OMAP4430DUCATI_halResetCtrl(object->halObject,
-                                             Processor_ResetCtrlCmd_Reset,
-                                             0);
-        if (status < 0) {
-            /*! @retval status */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halResetCtrl",
-                                 status,
-                                 "Reset failed");
-        }
-
-        ducati_destroy(object->halObject);
-        status = OMAP4430DUCATI_halResetCtrl(object->halObject,
-                                             Processor_ResetCtrlCmd_MMU_Reset,
-                                             0);
-        if (status < 0) {
-            /*! @retval status */
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATI_halResetCtrl",
-                                 status,
-                                 "Reset MMU failed");
-        }
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_stop", status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to read from the slave processor's memory.
- *
- *              Read from the slave processor's memory and copy into the
- *              provided buffer.
- *
- *  @param      handle     Handle to the Processor instance
- *  @param      procAddr   Address in host processor's address space of the
- *                         memory region to read from.
- *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
- *                         number of bytes to be read. When the function
- *                         returns, this parameter contains the number of bytes
- *                         actually read.
- *  @param      buffer     User-provided buffer in which the slave processor's
- *                         memory contents are to be copied.
- *
- *  @sa         OMAP4430DUCATIPROC_write
- */
-Int
-OMAP4430DUCATIPROC_read (Processor_Handle   handle,
-                         UInt32             procAddr,
-                         UInt32 *           numBytes,
-                         Ptr                buffer)
-{
-    Int       status   = PROCESSOR_SUCCESS ;
-    UInt8  *  procPtr8 = NULL;
-
-    GT_4trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_read",
-               handle, procAddr, numBytes, buffer);
-
-    GT_assert (curTrace, (handle   != NULL));
-    GT_assert (curTrace, (numBytes != NULL));
-    GT_assert (curTrace, (buffer   != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_read",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (numBytes == 0) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_read",
-                                 status,
-                                 "Invalid numBytes specified");
-    }
-    else if (buffer == NULL) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_read",
-                                 status,
-                                 "Invalid buffer specified");
-    }
-    else {
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-        procPtr8 = (UInt8 *) procAddr ;
-        buffer = Memory_copy (buffer, procPtr8, *numBytes);
-        GT_assert (curTrace, (buffer != (UInt32) NULL));
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-        if (buffer == (UInt32) NULL) {
-            /*! @retval PROCESSOR_E_FAIL Failed in Memory_copy */
-            status = PROCESSOR_E_FAIL;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                                 "OMAP4430DUCATIPROC_read",
-                                 status,
-                                 "Failed in Memory_copy");
-            *numBytes = 0;
-        }
-    }
-#endif /* if !defined(SYSLINK_BUILD_OPTIMIZE) */
-
-    GT_1trace (curTrace, GT_LEAVE, "OMAP4430DUCATIPROC_read",status);
-
-    /*! @retval PROCESSOR_SUCCESS Operation successful */
-    return status;
-}
-
-
-/*!
- *  @brief      Function to write into the slave processor's memory.
- *
- *              Read from the provided buffer and copy into the slave
- *              processor's memory.
- *
- *  @param      handle     Handle to the Processor object
- *  @param      procAddr   Address in host processor's address space of the
- *                         memory region to write into.
- *  @param      numBytes   IN/OUT parameter. As an IN-parameter, it takes in the
- *                         number of bytes to be written. When the function
- *                         returns, this parameter contains the number of bytes
- *                         actually written.
- *  @param      buffer     User-provided buffer from which the data is to be
- *                         written into the slave processor's memory.
- *
- *  @sa         OMAP4430DUCATIPROC_read
- */
-Int
-OMAP4430DUCATIPROC_write (Processor_Handle handle,
-                          UInt32           procAddr,
-                          UInt32 *         numBytes,
-                          Ptr              buffer)
-{
-    Int                   status       = PROCESSOR_SUCCESS ;
-    Processor_Object *    procHandle   = (Processor_Object *) handle;
-    OMAP4430DUCATIPROC_Object * object = NULL;
-    UInt8  *              procPtr8     = NULL;
-    UInt8                 temp8_1;
-    UInt8                 temp8_2;
-    UInt8                 temp8_3;
-    UInt8                 temp8_4;
-    UInt32                temp;
-
-    GT_4trace (curTrace, GT_ENTER, "OMAP4430DUCATIPROC_write",
-               handle, procAddr, numBytes, buffer);
-
-    GT_assert (curTrace, (handle   != NULL));
-    GT_assert (curTrace, (numBytes != NULL));
-    GT_assert (curTrace, (buffer   != NULL));
-
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
-    if (handle == NULL) {
-        /*! @retval PROCESSOR_E_HANDLE Invalid argument */
-        status = PROCESSOR_E_HANDLE;
-        GT_setFailureReason (curTrace,
-                             GT_4CLASS,
-                             "OMAP4430DUCATIPROC_write",
-                             status,
-                             "Invalid handle specified");
-    }
-    else if (numBytes == 0) {
-            /*! @retval PROCESSOR_E_INVALIDARG Invalid argument */
-            status = PROCESSOR_E_INVALIDARG;
-            GT_setFailureReason (curTrace,
-                                 GT_4CLASS,
-                &