9os

Experimental kernel using plan9 ideas for embedded device
git clone git://git.simple-cc.org/9os
Log | Files | Refs | README | LICENSE

types.h (800B)


      1 /* TODO: Move these bits to other place */
      2 
      3 #define STACKADDR 0x7FFFFFFFFFFFFFF0
      4 #define KSTACKADDR 0xFFFFFFFFFFFFFFF0
      5 #define MAXTID 32767
      6 #define NR_TASKS 16
      7 #define NR_WINS  32
      8 
      9 #define NR_MPOINTS 4
     10 #define NR_CHANS  20
     11 
     12 enum regidx {
     13 	X0,
     14 	X1,
     15 	X2,
     16 	X3,
     17 	X4,
     18 	X5,
     19 	X6,
     20 	X7,
     21 	X8,
     22 	X9,
     23 	X10,
     24 	X11,
     25 	X12,
     26 	X13,
     27 	X14,
     28 	X15,
     29 	X16,
     30 	X17,
     31 	X18,
     32 	X19,
     33 	X20,
     34 	X21,
     35 	X22,
     36 	X23,
     37 	X24,
     38 	X25,
     39 	X26,
     40 	X27,
     41 	X28,
     42 	X29,
     43 
     44 	ELR,
     45 	X30,
     46 
     47 	SPSR,
     48 	ESR,
     49 
     50 	SP_EL1,
     51 	SP_EL0,
     52 
     53 	FAR,
     54 	XZR,
     55 
     56 	TTBR0,
     57 	TTBR1,
     58 
     59 	NR_REGS,
     60 };
     61 
     62 typedef int atomic_t;
     63 typedef unsigned long mutex_t;
     64 typedef unsigned long spinlock_t;
     65 typedef unsigned long long pte_t;
     66 typedef unsigned long long phyaddr_t;
     67 typedef struct context Context;
     68 
     69 struct context {
     70 	unsigned long long r[NR_REGS];
     71 };
     72 
     73 struct ptable {
     74 	pte_t high;
     75 	pte_t low;
     76 	int assid;
     77 };