📄 nmiexceptionvector.s
字号:
// NMIExceptionVector.S -- Standalone NMI Interrupt Vector/Handler
// $Id: //depot/rel/BearValley/Xtensa/OS/xtos/NMIExceptionVector.S#1 $
// Customer ID=4654; Build=0x116b0; Copyright (c) 2003 by Tensilica Inc. ALL RIGHTS RESERVED.
// These coded instructions, statements, and computer programs are the
// copyrighted works and confidential proprietary information of Tensilica Inc.
// They may not be modified, copied, reproduced, distributed, or disclosed to
// third parties in any manner, medium, or form, in whole or in part, without
// the prior written consent of Tensilica Inc.
// The NMI exception vector handles non-maskable interrupts.
#include <xtensa/coreasm.h>
#include <xtensa/config/system.h>
#include <xtensa/config/specreg.h>
.global _NMIExceptionVector
.section .NMIExceptionVector.text, "ax"
.begin literal_prefix .NMIExceptionVector
.align 4
_NMIExceptionVector:
// Insert any custom NMI handling code here.
// For example:
// wsr a0, EXCSAVE_7
// movi a0, ...address of some save area specific to this code...
// s32i a1, a0, 0 // save whatever registers are needed
// :
// do something useful ...
// :
// l32i a1, a0, 0 // restore whatever registers were saved
// rsr a0, EXCSAVE_7
//
// This default NMI handler does not do anything. It just returns
// immediately upon any occurrence of a non-maskable interrupt.
rfi 7
// If vector too big for allocated space, catch it at assembly time
// (albeit with cryptic "can't org backwards" error message):
.org XSHAL_NMI_VECTOR_SIZE
.Lendlabel:
.text
.end literal_prefix
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -