diff options
author | William Bryan <wilbryan@us.ibm.com> | 2017-02-10 10:33:57 -0600 |
---|---|---|
committer | William A. Bryan <wilbryan@us.ibm.com> | 2017-02-14 12:44:41 -0500 |
commit | cae65cfeafd39ade2e6556974edf43313f92cdff (patch) | |
tree | faa7522af4f3d84dd5bdd9efda654cdfdd2b58f9 /src/occ_405 | |
parent | 3efbd9ee6aa3547e856c72f37f7e734000c89b56 (diff) | |
download | talos-occ-cae65cfeafd39ade2e6556974edf43313f92cdff.tar.gz talos-occ-cae65cfeafd39ade2e6556974edf43313f92cdff.zip |
GPE Nest Frequency & Amester Name Changes
Change-Id: I46ee2502dcfd532b6ff30a32b0a645aecc285f21
RTC:168527
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36293
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405')
-rwxr-xr-x | src/occ_405/linkocc.cmd | 25 | ||||
-rwxr-xr-x | src/occ_405/main.c | 7 | ||||
-rwxr-xr-x | src/occ_405/sensor/sensor_info.c | 22 |
3 files changed, 41 insertions, 13 deletions
diff --git a/src/occ_405/linkocc.cmd b/src/occ_405/linkocc.cmd index 3c4556c..9c68116 100755 --- a/src/occ_405/linkocc.cmd +++ b/src/occ_405/linkocc.cmd @@ -543,7 +543,30 @@ SECTIONS _SSX_FREE_END = _PING_PONG_BUFFER_BASE - 1; - //////////////////////////////// + //////////////////////////////// + // Shared GPE data + // + // Section for sharing data with GPEs before IPC commands can be used + // NOTE: If this location is changed, the #define for the address + // needs to be changed in gpe0_main.c and gpe1_main.c. + //////////////////////////////// + __CUR_COUNTER__ = .; + _GPE_SHARED_DATA_BASE = 0xfffb3c00; + _GPE_SHARED_DATA_SIZE = 0x100; + . = _GPE_SHARED_DATA_BASE; +#if !PPC405_MMU_SUPPORT + . = . - writethrough_offset; + _LMA = . + writethrough_offset; + .gpe_shared . : AT(_LMA) {*(gpe_shared) . = ALIGN(_GPE_SHARED_DATA_SIZE);} + . = . + writethrough_offset; +#else + .gpe_shared . : {*(gpe_shared) . = ALIGN(_GPE_SHARED_DATA_SIZE);} > sram +#endif + . = __CUR_COUNTER__; + + + + //////////////////////////////// // Ping/Pong Buffer Section // // Contains two 256-byte buffers used to tell the PGPE which vfrt to use diff --git a/src/occ_405/main.c b/src/occ_405/main.c index 873e65d..ba36b59 100755 --- a/src/occ_405/main.c +++ b/src/occ_405/main.c @@ -104,7 +104,8 @@ extern uint16_t G_proc_fmax_mhz; // max(turbo,uturbo) frequencies // Set main thread timer for one second #define MAIN_THRD_TIMER_SLICE ((SsxInterval) SSX_SECONDS(1)) - +// Define location for data shared with GPEs +gpe_shared_data_t G_shared_gpe_data __attribute__ ((section (".gpe_shared"))); // SIMICS printf/printk SimicsStdio G_simics_stdout; @@ -1796,6 +1797,10 @@ int main(int argc, char **argv) 0, l_tb_freq_hz); + // Store the nest / 4 frequency in shared SRAM so the GPEs + // can be initialized with the correct timebase as well. + G_shared_gpe_data.nest_freq_div = l_tb_freq_hz; + CHECKPOINT(SSX_INITIALIZED); // TRAC_XXX needs ssx services, traces can only be done after ssx_initialize TRAC_init_buffers(); diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c index a457c20..a664f69 100755 --- a/src/occ_405/sensor/sensor_info.c +++ b/src/occ_405/sensor/sensor_info.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2016 */ +/* Contributors Listed Below - COPYRIGHT 2011,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -86,25 +86,25 @@ // (one for each core...) The base name of the sensor enum must be passed // and this macro will take care of the paste & stringify operations. #define SENS_CORE_ENTRY_SET(sensor_name, units, type, location, number, frequency, scaleFactor) \ - [SENSOR_W_NUM(sensor_name,0)] = {.name = SENSOR_STRING(sensor_name ## 0), \ + [SENSOR_W_NUM(sensor_name,0)] = {.name = SENSOR_STRING(sensor_name ## 00), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,1)] = {.name = SENSOR_STRING(sensor_name ## 1), \ + [SENSOR_W_NUM(sensor_name,1)] = {.name = SENSOR_STRING(sensor_name ## 01), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,2)] = {.name = SENSOR_STRING(sensor_name ## 2), \ + [SENSOR_W_NUM(sensor_name,2)] = {.name = SENSOR_STRING(sensor_name ## 02), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,3)] = {.name = SENSOR_STRING(sensor_name ## 3), \ + [SENSOR_W_NUM(sensor_name,3)] = {.name = SENSOR_STRING(sensor_name ## 03), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,4)] = {.name = SENSOR_STRING(sensor_name ## 4), \ + [SENSOR_W_NUM(sensor_name,4)] = {.name = SENSOR_STRING(sensor_name ## 04), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,5)] = {.name = SENSOR_STRING(sensor_name ## 5), \ + [SENSOR_W_NUM(sensor_name,5)] = {.name = SENSOR_STRING(sensor_name ## 05), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,6)] = {.name = SENSOR_STRING(sensor_name ## 6), \ + [SENSOR_W_NUM(sensor_name,6)] = {.name = SENSOR_STRING(sensor_name ## 06), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,7)] = {.name = SENSOR_STRING(sensor_name ## 7), \ + [SENSOR_W_NUM(sensor_name,7)] = {.name = SENSOR_STRING(sensor_name ## 07), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,8)] = {.name = SENSOR_STRING(sensor_name ## 8), \ + [SENSOR_W_NUM(sensor_name,8)] = {.name = SENSOR_STRING(sensor_name ## 08), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ - [SENSOR_W_NUM(sensor_name,9)] = {.name = SENSOR_STRING(sensor_name ## 9), \ + [SENSOR_W_NUM(sensor_name,9)] = {.name = SENSOR_STRING(sensor_name ## 09), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ [SENSOR_W_NUM(sensor_name,10)] = {.name = SENSOR_STRING(sensor_name ## 10), \ .sensor = { units, type, location, number, frequency, scaleFactor },}, \ |