Exemplo n.º 1
0
void ktrap_init() {

    kdebug("ktrap_init()\n");

    CP15VectorBaseAddrSet(&vector_table);

    *(int *)0 = 0xffffffff;

    while (1);
}
Exemplo n.º 2
0
/**
 * \brief   This function copies the vector table to a location in OCMC
 *          RAM and sets the vector base address register.
 *
 * \param   None.
 *
 * \return  None.
 * 
 **/
static void CopyVectorTable(void)
{
    unsigned int *dest = (unsigned int *)AM335X_VECTOR_BASE;
    unsigned int *src =  (unsigned int *)vecTbl;
    unsigned int count;
  
    CP15VectorBaseAddrSet(AM335X_VECTOR_BASE);

    for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]); count++)
    {
        dest[count] = src[count];
    }
}
Exemplo n.º 3
0
/**
 * \brief   This function copies the vector table to a location in OCMC
 *          RAM and sets the vector base address register.
 *
 * \const unsigned int AM335X_VECT1OR_BASE   = 0x4030CE00;Таблицу векторов не переносим
 *  оставляем как есть по default.
 *
 * \return  None.
 * 
 **/
static void CopyVectorTable(void)
{
    unsigned int *dest = (unsigned int *)AM335X_VECTOR_BASE;
    unsigned int *src =  (unsigned int *)vecTbl;
    static unsigned int count=0;

    //функция находиться в файле ->>>>> system/cp15.asm
    CP15VectorBaseAddrSet(AM335X_VECTOR_BASE);
    //Чистим таблицу векторов.
    for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]);count++)
    {
        dest[count] = 0x00000000;
    }

    for(count = 0; count < sizeof(vecTbl)/sizeof(vecTbl[0]); count++)
    {
           dest[count] = src[count];
    }


}