亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? intarchlib.c

?? vxwork源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
* written in C, thus it also wraps your ISR in minimal register save/restore* codes.  However if you need a very fast response time to a particular* interrupt request, you might want to skip this register save/restore* sequence by directly attaching your ISR to the corresponding vector table* entry using intVecSet().  Note that this technique is only applicable to* an interrupt service with NO VxWorks system call.  For example it is not* allowed to use semGive() or logMsg() in the interrupt service routine which* is directly attached to vector table by intVecSet().  To facilitate the* direct usage of intVecSet() by user, a special entry point to exit an* interrupt context is provided within the SH77XX version of VxWorks kernel.* This entry point is located at address (vbr + intRte1W), here the intRte1W* is a global symbol for the vbr offset of the entry point in 16 bit length.* This entry point `intRte1' assumes that the current register bank is 0* (SR.RB == 0), and r1 and r0 are still saved on the interrupt stack, and* it also requires 0x70000000 in r0. Then `intRte1' properly cleans up the* interrupt stack and executes <rte> instruction to return to the previous* interrupt or task context.  The following code is an example of `intRte1'* usage.  Here the corresponding intPrioTable[] entry is assumed to be* 0x400000X0, namely MD=1, RB=0, BL=0 at the beginning of `usrIsr1'.**.CS*	.text*	.align	2*	.global	_usrIsr1*	.type	_usrIsr1,@function*	.extern	_usrRtn*	.extern intRte1W*				/@ intPrioTable[] sets SR to 0x400000X0 @/* _usrIsr1:*	mov.l	r0,@-sp		/@ must save r0 first (BANK0) @/*	mov.l	r1,@-sp		/@ must save r1 second (BANK0) @/**	mov.l	r2,@-sp		/@ save rest of volatile registers (BANK0) @/*	mov.l	r3,@-sp*	mov.l	r4,@-sp*	mov.l	r5,@-sp*	mov.l	r6,@-sp*	mov.l	r7,@-sp*	sts.l	pr,@-sp*	sts.l	mach,@-sp*	sts.l	macl,@-sp**	mov.l	UsrRtn,r0*	jsr	@r0		/@ call user's C routine @/*	nop			/@ (delay slot) @/**	lds.l	@sp+,macl	/@ restore volatile registers (BANK0) @/*	lds.l	@sp+,mach*	lds.l	@sp+,pr*	mov.l	@sp+,r7*	mov.l	@sp+,r6*	mov.l	@sp+,r5*	mov.l	@sp+,r4*	mov.l	@sp+,r3*	mov.l	@sp+,r2*				/@ intRte1 restores r1 and r0 @/*	mov.l	IntRte1W,r1*	mov.w	@r1,r0*	stc	vbr,r1*	add	r0,r1*	mov.l	IntRteSR,r0	/@ r0: 0x70000000 @/*	jmp	@r1		/@ let intRte1 clean up stack, then rte @/*	nop			/@ (delay slot) @/**		.align	2* UsrRtn:	.long	_usrRtn		/@ user's C routine @/* IntRteSR:	.long	0x70000000	/@ MD=1, RB=1, BL=1 @/* IntRte1W:	.long	intRte1W* .CE** The `intRte1' sets r0 to status register (SR: 0x70000000), to safely restore* SPC/SSR and to clean up the interrupt stack.  Note that TLB mishit exception* immediately reboots CPU while SR.BL=1.  To avoid this fatal condition, VxWorks* loads the `intRte1' code and the interrupt stack to a physical address space* (P1) where no TLB mishit happens.** Furthermore, there is another special entry point called `intRte2' at an* address (vbr + intRte2W).  The `intRte2' assumes that SR is already set to* 0x70000000 (MD: 1, RB: 1, BL: 1), then it does not restore r1 and r0.* While SR value is 0x70000000, you may use r0,r1,r2,r3 in BANK1 as volatile* registers.  The rest of BANK1 registers (r4,r5,r6,r7) are non-volatile, so* if you need to use them then you have to preserve their original values by* saving/restoring them on the interrupt stack.  So, if you need the ultimate* interrupt response time, you may set the corresponding intPrioTable[] entry* to NULL and manage your interrupt service only with r0,r1,r2,r3 in BANK1* as shown in the next sample code:** .CS*	.text*	.global  _usrIsr2*	.type    _usrIsr2,@function*	.extern  _usrIntCnt	/@ interrupt counter @/*	.extern  intRte2W*	.align   2*				/@ MD=1, RB=1, BL=1, since SR is not @/*				/@ substituted from intPrioTable[].  @/* _usrIsr2:*	mov.l	UsrIntAck,r1*	mov	#0x1,r0*	mov.b	r0,@r1		/@ acknowledge interrupt @/**	mov.l	UsrIntCnt,r1*	mov.l	X1FFFFFFF,r2*	mov.l	X80000000,r3*	and	r2,r1*	or	r3,r1		/@ r1: _usrIntCnt address in P1 @/*	mov.l	@r1,r0*	add	#1,r0*	mov.l	r0,@r1		/@ increment counter @/**	mov.l	IntRte2W,r1*	and	r2,r1*	or	r3,r1		/@ r1: intRte2W address in P1 @/*	mov.w	@r1,r0*	stc	vbr,r1*	add	r1,r0*	jmp	@r0		/@ let intRte2 clean up stack, then rte @/*	nop			/@ (delay slot) @/**		.align	2* UsrIntAck:	.long	0xa0001234	/@ interrupt acknowledge register @/* UsrIntCnt:	.long	_usrIntCnt* IntRte2W:	.long	intRte2W* X1FFFFFFF:	.long	0x1fffffff* X80000000:	.long	0x80000000* .CE** Note that the entire interrupt service is executed under SR.BL=1 in this* sample code.  It means that any access to virtual address space may reboot* CPU, since TLB mishit exception is blocked.  Therefore `usrIsr2' has to* access `usrIntCnt' and `intRte2W' from P1 region.  Also `usrIsr2' itself* has to be executed on P1 region, and it can be done by relocating the address* of `usrIsr2' to P1 as shown below:** .CS* IMPORT void usrIsr2 (void);** intVecSet (vector, (FUNCPTR)(((UINT32)usrIsr2 & 0x1fffffff) | 0x80000000));* .CE** In conclusion, you have to guarantee that the entire ISR does not access to* any virtual address space if you set the corresponding intPrioTable[] entry* to NULL.* * NOTE SIMNT:* This routine does nothing.** RETURNS: N/A** SEE ALSO: intVecBaseSet(), intVecGet()*/void intVecSet    (    FUNCPTR *	vector,		/* vector offset              */    FUNCPTR	function	/* address to place in vector */    )    {    ...    }/********************************************************************************* intVecGet - get an interrupt vector (MC680x0, x86, MIPS, SH, SimSolaris, SimNT)** This routine returns a pointer to the exception/interrupt handler attached* to a specified vector.  The vector is specified as an offset into the CPU's* vector table.  This vector table starts, by default, at:* * .TS* tab(|);* l l.*     MC680x0:     | 0*     MIPS:        | `excBsrTbl' in excArchLib*     x86:         | 0*     SH702x/SH703x/SH704x/SH76xx: | `excBsrTbl' in excArchLib*     SH77xx:      | vbr + 0x800*     SimSolaris:  | 0* .TE** However, the vector table may be set to start at any address with* intVecBaseSet() (on CPUs for which it is available).** This routine takes an interrupt vector as a parameter, which is the byte* offset into the vector table. Macros are provided to convert between interrupt* vectors and interrupt numbers, see `intArchLib'.** \"NOTE I960:* \"The interrupt table location is reinitialized to <sysIntTable> after* \"booting.  This location is returned by intVecBaseGet().* \"* NOTE SIMNT:* This routine does nothing and always returns 0.** RETURNS:* A pointer to the exception/interrupt handler attached to the specified vector.** SEE ALSO: intVecSet(), intVecBaseSet()*/FUNCPTR intVecGet    (    FUNCPTR *  vector     /* vector offset */    )    {    ...    }/********************************************************************************* intVecTableWriteProtect - write-protect exception vector table (MC680x0, x86, ARM, SimSolaris, SimNT)** If the unbundled Memory Management Unit (MMU) support package (VxVMI) is* present, this routine write-protects the exception vector table to* protect it from being accidentally corrupted.** Note that other data structures contained in the page will also be * write-protected.  In the default VxWorks configuration, the exception vector* table is located at location 0 in memory.  Write-protecting this affects* the backplane anchor, boot configuration information, and potentially the* text segment (assuming the default text location of 0x1000.)  All code* that manipulates these structures has been modified to write-enable * memory for the duration of the operation.  If you select a different* address for the exception vector table, be sure it resides in a page* separate from other writable data structures.** NOTE SIMSOLARIS, SIMNT:* This routine always returns ERROR on simulators.** RETURNS: OK, or ERROR if memory cannot be write-protected.** ERRNO: S_intLib_VEC_TABLE_WP_UNAVAILABLE*/STATUS intVecTableWriteProtect (void)    {    ...    }/********************************************************************************* intUninitVecSet - set the uninitialized vector handler (ARM)** This routine installs a handler for the uninitialized vectors to be* called when any uninitialised vector is entered.** RETURNS: N/A.*/void intUninitVecSet    (    VOIDFUNCPTR routine /* ptr to user routine */    )    {    ...    }/********************************************************************************* intHandlerCreateI86 - construct an interrupt handler for a C routine (x86)** This routine builds an interrupt handler around a specified C routine.* This interrupt handler is then suitable for connecting to a specific* vector address with intVecSet().  The interrupt handler is invoked in* supervisor mode at interrupt level.  A proper C environment is* established, the necessary registers saved, and the stack set up.* * The routine can be any normal C code, except that it must not invoke* certain operating system functions that may block or perform I/O* operations.** IMPLEMENTATION:* This routine builds an interrupt handler of the following form in* allocated memory:** .CS* 00  e8 kk kk kk kk		call	_intEnt		* tell kernel* 05  50			pushl	%eax		* save regs* 06  52			pushl	%edx* 07  51			pushl	%ecx* 08  68 pp pp pp pp		pushl	$_parameterBoi	* push BOI param* 13  e8 rr rr rr rr		call	_routineBoi	* call BOI routine* 18  68 pp pp pp pp		pushl	$_parameter	* push param* 23  e8 rr rr rr rr		call	_routine	* call C routine* 28  68 pp pp pp pp		pushl	$_parameterEoi	* push EOI param* 33  e8 rr rr rr rr		call	_routineEoi	* call EOI routine* 38  83 c4 0c			addl	$12, %esp	* pop param* 41  59			popl	%ecx		* restore regs* 42  5a			popl	%edx* 43  58			popl	%eax* 44  e9 kk kk kk kk		jmp	_intExit	* exit via kernel* .CE* * Third and fourth parameter of intHandlerCreateI86() are the BOI routine * address and its parameter that are inserted into the code as "routineBoi" * and "parameterBoi". * Fifth and sixth parameter of intHandlerCreateI86() are the EOI routine * address and its parameter that are inserted into the code as "routineEoi" * and "parameterEoi". * The BOI routine detects if this interrupt is stray/spurious/phantom by* interrogating the interrupt controller, and returns from the interrupt* if it is.  The EOI routine issues End Of Interrupt signal to the * interrupt controller, if it is required by the controller.  * Each interrupt controller has its own BOI and EOI routine.  They are* located in the BSP, and their address and parameter are taken by the* intEoiGet function (set to sysIntEoiGet() in the BSP).* The Tornado 2, and later, BSPs should use the BOI and EOI mechanism with* intEoiGet function pointer.** To keep the Tornado 101 BSP backward compatible, the function pointer * intEOI is not removed.  If intEoiGet is NULL, it should be set to the* sysIntEoiGet() routine in the BSP, intHandlerCreate() and the intEOI * function pointer (set to sysIntEOI() in the Tornado 101 BSP) is used.* * RETURNS: A pointer to the new interrupt handler, or NULL if memory* is insufficient.*/FUNCPTR intHandlerCreateI86    (    FUNCPTR routine,		/* routine to be called              */    int parameter,		/* parameter to be passed to routine */    FUNCPTR routineBoi,		/* BOI routine to be called          */    int parameterBoi,		/* parameter to be passed to routineBoi */    FUNCPTR routineEoi,		/* EOI routine to be called          */    int parameterEoi		/* parameter to be passed to routineEoi */    )    {    ...    }/******************************************************************************** intVecSet2 - set a CPU vector, gate type(int/trap), and selector (x86)** This routine attaches an exception handler to a specified vector,* with the type of the gate and the selector of the gate.  * The vector is specified as an offset into the CPU's vector table.  This* vector table starts, by default, at address 0.  * However, the vector table may be set to start at any address with* intVecBaseSet().  The vector table is set up in usrInit().** RETURNS: N/A** SEE ALSO: intVecBaseSet(), intVecGet(), intVecSet(), intVecGet2()*/void intVecSet2    (    FUNCPTR * vector,		/* vector offset              */    FUNCPTR function,		/* address to place in vector */    int idtGate,		/* IDT_TRAP_GATE or IDT_INT_GATE */    int idtSelector		/* sysCsExc or sysCsInt */    )    {    ...    }/******************************************************************************** intVecGet2 - get a CPU vector, gate type(int/trap), and gate selector (x86)** This routine gets a pointer to the exception/interrupt handler attached* to a specified vector, the type of the gate, the selector of the gate.  * The vector is specified as an offset into the CPU's vector table.  * This vector table starts, by default, at address 0.* However, the vector table may be set to start at any address with* intVecBaseSet().** RETURNS: N/A** SEE ALSO: intVecBaseSet(), intVecGet(), intVecSet(), intVecSet2()*/void intVecGet2    (    FUNCPTR * vector,		/* vector offset              */    FUNCPTR * pFunction,	/* address to place in vector */    int *     pIdtGate,		/* IDT_TRAP_GATE or IDT_INT_GATE */    int *     pIdtSelector	/* sysCsExc or sysCsInt */    )    {    ...    }/********************************************************************************* intStackEnable - enable or disable the interrupt stack usage (x86)** This routine enables or disables the interrupt stack usage and is only * callable from the task level. An Error is returned for any other calling * context. The interrupt stack usage is disabled in the default configuration* for the backward compatibility.  Routines that manipulate the interrupt* stack, are located in the file i86/windALib.s. These routines include* intStackEnable(), intEnt() and intExit().** RETURNS: OK, or ERROR if it is not in the task level.*/STATUS intStackEnable     (    BOOL enable		/* TRUE to enable, FALSE to disable */    )    {    ...    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品亚洲第一区在线暖暖韩国 | 香蕉久久一区二区不卡无毒影院| 一区二区三区欧美在线观看| 精品在线观看视频| 成人a区在线观看| 日韩网站在线看片你懂的| 国产精品乱码妇女bbbb| 日本欧美一区二区| 在线精品视频一区二区| 国产日韩欧美一区二区三区综合| 亚洲成人午夜电影| 成人美女在线观看| 久久综合国产精品| 丝瓜av网站精品一区二区| 91影视在线播放| 欧美国产激情二区三区| 久久电影国产免费久久电影| 欧美三电影在线| 一区二区三区蜜桃| 一本色道久久综合亚洲91| 亚洲国产高清在线观看视频| 久久99精品国产.久久久久久| 欧美色手机在线观看| 亚洲精品久久久蜜桃| 波多野结衣视频一区| 欧美激情综合五月色丁香| 国产一区二区成人久久免费影院| 欧美一区二区三区小说| 日日噜噜夜夜狠狠视频欧美人| 91久久精品日日躁夜夜躁欧美| 日韩一区有码在线| 91碰在线视频| 亚洲一区在线看| 欧美三级在线看| 亚洲一区影音先锋| 欧美欧美欧美欧美| 美脚の诱脚舐め脚责91| 欧美成人r级一区二区三区| 另类中文字幕网| 久久久不卡影院| av一二三不卡影片| 亚洲视频在线观看三级| 在线欧美一区二区| 五月天激情综合| 91精品视频网| 麻豆精品一区二区三区| 精品日韩99亚洲| 成人国产电影网| 中文字幕不卡一区| 成人免费va视频| 亚洲综合另类小说| 欧美一区二区三区公司| 精品一区二区日韩| 国产精品私人影院| 91福利小视频| 精品综合免费视频观看| 国产精品区一区二区三区| 色婷婷久久久亚洲一区二区三区| 亚洲一区二区精品视频| 欧美成人r级一区二区三区| 不卡一区二区在线| 亚洲成av人片在线观看无码| 日韩免费性生活视频播放| 国产精品亚洲成人| 一区二区三区在线不卡| 欧美一区二区三区免费观看视频| 国产精品18久久久久| 亚洲精品乱码久久久久久| 欧美大片一区二区三区| 93久久精品日日躁夜夜躁欧美| 亚洲国产cao| 欧美激情一区不卡| 91精品福利在线一区二区三区| 国产精品自拍av| 婷婷综合五月天| 国产精品久久久一本精品| 欧美久久一区二区| av成人老司机| 国内精品在线播放| 亚洲一区在线观看免费观看电影高清| 久久久99久久精品欧美| 欧美区一区二区三区| 99re在线视频这里只有精品| 日本aⅴ精品一区二区三区| 中文字幕亚洲一区二区av在线| 欧美一区二视频| 欧美综合一区二区三区| 成人涩涩免费视频| 精品一区二区久久| 免费人成在线不卡| 九九视频精品免费| 亚洲成人av一区二区| 综合久久久久久久| 国产日韩欧美综合在线| 欧美一三区三区四区免费在线看| av动漫一区二区| 高清国产一区二区| 精品夜夜嗨av一区二区三区| 亚洲成人动漫av| 亚洲综合小说图片| 一区二区三区在线观看动漫| 成人免费小视频| 欧美激情在线看| 国产欧美精品日韩区二区麻豆天美| 日韩一区二区在线观看| 51久久夜色精品国产麻豆| 欧美日韩1234| 欧美精品一二三区| 在线综合亚洲欧美在线视频| 欧美另类一区二区三区| 欧美久久久久久久久| 欧美欧美午夜aⅴ在线观看| 制服.丝袜.亚洲.另类.中文| 欧美日韩一本到| 欧美精品久久一区二区三区| 这里是久久伊人| 日韩欧美视频一区| 2024国产精品| 国产精品美女视频| 亚洲精品视频在线观看网站| 一区二区三区国产精华| 亚洲小说春色综合另类电影| 亚洲国产美女搞黄色| 五月综合激情日本mⅴ| 琪琪久久久久日韩精品| 韩国av一区二区三区在线观看| 激情都市一区二区| 成人一区二区在线观看| 91福利视频在线| 欧美不卡一区二区三区| 国产午夜精品久久久久久免费视 | 美女视频免费一区| 国产另类ts人妖一区二区| av一区二区三区四区| 欧美日韩精品专区| 精品国产免费视频| 中文字幕一区日韩精品欧美| 亚洲最新视频在线播放| 麻豆久久一区二区| 成人av在线网| 欧美日高清视频| 中文字幕乱码久久午夜不卡| 一区二区三区四区在线播放 | 成人激情开心网| 欧亚洲嫩模精品一区三区| 欧美一级搡bbbb搡bbbb| 国产视频911| 亚洲3atv精品一区二区三区| 久久精品理论片| 色中色一区二区| 精品国产精品网麻豆系列| 亚洲欧美在线高清| 麻豆视频一区二区| 色综合天天在线| 精品福利一区二区三区免费视频| 国产精品久久久久久久久久久免费看 | 国产精品狼人久久影院观看方式| 亚洲一区二区三区四区在线观看| 韩国一区二区三区| 欧美三级电影在线看| 国产精品人人做人人爽人人添| 亚洲国产精品影院| 成人精品电影在线观看| 日韩片之四级片| 久久不见久久见免费视频7| 91浏览器在线视频| 国产亚洲人成网站| 男女男精品视频网| 在线观看亚洲a| 国产精品福利一区二区三区| 精品一区二区综合| 欧美老年两性高潮| 亚洲三级理论片| 国产成人免费在线视频| 日韩午夜精品电影| 日本午夜一本久久久综合| 色婷婷香蕉在线一区二区| 国产精品久久久久永久免费观看| 九九精品一区二区| 91精品国产乱码久久蜜臀| 天天av天天翘天天综合网| 91国偷自产一区二区三区成为亚洲经典 | 亚洲少妇30p| 成人av综合在线| 亚洲国产成人在线| 国产乱对白刺激视频不卡| 日韩精品一区二区三区在线播放 | 99久久国产综合精品色伊| 久久久久久久久99精品| 美女性感视频久久| 欧美一级精品在线| 日本不卡一二三区黄网| 欧美精品v国产精品v日韩精品| 一区二区三区四区不卡在线| 99精品欧美一区二区蜜桃免费 | 色综合久久综合| 亚洲日本在线视频观看| 91亚洲精品久久久蜜桃| 亚洲色图视频网站| 欧洲国产伦久久久久久久|