diff options
Diffstat (limited to 'src/core/arm/interpreter/armcpu.h')
| -rw-r--r-- | src/core/arm/interpreter/armcpu.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/src/core/arm/interpreter/armcpu.h b/src/core/arm/interpreter/armcpu.h new file mode 100644 index 000000000..d7e336b94 --- /dev/null +++ b/src/core/arm/interpreter/armcpu.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* | ||
| 2 | * arm | ||
| 3 | * armcpu.h | ||
| 4 | * | ||
| 5 | * Copyright (C) 2003, 2004 Sebastian Biallas (sb@biallas.net) | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | * | ||
| 16 | * You should have received a copy of the GNU General Public License | ||
| 17 | * along with this program; if not, write to the Free Software | ||
| 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __ARM_CPU_H__ | ||
| 22 | #define __ARM_CPU_H__ | ||
| 23 | //#include <skyeye_thread.h> | ||
| 24 | //#include <skyeye_obj.h> | ||
| 25 | //#include <skyeye_mach.h> | ||
| 26 | //#include <skyeye_exec.h> | ||
| 27 | |||
| 28 | #include <stddef.h> | ||
| 29 | #include <stdio.h> | ||
| 30 | |||
| 31 | #include "thread.h" | ||
| 32 | |||
| 33 | |||
| 34 | typedef struct ARM_CPU_State_s { | ||
| 35 | ARMul_State * core; | ||
| 36 | uint32_t core_num; | ||
| 37 | /* The core id that boot from | ||
| 38 | */ | ||
| 39 | uint32_t boot_core_id; | ||
| 40 | }ARM_CPU_State; | ||
| 41 | |||
| 42 | //static ARM_CPU_State* get_current_cpu(){ | ||
| 43 | // machine_config_t* mach = get_current_mach(); | ||
| 44 | // /* Casting a conf_obj_t to ARM_CPU_State type */ | ||
| 45 | // ARM_CPU_State* cpu = (ARM_CPU_State*)mach->cpu_data->obj; | ||
| 46 | // | ||
| 47 | // return cpu; | ||
| 48 | //} | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @brief Get the core instance boot from | ||
| 52 | * | ||
| 53 | * @return | ||
| 54 | */ | ||
| 55 | //static ARMul_State* get_boot_core(){ | ||
| 56 | // ARM_CPU_State* cpu = get_current_cpu(); | ||
| 57 | // return &cpu->core[cpu->boot_core_id]; | ||
| 58 | //} | ||
| 59 | /** | ||
| 60 | * @brief Get the instance of running core | ||
| 61 | * | ||
| 62 | * @return the core instance | ||
| 63 | */ | ||
| 64 | //static ARMul_State* get_current_core(){ | ||
| 65 | // /* Casting a conf_obj_t to ARM_CPU_State type */ | ||
| 66 | // int id = Common::CurrentThreadId(); | ||
| 67 | // /* If thread is not in running mode, we should give the boot core */ | ||
| 68 | // if(get_thread_state(id) != Running_state){ | ||
| 69 | // return get_boot_core(); | ||
| 70 | // } | ||
| 71 | // /* Judge if we are running in paralell or sequenial */ | ||
| 72 | // if(thread_exist(id)){ | ||
| 73 | // conf_object_t* conf_obj = get_current_exec_priv(id); | ||
| 74 | // return (ARMul_State*)get_cast_conf_obj(conf_obj, "arm_core_t"); | ||
| 75 | // } | ||
| 76 | // | ||
| 77 | // return NULL; | ||
| 78 | //} | ||
| 79 | |||
| 80 | #define CURRENT_CORE get_current_core() | ||
| 81 | |||
| 82 | #endif | ||
| 83 | |||