⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysdef_depend.h

📁 日本著名的的嵌入式实时操作系统T-Kernel的源码及用户手册。
💻 H
字号:
/* *---------------------------------------------------------------------- *    T-Kernel * *    Copyright (C) 2004 by Ken Sakamura. All rights reserved. *    T-Kernel is distributed under the T-License. *---------------------------------------------------------------------- * *    Version:   1.01.00 *    Released by T-Engine Forum(http://www.t-engine.org) at 2004/6/28. * *---------------------------------------------------------------------- *//* *	@(#)sysdef_depend.h (tk/MC9328) * *	Definition about MC9328 * *	Included also from assembler program. */#ifndef __TK_SYSDEF_DEPEND_H__#define __TK_SYSDEF_DEPEND_H__/* * Program status register (PSR) */#define	PSR_N		0x80000000	/* Condition flag Negative */#define	PSR_Z		0x40000000	/* Zero */#define	PSR_C		0x20000000	/* Carry */#define	PSR_V		0x10000000	/* Overflow */#define	PSR_I		0x00000080	/* Interrupt (IRQ) disable */#define	PSR_F		0x00000040	/* Fast Interrupt (FIQ) disable */#define	PSR_T		0x00000020	/* Thumb mode */#define PSR_DI		( PSR_I )	/* All Interrupts disable */#define	PSR_M(n)	( n )		/* Processor mode 0-31 */#define	PSR_USR		PSR_M(16)	/* User mode */#define	PSR_FIQ		PSR_M(17)	/* Fast Interrupt (FIQ) mode */#define	PSR_IRQ		PSR_M(18)	/* Interrupt (IRQ) mode */#define	PSR_SVC		PSR_M(19)	/* Supervisor mode */#define	PSR_ABT		PSR_M(23)	/* Abort mode */#define	PSR_UND		PSR_M(27)	/* Undefined order mode */#define	PSR_SYS		PSR_M(31)	/* System mode *//* * Task mode flag *	System shared information 'taskmode'  */#define	TMF_CPL(n)	( (n) )		/* Current protection level(0-3) */#define	TMF_PPL(n)	( (n) << 16 )	/* Previous protection level(0-3) *//* * System control coprocessor (CP15): Control register (CR1) */#define	CR1_M	0x0001	/* MMU enable */#define	CR1_A	0x0002	/* Alignment check enable */#define	CR1_C	0x0004	/* Cache enable */#define	CR1_W	0x0008	/* Write buffer enable */#define	CR1_B	0x0080	/* Endian (1=Big endian) */#define	CR1_S	0x0100	/* System protection */#define	CR1_R	0x0200	/* ROM protection */#define	CR1_I	0x1000	/* Instruction cache enable*/#define	CR1_V	0x2000	/* High vector */#define	CR1_RR	0x4000	/* Round robin cache *//* * Fault status (CP15:CR5) */#define	FSR_Alignment	0x1	/* 00x1 : Miss-alignment access */#define	FSR_BusErrorT	0xc	/* 11x0 : Bus error when converting address */#define	FSR_Translation	0x5	/* 01x1 : No page when converting address */#define	FSR_Domain	0x9	/* 10x1 : Domain access violation */#define	FSR_Permission	0xd	/* 11x1 : Access violation */#define	FSR_BusErrorL	0x4	/* 01x0 : Bus error when fetching line */#define	FSR_BusErrorO	0x8	/* 10x0 : Other bus errors */#define	FSR_Section	0x0	/* xx0x : Section */#define	FSR_Page	0x2	/* xx1x : Page */#define	FSR_TypeMask	0xd	/* Type mask *//* ------------------------------------------------------------------------ *//* * Interrupt controller *	Register size W */#define	AITC(n)		( 0x00223000 + (n) )#define	INTCNTL		AITC(0x000)	/* Interrupt control */#define	NIMASK		AITC(0x004)	/* Normal interrupt(IRQ) mask */#define	INTENNUM	AITC(0x008)	/* Interrupt enable */#define	INTDISNUM	AITC(0x00c)	/* Interrupt disable */#define	INTENABLEH	AITC(0x010)	/* Interrupt enable mask H */#define	INTENABLEL	AITC(0x014)	/* Interrupt enable mask L */#define	INTTYPEH	AITC(0x018)	/* Interrupt type H */#define	INTTYPEL	AITC(0x01c)	/* Interrupt type L */#define	NIPRIORITY7	AITC(0x020)	/* Interrupt priority 7 */#define	NIPRIORITY6	AITC(0x024)	/* Interrupt priority 6 */#define	NIPRIORITY5	AITC(0x028)	/* Interrupt priority 5 */#define	NIPRIORITY4	AITC(0x02c)	/* Interrupt priority 4 */#define	NIPRIORITY3	AITC(0x030)	/* Interrupt priority 3 */#define	NIPRIORITY2	AITC(0x034)	/* Interrupt priority 2 */#define	NIPRIORITY1	AITC(0x038)	/* Interrupt priority 1 */#define	NIPRIORITY0	AITC(0x03c)	/* Interrupt priority 0 */#define	NIVECSR		AITC(0x040)	/* Normal interrupt(IRQ) vector */#define	FIVECSR		AITC(0x044)	/* Fast interrupt(FIQ) vector */#define	INTSRCH		AITC(0x048)	/* Interrupt source H */#define	INTSRCL		AITC(0x04c)	/* Interrupt source L */#define	INTFRCH		AITC(0x050)	/* Force interrupt H */#define	INTFRCL		AITC(0x054)	/* Force interrupt L */#define	NIPNDH		AITC(0x058)	/* Normal interrupt(IRQ) pending H */#define	NIPNDL		AITC(0x05c)	/* Normal interrupt(IRQ) pending L */#define	FIPNDH		AITC(0x060)	/* Fast interrupt(FIQ) pending H */#define	FIPNDL		AITC(0x064)	/* Fast interrupt(FIQ) pending L *//* * GPIO register (interrupt only) *	Register size W */#define	GPIOA(n)	( 0x0021c000 + (n) )#define	GPIOB(n)	( 0x0021c100 + (n) )#define	GPIOC(n)	( 0x0021c200 + (n) )#define	GPIOD(n)	( 0x0021c300 + (n) )#define	ICR1_A		GPIOA(0x28)	/* Interrupt type 1 */#define	ICR1_B		GPIOB(0x28)#define	ICR1_C		GPIOC(0x28)#define	ICR1_D		GPIOD(0x28)#define	ICR2_A		GPIOA(0x2c)	/* Interrupt type 2 */#define	ICR2_B		GPIOB(0x2c)#define	ICR2_C		GPIOC(0x2c)#define	ICR2_D		GPIOD(0x2c)#define	IMR_A		GPIOA(0x30)	/* Interrupt mask */#define	IMR_B		GPIOB(0x30)#define	IMR_C		GPIOC(0x30)#define	IMR_D		GPIOD(0x30)#define	ISR_A		GPIOA(0x34)	/* Interrupt status */#define	ISR_B		GPIOB(0x34)#define	ISR_C		GPIOC(0x34)#define	ISR_D		GPIOD(0x34)/* * FPGA interrupt control register *	Register size B */#define	IRQ_MASK1	0x15002014	/* Interrupt mask register 1 */#define	IRQ_MASK2	0x15002015	/* Interrupt mask register 2 */#define	IRQ_STR1	0x15002016	/* Interrupt status register 1 */#define	IRQ_STR2	0x15002017	/* Interrupt status register 2 *//* ------------------------------------------------------------------------ *//* * Software interrupt number for T-Kernel  */#define	SWI_SVC		6	/* T-Kernel system call/extension SVC */#define	SWI_RETINT	7	/* tk_ret_int() system call */#define	SWI_DISPATCH	8	/* Task dispatcher */#define	SWI_DEBUG	9	/* Debugger support function *//* * Software interrupt number for T-Monitor */#define	SWI_MONITOR	4	/* T-Monitor service call *//* * Software interrupt number for Extension */#define	SWI_KILLPROC	11	/* Force process termination request *//* ------------------------------------------------------------------------ *//* * Location and size of task specific space *	Number of entries and index number of first level page table */#define	TOP_PDIR_ENTRIES	1024	/* 0x40000000 */#define	NUM_PDIR_ENTRIES	256	/* 0x40000000 - 0x50000000 */#endif /* __TK_SYSDEF_DEPEND_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -