pl190.h

来自「ARM9基于WINDOWSCE的BSP源代码」· C头文件 代码 · 共 131 行

H
131
字号
/*
*   The content of this file or document is CONFIDENTIAL and PROPRIETARY
*   to Jade Technologies Co., Ltd.  It is subjected to the terms of a
*   License Agreement between Licensee and Jade Technologies Co., Ltd.
*   restricting among other things, the use, reproduction, distribution
*   and transfer.  Each of the embodiments, including this information 
*   and any derivative work shall retain this copyright notice.
* 
*   Copyright (c) 2004 - 2005 Jade Technologies Co., Ltd. 
*   All rights reserved.
*/
// ----------------------------------------------------------------
// File:     pl190.h,v
// Revision: 1.0
// ----------------------------------------------------------------
// $ 
//

// pl190.h - Vectored Interrupt controller & Secondary Interrupt Controller

#ifndef pl190_h
#define pl190_h


// Useful offsets into VIC
#define VIC_VECTADDR_OFFSET     0x100
#define VIC_CNTLADDR_OFFSET     0x200


// Structure to access PL190 VIC hardware registers 

typedef volatile struct TAG_VIC_REGS
{
    const DWORD IRQStatus;      /* VIC_BASE + 0x000 */
    const DWORD FIQStatus;      /* VIC_BASE + 0x004 */
    const DWORD RawIntr;        /* VIC_BASE + 0x008 */
          DWORD IntSelect;      /* VIC_BASE + 0x00c */
          DWORD IntEnable;      /* VIC_BASE + 0x010 */
          DWORD IntEnClear;     /* VIC_BASE + 0x014 */
          DWORD SoftInt;        /* VIC_BASE + 0x018 */
          DWORD SoftIntClear;   /* VIC_BASE + 0x01c */
          DWORD Protection;     /* VIC_BASE + 0x020 */
    const DWORD Padding0[3];    /* VIC_BASE + 0x024 */
          DWORD VectAddr;       /* VIC_BASE + 0x030 */
          DWORD DefVectAddr;    /* VIC_BASE + 0x034 */
    const DWORD Padding1[50];   /* VIC_BASE + 0x038 */
          DWORD VectAddr0;      /* VIC_BASE + 0x100 */
          DWORD VectAddr1;      /* VIC_BASE + 0x104 */
          DWORD VectAddr2;      /* VIC_BASE + 0x108 */
          DWORD VectAddr3;      /* VIC_BASE + 0x10c */
          DWORD VectAddr4;      /* VIC_BASE + 0x110 */
          DWORD VectAddr5;      /* VIC_BASE + 0x114 */
          DWORD VectAddr6;      /* VIC_BASE + 0x118 */
          DWORD VectAddr7;      /* VIC_BASE + 0x11c */
          DWORD VectAddr8;      /* VIC_BASE + 0x120 */
          DWORD VectAddr9;      /* VIC_BASE + 0x124 */
          DWORD VectAddr10;     /* VIC_BASE + 0x128 */
          DWORD VectAddr11;     /* VIC_BASE + 0x12c */
          DWORD VectAddr12;     /* VIC_BASE + 0x130 */
          DWORD VectAddr13;     /* VIC_BASE + 0x134 */
          DWORD VectAddr14;     /* VIC_BASE + 0x138 */
          DWORD VectAddr15;     /* VIC_BASE + 0x13c */
    const DWORD Padding2[48];   /* VIC_BASE + 0x140 */
          DWORD VectCntl0;      /* VIC_BASE + 0x200 */
          DWORD VectCntl1;      /* VIC_BASE + 0x204 */
          DWORD VectCntl2;      /* VIC_BASE + 0x208 */
          DWORD VectCntl3;      /* VIC_BASE + 0x20c */
          DWORD VectCntl4;      /* VIC_BASE + 0x210 */
          DWORD VectCntl5;      /* VIC_BASE + 0x214 */
          DWORD VectCntl6;      /* VIC_BASE + 0x218 */
          DWORD VectCntl7;      /* VIC_BASE + 0x21c */
          DWORD VectCntl8;      /* VIC_BASE + 0x220 */
          DWORD VectCntl9;      /* VIC_BASE + 0x224 */
          DWORD VectCntl10;     /* VIC_BASE + 0x228 */
          DWORD VectCntl11;     /* VIC_BASE + 0x22c */
          DWORD VectCntl12;     /* VIC_BASE + 0x230 */
          DWORD VectCntl13;     /* VIC_BASE + 0x234 */
          DWORD VectCntl14;     /* VIC_BASE + 0x238 */
          DWORD VectCntl15;     /* VIC_BASE + 0x23c */
    const DWORD Padding3[48];   /* VIC_BASE + 0x240 */
          DWORD ITCR;           /* VIC_BASE + 0x300 */
    const DWORD ITIP1;          /* VIC_BASE + 0x304 */
    const DWORD ITIP2;          /* VIC_BASE + 0x308 */
    const DWORD ITOP1;          /* VIC_BASE + 0x30c */
    const DWORD ITOP2;          /* VIC_BASE + 0x310 */
    const DWORD Padding4[819];  /* VIC_BASE + 0x314 */
    const DWORD PeriphID0;      /* VIC_BASE + 0xfe0 */
    const DWORD PeriphID1;      /* VIC_BASE + 0xfe4 */
    const DWORD PeriphID2;      /* VIC_BASE + 0xfe8 */
    const DWORD PeriphID3;      /* VIC_BASE + 0xfec */
    const DWORD PCellID0;       /* VIC_BASE + 0xff0 */
    const DWORD PCellID1;       /* VIC_BASE + 0xff4 */
    const DWORD PCellID2;       /* VIC_BASE + 0xff8 */
    const DWORD PCellID3;       /* VIC_BASE + 0xffc */

} vstVICRegs, *pvstVICRegs;

// Number of vectored interrupt lines
#define VIC_NUM_VECTIRQ_LINES       16

// Number of interrupts
#define VIC_NUM_IRQ_LINES           32

// Bitfield for a vectored interrupt line
#define VIC_SET_VECTORED_INT        0x20        

// Value for when a non-vectored interrupt fires
#define VIC_NONVECT_INTERRUPT       VIC_NUM_IRQ_LINES


// Structure to access Z228 Development Board's Secondary Interrupt
// Controller hardware registers.

typedef volatile struct TAG_VP_SIC_REGS
{

    const DWORD SIC_STATUS;     /* IC_BASE */
    const DWORD SIC_RAWSTAT;    /* + 0x004 */
          DWORD SIC_ENABLE;     /* + 0x008 */
          DWORD SIC_ENABLECLR;  /* + 0x00C */
          DWORD SIC_SOFTINTSET; /* + 0x010 */
          DWORD SIC_SOFTINTCLR; /* + 0x014 */
          DWORD SIC_PADDING1;   /* + 0x018 */
          DWORD SIC_PADDING2;   /* + 0x01c */
          DWORD PIC_ENABLE;     /* + 0x020 */
          DWORD PIC_ENABLEC;    /* + 0x024 */
} vstVP_SIC_Regs, *pvstVP_SIC_Regs;


#endif // pl190_h

⌨️ 快捷键说明

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