📄 exceptiontable.asm
字号:
.include PrologueEpilogue.asm
.extern DECIntr
.extern ExternalInterrupt
.extern OSCtxSw
.extern __reset, ExceptionRoutine, InterruptControllerRegular
.globl ExceptionVectorTable, ExceptionVectorTableEnd, reset
.section .reset,4,1,6 # put this code in .reset section
# here define all the interrupts handler
##############################################################################
#
# Exception Vector Table rev. Jan 22, 2003 SM, AP
#
# Specific to MPC5xx Family
#
# The vector table below requires:
# BBCMCR[ETRE] = 0 (exception table relocation is not used)
#
# The table base will be low (0x0) or high (0xfff00000) depending on MSR[IP].
#
# All exceptions except reset:
# 1. save context (prologue)
# 2. call a single dummy routine (ExceptionRoutine)
# 3. restore context (epilogue)
#
##############################################################################
ExceptionVectorTable:
base_add .equ 0x00000000 ;Can be 0x00000000 or 0xFFF00000
##############################################################################
#
# 0x0100 System Reset
#
##############################################################################
.org base_add + 0x100
reset:
ba __reset
##############################################################################
#
# 0x0200 Machine Check
#
##############################################################################
.org base_add + 0x200
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0300 Data Storage
#
##############################################################################
.org base_add + 0x300
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0500 External Interrupt
#
##############################################################################
.org base_add + 0x500
ba ExternalInterrupt
##############################################################################
#
# 0x0600 Alignment
#
##############################################################################
.org base_add + 0x600
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0700 Program
#
##############################################################################
.org base_add + 0x700
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0800 Floating Point Unavailable
#
##############################################################################
.org base_add + 0x800
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0900 Decrementer
#
##############################################################################
.org base_add + 0x900
ba DECIntr
##############################################################################
#
# 0x0C00 System Call in another file:ctxswhandler.asm
#
##############################################################################
.org base_add + 0xC00
ba OSCtxSw
##############################################################################
#
# 0x0D00 Trace
#
##############################################################################
.org base_add + 0xD00
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x0E00 FP Assist
#
##############################################################################
.org base_add + 0xE00
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1000 MPC8xx and MPC505: Software Emulation
#
#
##############################################################################
.org base_add + 0x1000
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1300 MPC8xx: Instruction TLB Error
# PPC7xx and PPC603e/82xx: Instruction address breakpoint
#
##############################################################################
.org base_add + 0x1300
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1400 MPC8xx: Data TLB Error
# PPC7xx and PPC603e/82xx: System management
#
##############################################################################
.org base_add + 0x1400
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1C00 MPC8xx and MPC505: Data breakpoint
#
##############################################################################
.org base_add + 0x1C00
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1D00 MPC8xx and MPC505: Instruction breakpoint
#
##############################################################################
.org base_add + 0x1D00
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1E00 MPC8xx and MPC505: Peripheral breakpoint
#
##############################################################################
.org base_add + 0x1E00
prologue
bl ExceptionRoutine
epilogue
##############################################################################
#
# 0x1F00 MPC8xx and MPC505: Non-maskable development port
#
##############################################################################
.org base_add + 0x1F00
prologue
bl ExceptionRoutine
epilogue
ExceptionVectorTableEnd:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -