Changeset 91d5ad6 in mainline for arch/ppc32/src/exception.S


Ignore:
Timestamp:
2006-03-15T00:55:05Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
286e03d
Parents:
d1e414c
Message:

ppc32: basic exception and interrupt handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/src/exception.S

    rd1e414c r91d5ad6  
    2828
    2929#include <arch/asm/regname.h>
    30 #include <arch/asm/spr.h>
     30#include <arch/mm/page.h>
    3131
    3232.section K_UNMAPPED_TEXT_START, "ax"
     
    8585.global exc_decrementer
    8686exc_decrementer:
     87        mtspr sprg1, sp
     88       
     89        subis sp, sp, 0x8000
     90       
     91        subi sp, sp, 144
     92        stw r0, 0(sp)
     93        stw r2, 4(sp)
     94        stw r3, 8(sp)
     95        stw r4, 12(sp)
     96        stw r5, 16(sp)
     97        stw r6, 20(sp)
     98        stw r7, 24(sp)
     99        stw r8, 28(sp)
     100        stw r9, 32(sp)
     101        stw r10, 36(sp)
     102        stw r11, 40(sp)
     103        stw r12, 44(sp)
     104        stw r13, 48(sp)
     105        stw r14, 52(sp)
     106        stw r15, 56(sp)
     107        stw r16, 60(sp)
     108        stw r17, 64(sp)
     109        stw r18, 68(sp)
     110        stw r19, 72(sp)
     111        stw r20, 76(sp)
     112        stw r21, 80(sp)
     113        stw r22, 84(sp)
     114        stw r23, 88(sp)
     115        stw r24, 92(sp)
     116        stw r25, 96(sp)
     117        stw r26, 100(sp)
     118        stw r27, 104(sp)
     119        stw r28, 108(sp)
     120        stw r29, 112(sp)
     121        stw r30, 116(sp)
     122        stw r31, 120(sp)
     123       
     124        mfspr r3, srr0
     125        stw r3, 124(sp)
     126       
     127        mfspr r3, srr1
     128        stw r3, 128(sp)
     129       
     130        mflr r3
     131        stw r3, 132(sp)
     132       
     133        mfcr r3
     134        stw r3, 136(sp)
     135       
     136        mfctr r3
     137        stw r3, 140(sp)
     138       
     139        mfxer r3
     140        stw r3, 144(sp)
     141
     142        lis r3, exc_dispatch@ha
     143        addi r3, r3, exc_dispatch@l
     144        mtspr srr0, r3
     145       
     146        mfmsr r3
     147        ori r3, r3, (msr_ir | msr_dr)@l
     148        mtspr srr1, r3
     149       
     150        lis r3, iret@ha
     151        addi r3, r3, iret@l
     152        mtlr r3
     153       
     154        addis sp, sp, 0x8000
     155        li r3, 10
    87156        rfi
    88         b exc_decrementer
    89157
    90158.org 0xa00
Note: See TracChangeset for help on using the changeset viewer.