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

📄 sysalib.s

📁 移植好的Ibm405ep bsp板极支持包
💻 S
📖 第 1 页 / 共 2 页
字号:
sysPciInWord:        lhbrx   r3,r0,r3        /* Read and swap from PCI space */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************* sysPciInLong - reads a long (32-bit big-endian) from PCI Config Space.** This function reads a long from a specified PCI Config Space (little-endian)* address.  It uses the load word byte-reversed instruction.** ARGUMENTS:*       r3      = Config Space address** RETURNS:*       r3      = long (32-bit big-endian) from address.*/sysPciInLong:        lwbrx   r3,r0,r3        /* Read and swap from PCI space */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************** sysPciOutByte - writes a byte to PCI Config Space.** This function writes a byte to a specified PCI Config Space address.** ARGUMENTS:*       r3      = Config Space address*       r4      = byte to write** RETURNS: N/A*/sysPciOutByte:        stbx    r4,r0,r3        /* Write a byte to PCI space */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************** sysPciOutWord - writes a word (16-bit big-endian) to PCI Config Space.** This function writes a word to a specified PCI Config Space (little-endian)* address.  It uses the store halfword byte-reversed instruction.** ARGUMENTS:*       r3      = Config Space address*       r4      = word (16-bit big-endian) to write** RETURNS: N/A*/sysPciOutWord:        sthbrx  r4,r0,r3        /* Write with swap to PCI space */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************** sysPciOutLong - writes a long (32-bit big-endian) to PCI Config Space.** This function writes a long to a specified PCI Config Space (little-endian)* address.  It uses the store word byte-reversed instruction.** ARGUMENTS:*       r3      = Config Space address*       r4      = long (32-bit big-endian) to write** RETURNS: N/A*/sysPciOutLong:        stwbrx  r4,r0,r3        /* Write big-endian long to little-endian */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************* sysInWord - reads a half word from an io address.**  This function reads a 16 bit half word from a specified io address.** ARGUMENTS:*       r3      = Config Space address** RETURNS:*       r3      = word (16-bit big-endian) from address.*/sysInWord:    lhzx    r3,r0,r3        /* Read word from an address */    sync                    /* Sync I/O operation */    bclr    20,0            /* Return to caller *//******************************************************************************* sysInByte - reads a byte from an io address.**  This function reads a 8 bit byte from a specified io address.** ARGUMENTS:*       r3      = Config Space address** RETURNS:*       r3      = byte from address.*/sysInByte:    sync    lbz     r3, 0(r3)    sync    bclr    20,0/******************************************************************************** sysOutByte - write a byte to an io address.**  This function write a 8 bit byte to a specified io address.** ARGUMENTS:*       r3      = Config Space address*       r4      = byte to write** RETURNS: N/A*/sysOutByte:    sync    stb     r4,0(r3)    sync    bclr    20,0/******************************************************************************** sysOutWord - write a half word to an io address.**  This function write a 16 bit half word to a specified io address.** ARGUMENTS:*       r3      = Config Space address*       r4      = word (16-bit big-endian) to write** RETURNS: N/A*/sysOutWord:    sthx    r4,r0,r3        /* Write a word to an address */    sync                    /* Sync I/O operation */    bclr    20,0            /* Return to caller *//******************************************************************************* sysInLong - reads a word from an io address.** This function reads a 32 bit word from a specified io address.** INPUTS:* r3      = address to read data from* RETURNS: word from address.*/sysInLong:        lwzx    r3,r0,r3        /* Read word from an address */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************** sysOutLong - writes a word to an io address.** This function writes a 32 bit word to a specified io address.** r3      = address to write to* r4      = data to be written* RETURNS: N/A*/sysOutLong:        stwx    r4,r0,r3        /* Write a word to an address */        sync                    /* Sync I/O operation */        bclr    20,0            /* Return to caller *//******************************************************************************* sysSpin - performs a branch hang, used for debug purposes.*** ARGUMENTS:*       none** RETURNS:*       none*/sysSpin:        b       sysSpin/********************************************************************************* sysDcrPlbbesrGet - get the contents of the PLB error status register** This routine reads and returns the contents of the PLB error status register.** RETURNS: N/A* UINT32 sysDcrPlbbesrGet (void)*/sysDcrPlbbesrGet:        mfdcr   r3, PLB0_BESR        blr/********************************************************************************* sysDcrPlbbesrClear - clears pending status in the PLB error register** This routine writes to the PLB error status register.  It will clear the* status for each bit that is set to 1 in the input parameter.** RETURNS: N/A* void sysDcrPlbbesrClear (UINT32)*/sysDcrPlbbesrClear:        mtdcr   PLB0_BESR, r3        blr/********************************************************************************* sysDcrPlbbearGet - get the contents of the PLB error address register** This routine reads and returns the contents of the PLB error address register.** RETURNS: N/A* UINT32 sysDcrPlbbearGet (void)*/sysDcrPlbbearGet:        mfdcr   r3, PLB0_BEAR        blr/* *  Include other .s files for chip specific DCR functions */#include "sysDcr.s"        /* Functions for reading and writing DCR registers */

⌨️ 快捷键说明

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