diff options
author | William Bryan <wilbryan@us.ibm.com> | 2015-11-18 15:40:30 -0600 |
---|---|---|
committer | Fadi Kassem <fmkassem@us.ibm.com> | 2015-11-20 09:51:37 -0600 |
commit | 76a5df9bf306d9dc446db4b395012770b4dd1c28 (patch) | |
tree | 7a5ce4d010bfc4b0f0fb8307d128ac8812609755 /src/occ_405/proc/proc_data.h | |
parent | e71f5784d8a90d926b898aa9e8cd0214cb081d23 (diff) | |
download | talos-occ-76a5df9bf306d9dc446db4b395012770b4dd1c28.tar.gz talos-occ-76a5df9bf306d9dc446db4b395012770b4dd1c28.zip |
Core data initialization and 24-core support
RTC: 140187
RTC: 140186
Change-Id: I574acdc3933b4bc181a584226ea432b9abe72592
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/22182
Reviewed-by: Wael Elessawy <welessa@us.ibm.com>
Tested-by: Fadi Kassem <fmkassem@us.ibm.com>
Reviewed-by: Fadi Kassem <fmkassem@us.ibm.com>
Diffstat (limited to 'src/occ_405/proc/proc_data.h')
-rwxr-xr-x | src/occ_405/proc/proc_data.h | 90 |
1 files changed, 31 insertions, 59 deletions
diff --git a/src/occ_405/proc/proc_data.h b/src/occ_405/proc/proc_data.h index 2c7193e..ad404a7 100755 --- a/src/occ_405/proc/proc_data.h +++ b/src/occ_405/proc/proc_data.h @@ -29,7 +29,7 @@ #include <occ_common.h> #include <ssx.h> #include "rtls.h" -//#include "gpe_data.h" +#include "core_data.h" //Returns 0 if the specified core is not present. Otherwise, returns none-zero. #define CORE_PRESENT(occ_core_id) \ @@ -38,35 +38,35 @@ //Takes an OCC core id and converts it to a core id that //can be used by the hardware. The caller needs to send in //a valid core id. Since type is uchar so there is no need to check for -//case less than 0. If core id is invalid then returns unconfigured core 16. +//case less than 0. If core id is invalid then returns unconfigured core 24. #define CORE_OCC2HW(occ_core_id) \ - ((occ_core_id <= 15) ? G_occ2hw_core_id[occ_core_id] : 16) + ((occ_core_id <= 23) ? G_occ2hw_core_id[occ_core_id] : 24) //Takes a hardware core id and returns a OCC core id. //The caller needs to send in a valid core id. Since type is uchar so //there is no need to check for case less than 0. If core id -//is invalid then returns unconfigured core 16. +//is invalid then returns unconfigured core 24. #define CORE_HW2OCC(hw_core_id) \ - ((hw_core_id <= 15) ? G_hw2occ_core_id[hw_core_id] : 16) + ((hw_core_id <= 23) ? G_hw2occ_core_id[hw_core_id] : 24) -#define ALL_CORES_MASK 0xffff0000 +#define ALL_CORES_MASK 0xffffff00 #define CORE0_PRESENT_MASK 0x80000000ul #define CORE0_PRESENT_MASK_GPE 0x8000000000000000ull -#define MAX_NUM_HW_CORES 16 -#define MAX_NUM_FW_CORES 12 +#define MAX_NUM_HW_CORES 24 +#define MAX_NUM_FW_CORES 24 -#define THREADS_PER_CORE 8 -#define MAX_MEM_PARTS 4 +#define CORE_MID_POINT (MAX_NUM_FW_CORES / 2) + +#define THREADS_PER_CORE 4 -#define NUM_FAST_CORE_DATA_BUFF 2 #define NUM_CORE_DATA_BUFF 7 #define NUM_CORE_DATA_DOUBLE_BUF 2 #define NUM_CORE_DATA_EMPTY_BUF 1 -#define LO_CORES_MASK 0x7e000000 -#define HI_CORES_MASK 0x007e0000 -#define HW_CORES_MASK 0xffff0000 +#define LO_CORES_MASK 0xfff00000 +#define HI_CORES_MASK 0x000fff00 +#define HW_CORES_MASK 0xffffff00 enum eOccProcCores { @@ -82,44 +82,35 @@ enum eOccProcCores CORE_9 = 9, CORE_10 = 10, CORE_11 = 11, + CORE_12 = 12, + CORE_13 = 13, + CORE_14 = 14, + CORE_15 = 15, + CORE_16 = 16, + CORE_17 = 17, + CORE_18 = 18, + CORE_19 = 19, + CORE_20 = 20, + CORE_21 = 21, + CORE_22 = 22, + CORE_23 = 23, }; -// TEMP -- CoreData no longer exists -//typedef CoreData gpe_bulk_core_data_t; - //Processor data collect structures used for task data pointers //gpe_req.request.parameter points to GpeGetCoreDataParms -// TEMP -- CoreData / PoreFlex objects no longer exist -/* struct bulk_core_data_task { uint8_t start_core; uint8_t current_core; uint8_t end_core; - gpe_bulk_core_data_t * core_data_ptr; - PoreFlex gpe_req; + CoreData * core_data_ptr; + GpeRequest gpe_req; } __attribute__ ((__packed__)); typedef struct bulk_core_data_task bulk_core_data_task_t; -*/ - -//Only PCBS_LOCAL_PSTATE_FREQ_TARGET_STATUS_REG register is being -//collected at this time. Other register will be added when needed. -struct fast_core_data { - uint64_t pcbs_lpstate_freq_target_sr; -} __attribute__ ((__packed__)); -typedef struct fast_core_data fast_core_data_t; - -//gpe fast core data structure -struct gpe_fast_core_data { - uint32_t tod; - uint32_t reserved; - fast_core_data_t core_data[MAX_NUM_HW_CORES]; -} __attribute__ ((__packed__)); -typedef struct gpe_fast_core_data gpe_fast_core_data_t; //Global low and high cores structures used for task data pointers // TEMP -- CoreData / PoreFlex objects no longer exist -//extern bulk_core_data_task_t G_low_cores; -//extern bulk_core_data_task_t G_high_cores; +extern bulk_core_data_task_t G_low_cores; +extern bulk_core_data_task_t G_high_cores; //Global G_present_cores is bitmask of all OCC core numbering extern uint32_t G_present_cores; @@ -151,20 +142,6 @@ extern uint32_t G_empath_error_core_mask; #define CORE_EMPATH_ERROR(occ_core_id) \ ((CORE0_PRESENT_MASK >> occ_core_id) & G_empath_error_core_mask) -//Takes an OCC core id and converts it to a core id that -//can be used by the hardware. The caller needs to send in -//a valid core id. Since type is uchar so there is no need to check for -//case less than 0. If core id is invalid then returns unconfigured core 16. -#define CORE_OCC2HW(occ_core_id) \ - ((occ_core_id <= 15) ? G_occ2hw_core_id[occ_core_id] : 16) - -//Takes a hardware core id and returns a OCC core id. -//The caller needs to send in a valid core id. Since type is uchar so -//there is no need to check for case less than 0. If core id -//is invalid then returns unconfigured core 16. -#define CORE_HW2OCC(hw_core_id) \ - ((hw_core_id <= 15) ? G_hw2occ_core_id[hw_core_id] : 16) - //Collect bulk core data for all cores in specified range void task_core_data( task_t * i_task ); @@ -176,11 +153,6 @@ void task_fast_core_data( task_t * i_task ); //Returns a pointer to the most up-to-date bulk core data for the core //associated with the specified OCC core id. -// TEMP -- CoreData / PoreFlex objects no longer exist -//gpe_bulk_core_data_t * proc_get_bulk_core_data_ptr( const uint8_t i_occ_core_id ); - -//Returns a pointer to the most up-to-date fast core data -// TEMP -- CoreData / PoreFlex objects no longer exist -//gpe_fast_core_data_t * proc_get_fast_core_data_ptr( void ); +CoreData * proc_get_bulk_core_data_ptr( const uint8_t i_occ_core_id ); #endif //_PROC_DATA_H |