tkernel_2/include/sys/sysdepend/tef_em1d/sysinfo_depend.h | bare source | permlink (0.02 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * T-Kernel 2.0 Software Package 4: * 5: * Copyright 2011 by Ken Sakamura. 6: * This software is distributed under the latest version of T-License 2.x. 7: *---------------------------------------------------------------------- 8: * 9: * Released by T-Engine Forum(http://www.t-engine.org/) at 2011/05/17. 10: * Modified by TRON Forum(http://www.tron.org/) at 2015/06/01. 11: * 12: *---------------------------------------------------------------------- 13: */ 14: 15: /* 16: * @(#)sysinfo_depend.h (sys/EM1-D512) 17: * 18: * System common information 19: * 20: * 0x30004000 +-----------------------+ 21: * |Exception vector table | 22: * 0x30004400 +-----------------------+ 23: * |System common info. | 24: * 0x30004440 +-----------------------+ 25: */ 26: 27: #ifndef __SYS_SYSINFO_DEPEND_H__ 28: #define __SYS_SYSINFO_DEPEND_H__ 29: 30: #ifdef __cplusplus 31: extern "C" { 32: #endif 33: 34: #ifndef _in_asm_source_ 35: 36: /* 37: * Boot mode/Operation mode 38: */ 39: typedef union { 40: struct { 41: UW debug:1; /* When in debug mode 1 */ 42: UW fsrcv:1; /* When in disk repair mode 1 */ 43: UW rsv:12; /* Reserved (always 0) */ 44: UW basic:1; /* When in basic operation mode 1 */ 45: UW rsv2:17; /* Reserved (always 0) */ 46: } c; 47: UW w; 48: } BootMode; 49: 50: #define BM_DEBUG 0x00000001U /* Debug mode */ 51: #define BM_FSRCV 0x00000002U /* Disk repair mode */ 52: #define BM_BASIC 0x00004000U /* Basic operation mode */ 53: 54: /* 55: * System shared information 56: */ 57: typedef struct { 58: void *ramtop; /* RAM free space top */ 59: void *ramend; /* RAM free space end */ 60: UB *sysconf; /* SYSCONF top */ 61: UB *devconf; /* DEVCONF top */ 62: W taskindp; /* Task independent context flag */ 63: UW taskmode; /* Task mode flag */ 64: BootMode bm; /* Boot mode */ 65: UW loop64us; /* Loop count per 64 micro sec */ 66: UB bootdev[8]; /* Boot device name */ 67: VW rsv[6]; /* Reserved (always 0) */ 68: } SysCommonInfo; 69: 70: /* 71: * System common area 72: */ 73: #define N_INTVEC 256 74: typedef struct { 75: FP intvec[N_INTVEC]; /* EIT vector */ 76: SysCommonInfo scinfo; /* System common information */ 77: } SysCommonArea; 78: 79: #define SCArea ( (SysCommonArea*)0x30004000 ) 80: #define SCInfo ( SCArea->scinfo ) 81: 82: #endif /* _in_asm_source_ */ 83: 84: /* Definitions used by assembler */ 85: #define TASKINDP (0x30004400 + 4*4) /* Task independent flag */ 86: #define TASKMODE (0x30004400 + 5*4) /* Task mode flag */ 87: 88: /* 89: * Vector table address 90: */ 91: #define EIT_VECTBL 0x30004000 /* Vector table top */ 92: 93: #define EITVEC(n) ( EIT_VECTBL + (n) * 4 ) 94: 95: #define EIT_DEFAULT 0 /* default handler */ 96: #define EIT_UNDEF 1 /* undefined instruction */ 97: #define EIT_IABORT 2 /* prefetch abort */ 98: #define EIT_DABORT 3 /* data abort */ 99: #define EIT_IDEBUG 29 /* debug abort instruction */ 100: #define EIT_DDEBUG 30 /* debug abort data */ 101: #define EIT_FIQ 31 /* fast interrupt FIQ */ 102: #define EIT_IRQ(n) ( 32 + (n) ) /* interrupt IRQ 0-95 */ 103: #define EIT_GPIO(n) ( 128 + (n) ) /* GPIO interrupt port 0-127 */ 104: 105: #ifdef __cplusplus 106: } 107: #endif 108: #endif /* __SYS_SYSINFO_DEPEND_H__ */