Changeset 629 for soft/giet_vm/giet_kernel/ctx_handler.h
- Timestamp:
- Jul 18, 2015, 3:00:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_kernel/ctx_handler.h
r556 r629 14 14 // is launched by the scheduler when there is no other runable task. 15 15 ///////////////////////////////////////////////////////////////////////////////// 16 // A task context is an array of 64 words =256 bytes.16 // A task context is an array of 64 uint32 words => 256 bytes. 17 17 // It contains copies of processor registers (when the task is preempted) 18 // and some general informations associated to a task, such as the peripherals 19 // allocated to the task (private peripheral channel) 18 // and some general informations associated to a task, such as the private 19 // peripheral channels allocated to the task, the vspace index, the various 20 // task index (local / global / application), and the runnable status. 20 21 ///////////////////////////////////////////////////////////////////////////////// 21 22 // ctx[0] <- *** |ctx[8] <- $8 |ctx[16]<- $16 |ctx[24]<- $24 … … 30 31 // ctx[32]<- EPC |ctx[40]<- TTY |ctx[48]<- TRDID |ctx[56]<- *** 31 32 // ctx[33]<- CR |ctx[41]<- CMA_FB |ctx[49]<- GTID |ctx[57]<- *** 32 // ctx[34]<- SR |ctx[42]<- CMA_RX |ctx[50]<- RUN|ctx[58]<- ***33 // ctx[34]<- SR |ctx[42]<- CMA_RX |ctx[50]<- NORUN |ctx[58]<- *** 33 34 // ctx[35]<- BVAR |ctx[43]<- CMA_TX |ctx[51]<- COPROC |ctx[59]<- *** 34 35 // ctx[36]<- PTAB |ctx[44]<- NIC_RX |ctx[52]<- *** |ctx[60]<- *** … … 47 48 ///////////////////////////////////////////////////////////////////////////////// 48 49 49 #define CTX_SP_ID 29 // Stack Pointer50 #define CTX_RA_ID 31 // Return Address50 #define CTX_SP_ID 29 // Stack Pointer 51 #define CTX_RA_ID 31 // Return Address 51 52 52 #define CTX_EPC_ID 32 // Exception Program Counter (CP0)53 #define CTX_CR_ID 33 // Cause Register (CP0)54 #define CTX_SR_ID 34 // Status Register (CP0)55 #define CTX_BVAR_ID 35 // Bad Virtual Address Register (CP0)56 #define CTX_PTAB_ID 36 // Page Table Virtual address57 #define CTX_LTID_ID 37 // Local Task Index (in scheduler)58 #define CTX_VSID_ID 38 // Vspace Index59 #define CTX_PTPR_ID 39 // Page Table Pointer Register (PADDR>>13)53 #define CTX_EPC_ID 32 // Exception Program Counter (CP0) 54 #define CTX_CR_ID 33 // Cause Register (CP0) 55 #define CTX_SR_ID 34 // Status Register (CP0) 56 #define CTX_BVAR_ID 35 // Bad Virtual Address Register (CP0) 57 #define CTX_PTAB_ID 36 // Page Table Virtual address 58 #define CTX_LTID_ID 37 // Local Task Index (in scheduler) 59 #define CTX_VSID_ID 38 // Vspace Index 60 #define CTX_PTPR_ID 39 // Page Table Pointer Register (PADDR>>13) 60 61 61 #define CTX_TTY_ID 40 // private TTY channel index62 #define CTX_CMA_FB_ID 41 // private CMA channel index for FBF write63 #define CTX_CMA_RX_ID 42 // private CMA channel index for NIC_TX64 #define CTX_CMA_TX_ID 43 // private CMA channel index for NIC_RX65 #define CTX_NIC_RX_ID 44 // private NIC channel index RX transfer66 #define CTX_NIC_TX_ID 45 // private NIC channel index TX transfer67 #define CTX_TIM_ID 46 // ptivate TIM channel index68 #define CTX_HBA_ID 47 // private HBA channel index62 #define CTX_TTY_ID 40 // private TTY channel index 63 #define CTX_CMA_FB_ID 41 // private CMA channel index for FBF write 64 #define CTX_CMA_RX_ID 42 // private CMA channel index for NIC_TX 65 #define CTX_CMA_TX_ID 43 // private CMA channel index for NIC_RX 66 #define CTX_NIC_RX_ID 44 // private NIC channel index RX transfer 67 #define CTX_NIC_TX_ID 45 // private NIC channel index TX transfer 68 #define CTX_TIM_ID 46 // ptivate TIM channel index 69 #define CTX_HBA_ID 47 // private HBA channel index 69 70 70 #define CTX_TRDID_ID 48 // Thread Task Index in vspace71 #define CTX_GTID_ID 49 // Global Task Index in all system72 #define CTX_ RUN_ID 50 // Boolean: task runable73 #define CTX_COPROC_ID 51 // cluster_xy : coprocessor coordinates71 #define CTX_TRDID_ID 48 // Thread Task Index in vspace 72 #define CTX_GTID_ID 49 // Global Task Index in all system 73 #define CTX_NORUN_ID 50 // bit-vector : task runable if all zero 74 #define CTX_COPROC_ID 51 // cluster_xy : coprocessor coordinates 74 75 75 76 ///////////////////////////////////////////////////////////////////////////////// 77 // Definition of the NORUN bit-vector masks 78 ///////////////////////////////////////////////////////////////////////////////// 79 80 #define NORUN_MASK_TASK 0x00000001 // Task not active 81 #define NORUN_MASK_IOC 0x00000002 // Task blocked on IOC transfer 82 #define NORUN_MASK_COPROC 0x00000004 // Task blocked on COPROC transfer 76 83 77 84 /////////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.