gonzui


Format: Advanced Search

tkernel_2/kernel/sysdepend/cpu/em1d/offset.hbare sourcepermlink (0.01 seconds)

Search this content:

    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:  *      offset.h (EM1-D512)
   17:  *      TCB Offset Definition
   18:  */
   19: 
   20: #ifndef _OFFSET_
   21: #define _OFFSET_
   22: 
   23: /* Adjust offset of TCB member variables in offset.h for cpu_support.S */
   24: #include "config.h"
   25: 
   26: /*      TCB.wrdvno   */
   27: #if defined(NUM_PORID)
   28: #define TCBSZ_POR       (4)   /* = sizeof(RNO) */
   29: #else
   30: #define TCBSZ_POR       (0)
   31: #endif
   32: 
   33: /*      TCB.mtxlist  */
   34: #if defined(NUM_MTXID)
   35: #define TCBSZ_MTX       (4)   /* = sizeof(MTXCB*) */
   36: #else
   37: #define TCBSZ_MTX       (0)
   38: #endif
   39: 
   40: /*      TCB.winfo.xxx        */
   41: #if defined(NUM_PORID)
   42: #define TCBSZ_WINFO     (16)
   43: #else
   44: #if defined(NUM_FLGID)
   45: #define TCBSZ_WINFO     (12)
   46: #else
   47: #if defined(NUM_MBFID)||defined(NUM_MPLID)
   48: #define TCBSZ_WINFO     (8)
   49: #else
   50: #if defined(NUM_SEMID)||defined(NUM_MBXID)||defined(NUM_MPFID)
   51: #define TCBSZ_WINFO     (4)
   52: #else
   53: #define TCBSZ_WINFO     (0)
   54: #endif
   55: #endif
   56: #endif
   57: #endif
   58: 
   59: #define _ALIGN_CPU(x)   (((x)+3)&0xFFFFFFFC)      /* EM1-D512 : 32 bit CPU */
   60: 
   61: 
   62: /*----------------------------------------------------------------------*/
   63: /*      machine dependent data                                               */
   64: /*----------------------------------------------------------------------*/
   65: #define TCB_winfo       (68)          /* tskque - wercd               */
   66: #define TCB_wtmeb       _ALIGN_CPU(TCB_winfo+TCBSZ_WINFO)
   67: #define TCBsz_wtmeb2istack      (28+TCBSZ_MTX+TCBSZ_POR+76)
   68:                                         /* wtmeb - istack          */
   69: #define TCBSZ_GP        (0)            /* No global pointer support      */
   70: 
   71: /*----------------------------------------------------------------------*/
   72: /*      offset data in TCB                                           */
   73: /*----------------------------------------------------------------------*/
   74: #define TCB_isstack     (TCB_wtmeb+TCBsz_wtmeb2istack)
   75: #define TCB_tskctxb     _ALIGN_CPU(TCB_isstack+4+TCBSZ_GP)
   76: 
   77: #define TCB_tskid       8
   78: #define TCB_tskatr      16
   79: #define TCB_state       43
   80: #define TCB_reqdct      36
   81: #define CTXB_lsid       8
   82: #define TA_FPU          0
   83: #define CTXB_ssp        0
   84: #define CTXB_uatb       4
   85: #define CTXB_svc_ssp    12
   86: 
   87: #endif /* _OFFSET_ */