📄 sysinfo_depend.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. * *---------------------------------------------------------------------- *//* * @(#)sysinfo_depend.h (sys/M32104) * * System common information * * 0x00600000 +-----------------------+ * |EIT branch | * |Address table | * 0x006001d0 +-----------------------+ * |System common info. | * 0x00600240 +-----------------------+ * * EIT branch address table details * 0x00600000 +-----------------------+ vector number * |Default handler | 0 * |System break | 1 * |Reserved instruction exception|2 * |Address exception | 3 * 0x00600010 +-----------------------+ * |Trap 0 - 15 | 4 * | | | * | | 19 * 0x00600050 +-----------------------+ * |External interrupt | 20 * |Built-in ICU 0 - 63 | | * | | 83 * 0x00600150 +-----------------------+ * |External interrupt | 84 * |PLD ICU 0 - 31 | | * | | 115 * 0x006001d0 +-----------------------+ */#ifndef __SYS_SYSINFO_DEPEND_H__#define __SYS_SYSINFO_DEPEND_H__#ifdef __cplusplusextern "C" {#endif#ifndef _in_asm_source_/* * Boot mode/action mode */typedef union { struct { UW debug:1; /* When in debug mode 1 */ UW fsrcv:1; /* When in disk repair mode 1 */ UW rsv:12; /* Reserved (always 0) */ UW basic:1; /* When in basic operation mode 1 */ UW rsv2:17; /* Reserved (always 0) */ } c; UW w;} BootMode;#define BM_DEBUG 0x00000001 /* Debug mode */#define BM_FSRCV 0x00000002 /* Disk repair mode */#define BM_BASIC 0x00004000 /* Basic operation mode *//* * System common information */typedef struct { VP sramtop; /* Internal RAM free space top */ VP sramend; /* Internal RAM free space end */ VP ramtop; /* External RAM free space top */ VP ramend; /* External RAM free space end */ UH Fclk; /* Constant frequency clock (MHz) */ UH Pclk; /* Peripheral I/O clock (MHz) */ UB *sysconf; /* SYSCONF top */ UB *devconf; /* DEVCONF top */ UW loop64us; /* Loop count per 64 micro sec */ BootMode bm; /* Boot mode */ UB bootdev[8]; /* Boot device name */ VW rsv[17]; /* Reserved (always 0) */} SysCommonInfo;/* * System common area */#define N_INTVEC 116typedef struct { FP intvec[N_INTVEC]; /* EIT vector */ SysCommonInfo scinfo; /* System common information */} SysCommonArea;#define SCArea ( (SysCommonArea*)0x00600000 )#define SCInfo ( SCArea->scinfo )#endif /* _in_asm_source_ *//* * Vector table address */#define EIT_VECTBL 0x00600000 /* EIT branch table top */#define EITVEC(n) ( EIT_VECTBL + (n) * 4 )#define EIT_DEFAULT 0 /* Default handler */#define EIT_SBI 1 /* System break */#define EIT_RIE 2 /* Reserved instruction exception */#define EIT_AE 3 /* Address exception */#define EIT_TRAP(n) ( 4 + (n) ) /* Trap 0 - 15 */#define EIT_ICU1(n) ( 20 + (n) ) /* Built-in interrupt controller */#define EIT_ICU2(n) ( 84 + (n) ) /* PLD interrupt controller */#ifdef __cplusplus}#endif#endif /* __SYS_SYSINFO_DEPEND_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -