📄 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/VR4131) * * System common information * * 0x80000000 +-----------------------+ * |Exception vector table | * 0x80000280 +-----------------------+ * |System common info. | * 0x800002c0 +-----------------------+ */#ifndef __SYS_SYSINFO_DEPEND_H__#define __SYS_SYSINFO_DEPEND_H__#ifdef __cplusplusextern "C" {#endif#ifndef _in_asm_source_/* * Boot mode/Operation 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 shared information */typedef struct { VP ramtop; /* RAM free space top */ VP ramend; /* RAM free space end */ UB *sysconf; /* SYSCONF top */ UB *devconf; /* DEVCONF top */ VP istkpos; /* Exception stack pointer */ VP sstktop; /* System stack top */ UW taskmode; /* Task mode flag */ FP chkmem; /* Memory check function */ UH VTClock; /* Peripheral interface clock (1/100 MHz) */ UH TClock; /* Built-in peripheral clock (1/100 MHz) */ UW loop64us; /* Loop count per 64 micro sec */ BootMode bm; /* Boot mode */ UB bootdev[8]; /* Boot device name */ VW rsv[3]; /* Reserved (always 0) */} SysCommonInfo;/* * System shared area */#define N_INTVEC 160 /* Vector table size */typedef struct { FP intvec[N_INTVEC]; /* EIT vector */ SysCommonInfo scinfo; /* System shared information */} SysCommonArea;#define SCArea ( (SysCommonArea*)0x80000000 )#define SCInfo ( SCArea->scinfo )#endif /* _in_asm_source_ *//* * Vector table */#define EIT_VECTBL 0x80000000 /* Vector table top */#define EITVEC(n) ( EIT_VECTBL + (n) * 4 )#define XEITVEC(n) ( EITVEC(n) + 0x20000000 ) /* Non-cache area */#define EIT_DEFAULT 0 /* Default handler */#define EIT_NMI 1 /* NMI/soft reset */#define EIT_TLBMISS 2 /* TLB non matching */#define EIT_XTLBMISS 3 /* XTLB non matching */#define EIT_CACHEERR 4 /* Cache error */#define EIT_EXC(n) ( 5 + (n) ) /* Exception (ExcCode) 0 - 31 */#define EIT_IP(n) ( 63 - (n) ) /* Interrupt (IP) 0 - 7 */#define EIT_IRQ(n) ( 95 - (n) ) /* Interrupt controller 0 - 31 */#define EIT_GPIO(n) ( 127 - (n) ) /* GPIO interrupt 0 - 31 */#define EIT_FPGA(n) ( 159 - (n) ) /* FPGA interrupt 0 - 31 */#ifdef __cplusplus}#endif#endif /* __SYS_SYSINFO_DEPEND_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -