⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 maldcr.s

📁 WINDRIVER SBC405 BSP
💻 S
📖 第 1 页 / 共 5 页
字号:
/* malDcr.s - IBM Memory Access Layer (MAL) DCR access assembly routines *//*******************************************************************************	   This source and object code has been made available to you by IBM on an   AS-IS basis.   IT IS PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING THE WARRANTIES OF   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR OF NONINFRINGEMENT   OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL IBM OR ITS LICENSORS BE LIABLE   FOR INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES.  IBM'S OR ITS LICENSOR'S   DAMAGES FOR ANY CAUSE OF ACTION, WHETHER IN CONTRACT OR IN TORT, AT LAW OR   AT EQUITY, SHALL BE LIMITED TO A MAXIMUM OF $1,000 PER LICENSE.  No license   under IBM patents or patent applications is to be implied by the copyright   license.   Any user of this software should understand that neither IBM nor its   licensors will be responsible for any consequences resulting from the use   of this software.   Any person who transfers this source code or any derivative work must   include the IBM copyright notice, this paragraph, and the preceding two   paragraphs in the transferred software.   Any person who transfers this object code or any derivative work must   include the IBM copyright notice in the transferred software.   COPYRIGHT   I B M   CORPORATION 2000   LICENSED MATERIAL  -  PROGRAM PROPERTY OF  I B MNOMANUAL*******************************************************************************//*modification history--------------------01e,30nov01,kab  Update for T2.201d,19nov01,pch  cleanup01c,08may01,pch  Add assembler abstractions (FUNC_EXPORT, FUNC_BEGIN, etc.)01b,15may00,mcg  register name updates to match 405GP User Manual01a,17jan00,mcg  created*//*DESCRIPTIONThis module contains chip-dependent routines written in assembly language.*/#define _ASMLANGUAGE        /* globals */        FUNC_EXPORT(sysDcrMalcrGet)        FUNC_EXPORT(sysDcrMalcrSet)        FUNC_EXPORT(sysDcrMalesrGet)        FUNC_EXPORT(sysDcrMalesrClear)        FUNC_EXPORT(sysDcrMalierGet)        FUNC_EXPORT(sysDcrMalierSet)        FUNC_EXPORT(sysDcrMaltxcasrGet)        FUNC_EXPORT(sysDcrMaltxcasrSet)        FUNC_EXPORT(sysDcrMaltxcarrGet)        FUNC_EXPORT(sysDcrMaltxcarrSet)        FUNC_EXPORT(sysDcrMaltxeobisrGet)        FUNC_EXPORT(sysDcrMaltxeobisrClear)        FUNC_EXPORT(sysDcrMaltxdeirGet)        FUNC_EXPORT(sysDcrMaltxdeirClear)        FUNC_EXPORT(sysDcrMalrxcasrGet)        FUNC_EXPORT(sysDcrMalrxcasrSet)        FUNC_EXPORT(sysDcrMalrxcarrGet)        FUNC_EXPORT(sysDcrMalrxcarrSet)        FUNC_EXPORT(sysDcrMalrxeobisrGet)        FUNC_EXPORT(sysDcrMalrxeobisrClear)        FUNC_EXPORT(sysDcrMalrxdeirGet)        FUNC_EXPORT(sysDcrMalrxdeirClear)        FUNC_EXPORT(sysDcrMaltxctp0rGet)        FUNC_EXPORT(sysDcrMaltxctp0rSet)        FUNC_EXPORT(sysDcrMaltxctp1rGet)        FUNC_EXPORT(sysDcrMaltxctp1rSet)        FUNC_EXPORT(sysDcrMaltxctp2rGet)        FUNC_EXPORT(sysDcrMaltxctp2rSet)        FUNC_EXPORT(sysDcrMaltxctp3rGet)        FUNC_EXPORT(sysDcrMaltxctp3rSet)#ifdef MAL_CHANNELS_32        FUNC_EXPORT(sysDcrMaltxctp4rGet)        FUNC_EXPORT(sysDcrMaltxctp4rSet)        FUNC_EXPORT(sysDcrMaltxctp5rGet)        FUNC_EXPORT(sysDcrMaltxctp5rSet)        FUNC_EXPORT(sysDcrMaltxctp6rGet)        FUNC_EXPORT(sysDcrMaltxctp6rSet)        FUNC_EXPORT(sysDcrMaltxctp7rGet)        FUNC_EXPORT(sysDcrMaltxctp7rSet)        FUNC_EXPORT(sysDcrMaltxctp8rGet)        FUNC_EXPORT(sysDcrMaltxctp8rSet)        FUNC_EXPORT(sysDcrMaltxctp9rGet)        FUNC_EXPORT(sysDcrMaltxctp9rSet)        FUNC_EXPORT(sysDcrMaltxctp10rGet)        FUNC_EXPORT(sysDcrMaltxctp10rSet)        FUNC_EXPORT(sysDcrMaltxctp11rGet)        FUNC_EXPORT(sysDcrMaltxctp11rSet)        FUNC_EXPORT(sysDcrMaltxctp12rGet)        FUNC_EXPORT(sysDcrMaltxctp12rSet)        FUNC_EXPORT(sysDcrMaltxctp13rGet)        FUNC_EXPORT(sysDcrMaltxctp13rSet)        FUNC_EXPORT(sysDcrMaltxctp14rGet)        FUNC_EXPORT(sysDcrMaltxctp14rSet)        FUNC_EXPORT(sysDcrMaltxctp15rGet)        FUNC_EXPORT(sysDcrMaltxctp15rSet)#endif /* MAL_CHANNELS_32 */#ifdef MAL_CHANNELS_64        FUNC_EXPORT(sysDcrMaltxctp16rGet)        FUNC_EXPORT(sysDcrMaltxctp16rSet)        FUNC_EXPORT(sysDcrMaltxctp17rGet)        FUNC_EXPORT(sysDcrMaltxctp17rSet)        FUNC_EXPORT(sysDcrMaltxctp18rGet)        FUNC_EXPORT(sysDcrMaltxctp18rSet)        FUNC_EXPORT(sysDcrMaltxctp19rGet)        FUNC_EXPORT(sysDcrMaltxctp19rSet)        FUNC_EXPORT(sysDcrMaltxctp20rGet)        FUNC_EXPORT(sysDcrMaltxctp20rSet)        FUNC_EXPORT(sysDcrMaltxctp21rGet)        FUNC_EXPORT(sysDcrMaltxctp21rSet)        FUNC_EXPORT(sysDcrMaltxctp22rGet)        FUNC_EXPORT(sysDcrMaltxctp22rSet)        FUNC_EXPORT(sysDcrMaltxctp23rGet)        FUNC_EXPORT(sysDcrMaltxctp23rSet)        FUNC_EXPORT(sysDcrMaltxctp24rGet)        FUNC_EXPORT(sysDcrMaltxctp24rSet)        FUNC_EXPORT(sysDcrMaltxctp25rGet)        FUNC_EXPORT(sysDcrMaltxctp25rSet)        FUNC_EXPORT(sysDcrMaltxctp26rGet)        FUNC_EXPORT(sysDcrMaltxctp26rSet)        FUNC_EXPORT(sysDcrMaltxctp27rGet)        FUNC_EXPORT(sysDcrMaltxctp27rSet)        FUNC_EXPORT(sysDcrMaltxctp28rGet)        FUNC_EXPORT(sysDcrMaltxctp28rSet)        FUNC_EXPORT(sysDcrMaltxctp29rGet)        FUNC_EXPORT(sysDcrMaltxctp29rSet)        FUNC_EXPORT(sysDcrMaltxctp30rGet)        FUNC_EXPORT(sysDcrMaltxctp30rSet)        FUNC_EXPORT(sysDcrMaltxctp31rGet)        FUNC_EXPORT(sysDcrMaltxctp31rSet)#endif /* MAL_CHANNELS_64 */        FUNC_EXPORT(sysDcrMalrxctp0rGet)        FUNC_EXPORT(sysDcrMalrxctp0rSet)        FUNC_EXPORT(sysDcrMalrxctp1rGet)        FUNC_EXPORT(sysDcrMalrxctp1rSet)        FUNC_EXPORT(sysDcrMalrxctp2rGet)        FUNC_EXPORT(sysDcrMalrxctp2rSet)        FUNC_EXPORT(sysDcrMalrxctp3rGet)        FUNC_EXPORT(sysDcrMalrxctp3rSet)#ifdef MAL_CHANNELS_32        FUNC_EXPORT(sysDcrMalrxctp4rGet)        FUNC_EXPORT(sysDcrMalrxctp4rSet)        FUNC_EXPORT(sysDcrMalrxctp5rGet)        FUNC_EXPORT(sysDcrMalrxctp5rSet)        FUNC_EXPORT(sysDcrMalrxctp6rGet)        FUNC_EXPORT(sysDcrMalrxctp6rSet)        FUNC_EXPORT(sysDcrMalrxctp7rGet)        FUNC_EXPORT(sysDcrMalrxctp7rSet)        FUNC_EXPORT(sysDcrMalrxctp8rGet)        FUNC_EXPORT(sysDcrMalrxctp8rSet)        FUNC_EXPORT(sysDcrMalrxctp9rGet)        FUNC_EXPORT(sysDcrMalrxctp9rSet)        FUNC_EXPORT(sysDcrMalrxctp10rGet)        FUNC_EXPORT(sysDcrMalrxctp10rSet)        FUNC_EXPORT(sysDcrMalrxctp11rGet)        FUNC_EXPORT(sysDcrMalrxctp11rSet)        FUNC_EXPORT(sysDcrMalrxctp12rGet)        FUNC_EXPORT(sysDcrMalrxctp12rSet)        FUNC_EXPORT(sysDcrMalrxctp13rGet)        FUNC_EXPORT(sysDcrMalrxctp13rSet)        FUNC_EXPORT(sysDcrMalrxctp14rGet)        FUNC_EXPORT(sysDcrMalrxctp14rSet)        FUNC_EXPORT(sysDcrMalrxctp15rGet)        FUNC_EXPORT(sysDcrMalrxctp15rSet)#endif /* MAL_CHANNELS_32 */#ifdef MAL_CHANNELS_64        FUNC_EXPORT(sysDcrMalrxctp16rGet)        FUNC_EXPORT(sysDcrMalrxctp16rSet)        FUNC_EXPORT(sysDcrMalrxctp17rGet)        FUNC_EXPORT(sysDcrMalrxctp17rSet)        FUNC_EXPORT(sysDcrMalrxctp18rGet)        FUNC_EXPORT(sysDcrMalrxctp18rSet)        FUNC_EXPORT(sysDcrMalrxctp19rGet)        FUNC_EXPORT(sysDcrMalrxctp19rSet)        FUNC_EXPORT(sysDcrMalrxctp20rGet)        FUNC_EXPORT(sysDcrMalrxctp20rSet)        FUNC_EXPORT(sysDcrMalrxctp21rGet)        FUNC_EXPORT(sysDcrMalrxctp21rSet)        FUNC_EXPORT(sysDcrMalrxctp22rGet)        FUNC_EXPORT(sysDcrMalrxctp22rSet)        FUNC_EXPORT(sysDcrMalrxctp23rGet)        FUNC_EXPORT(sysDcrMalrxctp23rSet)        FUNC_EXPORT(sysDcrMalrxctp24rGet)        FUNC_EXPORT(sysDcrMalrxctp24rSet)        FUNC_EXPORT(sysDcrMalrxctp25rGet)        FUNC_EXPORT(sysDcrMalrxctp25rSet)        FUNC_EXPORT(sysDcrMalrxctp26rGet)        FUNC_EXPORT(sysDcrMalrxctp26rSet)        FUNC_EXPORT(sysDcrMalrxctp27rGet)        FUNC_EXPORT(sysDcrMalrxctp27rSet)        FUNC_EXPORT(sysDcrMalrxctp28rGet)        FUNC_EXPORT(sysDcrMalrxctp28rSet)        FUNC_EXPORT(sysDcrMalrxctp29rGet)        FUNC_EXPORT(sysDcrMalrxctp29rSet)        FUNC_EXPORT(sysDcrMalrxctp30rGet)        FUNC_EXPORT(sysDcrMalrxctp30rSet)        FUNC_EXPORT(sysDcrMalrxctp31rGet)        FUNC_EXPORT(sysDcrMalrxctp31rSet)#endif /* MAL_CHANNELS_64 */        FUNC_EXPORT(sysDcrMalrcbs0Get)        FUNC_EXPORT(sysDcrMalrcbs0Set)        FUNC_EXPORT(sysDcrMalrcbs1Get)        FUNC_EXPORT(sysDcrMalrcbs1Set)        FUNC_EXPORT(sysDcrMalrcbs2Get)        FUNC_EXPORT(sysDcrMalrcbs2Set)        FUNC_EXPORT(sysDcrMalrcbs3Get)        FUNC_EXPORT(sysDcrMalrcbs3Set)#ifdef MAL_CHANNELS_32        FUNC_EXPORT(sysDcrMalrcbs4Get)        FUNC_EXPORT(sysDcrMalrcbs4Set)        FUNC_EXPORT(sysDcrMalrcbs5Get)        FUNC_EXPORT(sysDcrMalrcbs5Set)        FUNC_EXPORT(sysDcrMalrcbs6Get)        FUNC_EXPORT(sysDcrMalrcbs6Set)        FUNC_EXPORT(sysDcrMalrcbs7Get)        FUNC_EXPORT(sysDcrMalrcbs7Set)        FUNC_EXPORT(sysDcrMalrcbs8Get)        FUNC_EXPORT(sysDcrMalrcbs8Set)        FUNC_EXPORT(sysDcrMalrcbs9Get)        FUNC_EXPORT(sysDcrMalrcbs9Set)        FUNC_EXPORT(sysDcrMalrcbs10Get)        FUNC_EXPORT(sysDcrMalrcbs10Set)        FUNC_EXPORT(sysDcrMalrcbs11Get)        FUNC_EXPORT(sysDcrMalrcbs11Set)        FUNC_EXPORT(sysDcrMalrcbs12Get)        FUNC_EXPORT(sysDcrMalrcbs12Set)        FUNC_EXPORT(sysDcrMalrcbs13Get)        FUNC_EXPORT(sysDcrMalrcbs13Set)        FUNC_EXPORT(sysDcrMalrcbs14Get)        FUNC_EXPORT(sysDcrMalrcbs14Set)        FUNC_EXPORT(sysDcrMalrcbs15Get)        FUNC_EXPORT(sysDcrMalrcbs15Set)#endif /* MAL_CHANNELS_32 */#ifdef MAL_CHANNELS_64        FUNC_EXPORT(sysDcrMalrcbs16Get)        FUNC_EXPORT(sysDcrMalrcbs16Set)        FUNC_EXPORT(sysDcrMalrcbs17Get)        FUNC_EXPORT(sysDcrMalrcbs17Set)        FUNC_EXPORT(sysDcrMalrcbs18Get)        FUNC_EXPORT(sysDcrMalrcbs18Set)        FUNC_EXPORT(sysDcrMalrcbs19Get)        FUNC_EXPORT(sysDcrMalrcbs19Set)        FUNC_EXPORT(sysDcrMalrcbs20Get)        FUNC_EXPORT(sysDcrMalrcbs20Set)        FUNC_EXPORT(sysDcrMalrcbs21Get)        FUNC_EXPORT(sysDcrMalrcbs21Set)        FUNC_EXPORT(sysDcrMalrcbs22Get)        FUNC_EXPORT(sysDcrMalrcbs22Set)        FUNC_EXPORT(sysDcrMalrcbs23Get)        FUNC_EXPORT(sysDcrMalrcbs23Set)        FUNC_EXPORT(sysDcrMalrcbs24Get)        FUNC_EXPORT(sysDcrMalrcbs24Set)        FUNC_EXPORT(sysDcrMalrcbs25Get)        FUNC_EXPORT(sysDcrMalrcbs25Set)        FUNC_EXPORT(sysDcrMalrcbs26Get)        FUNC_EXPORT(sysDcrMalrcbs26Set)        FUNC_EXPORT(sysDcrMalrcbs27Get)        FUNC_EXPORT(sysDcrMalrcbs27Set)        FUNC_EXPORT(sysDcrMalrcbs28Get)        FUNC_EXPORT(sysDcrMalrcbs28Set)        FUNC_EXPORT(sysDcrMalrcbs29Get)        FUNC_EXPORT(sysDcrMalrcbs29Set)        FUNC_EXPORT(sysDcrMalrcbs30Get)        FUNC_EXPORT(sysDcrMalrcbs30Set)        FUNC_EXPORT(sysDcrMalrcbs31Get)        FUNC_EXPORT(sysDcrMalrcbs31Set)#endif /* MAL_CHANNELS_64 */	_WRS_TEXT_SEG_START/********************************************************************************* sysDcrMalcrGet - get the contents of MAL configuration register** This routine reads and returns the contents of the MAL configuration register.** NOMANUAL* UINT32 sysDcrMalcrGet (void)*/FUNC_BEGIN(sysDcrMalcrGet)        mfdcr   r3, MAL_CFG#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalcrGet)/********************************************************************************* sysDcrMalcrSet - set the contents of MAL configuration register** This routine writes the contents of the MAL configuration register** NOMANUAL* void sysDcrMalcrSet (UINT32)*/FUNC_BEGIN(sysDcrMalcrSet)        mtdcr   MAL_CFG, r3#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalcrSet)/********************************************************************************* sysDcrMalesrGet - get the contents of the MAL Error Status Register** This routine reads and returns the contents of the MAL Error Status Register.** NOMANUAL* UINT32 sysDcrMalesrGet (void)*/FUNC_BEGIN(sysDcrMalesrGet)        mfdcr   r3, MAL_ESR#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalesrGet)/********************************************************************************* sysDcrMalesrClear - clears pending status in the MAL Error Status Register** This routine writes to the MAL Error Status Register.  It will clear the* status for each bit that is set to 1 in the input parameter.** NOMANUAL* void sysDcrMalesrClear (UINT32)*/FUNC_BEGIN(sysDcrMalesrClear)        mtdcr   MAL_ESR, r3#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalesrClear)/********************************************************************************* sysDcrMalierGet - get the contents of MAL interrupt enable register** This routine reads and returns the contents of the MAL interrupt enable* register.** NOMANUAL* UINT32 sysDcrMalierGet (void)*/FUNC_BEGIN(sysDcrMalierGet)        mfdcr   r3, MAL_IER#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalierGet)/********************************************************************************* sysDcrMalierSet - set the contents of MAL interrupt enable register** This routine writes the contents of the MAL interrupt enable register.** NOMANUAL* void sysDcrMalierSet (UINT32)*/FUNC_BEGIN(sysDcrMalierSet)        mtdcr   MAL_IER, r3#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMalierSet)/********************************************************************************* sysDcrMaltxcasrGet - get the contents of the MAL Transmit Channel Active Set*                      Register** This routine reads and returns the contents of the MAL Transmit Channel Active* Set register.** NOMANUAL* UINT32 sysDcrMaltxcasrGet (void)*/FUNC_BEGIN(sysDcrMaltxcasrGet)        mfdcr   r3, MAL_TXCASR#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMaltxcasrGet)/********************************************************************************* sysDcrMaltxcasrSet - set the contents of the MAL Transmit Channel Active Set*                      Register** This function is used to enable MAL transmit channels. For each bit in the* input parameter that is set to '1', its corresponding TX channel will be* enabled.** NOMANUAL* void sysDcrMaltxcasrSet (UINT32)*/FUNC_BEGIN(sysDcrMaltxcasrSet)        mtdcr   MAL_TXCASR, r3#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMaltxcasrSet)/********************************************************************************* sysDcrMaltxcarrGet - get the contents of the MAL Transmit Channel Active Reset*                      Register** This routine reads and returns the contents of the MAL Transmit Channel Active* Reset register.** NOMANUAL* UINT32 sysDcrMaltxcarrGet (void)*/FUNC_BEGIN(sysDcrMaltxcarrGet)        mfdcr   r3, MAL_TXCARR#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMaltxcarrGet)/********************************************************************************* sysDcrMaltxcarrSet - set the contents of the MAL Transmit Channel Active Set*                      Register** This function is used to disable MAL transmit channels. For each bit in the* input parameter that is set to '1', its corresponding TX channel will be* disabled.** NOMANUAL* void sysDcrMaltxcarrSet (UINT32)*/FUNC_BEGIN(sysDcrMaltxcarrSet)        mtdcr   MAL_TXCARR, r3#if defined (PPC405GP_REVB) || defined (PPC405GP_REVC)   /* revB/C errata # 8 */        nop        nop        nop#endif        blrFUNC_END(sysDcrMaltxcarrSet)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -