diff options
author | Chris Cain <cjcain@us.ibm.com> | 2017-03-09 17:26:00 -0600 |
---|---|---|
committer | Christopher J. Cain <cjcain@us.ibm.com> | 2017-04-13 14:07:15 -0400 |
commit | 031e2dacb210a1a16626e7c1b4235dea393119d4 (patch) | |
tree | 9d575ab8d4d6712efa1a417170a9483ed64e1200 /src/occ_405/wof | |
parent | 11026d79c8474c57cd0048b95467beef72428e8c (diff) | |
download | talos-occ-031e2dacb210a1a16626e7c1b4235dea393119d4.tar.gz talos-occ-031e2dacb210a1a16626e7c1b4235dea393119d4.zip |
PGPE init updates
Change-Id: I0140184371619983fb38b27199f241efe7f30f16
RTC: 169886
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37770
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_405/wof')
-rw-r--r-- | src/occ_405/wof/wof.c | 9 | ||||
-rw-r--r-- | src/occ_405/wof/wof.h | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c index 99fd0ba..7e3d800 100644 --- a/src/occ_405/wof/wof.c +++ b/src/occ_405/wof/wof.c @@ -42,9 +42,6 @@ extern amec_sys_t g_amec_sys; extern OCCPstateParmBlock G_oppb; extern GPE_BUFFER(ipcmsg_wof_vfrt_t G_wof_vfrt_parms); extern GpeRequest G_wof_vfrt_req; -extern uint32_t G_pgpe_shared_sram_address; -extern uint32_t G_pgpe_pstate_table_address; -extern uint32_t G_pgpe_pstate_table_sz; extern uint32_t G_nest_frequency_mhz; //****************************************************************************** // Globals @@ -243,7 +240,7 @@ uint32_t calc_vfrt_mainstore_addr( void ) g_wof->vdd_step_from_start) ) + g_wof->quad_step_from_start); // Skip the wof header at the beginning of wof tables - uint32_t wof_tables_base = g_wof->vfrt_tbls_main_mem_addr + WOF_HEADER_SIZE; + uint32_t wof_tables_base = G_pgpe_header.wof_tables_addr + WOF_HEADER_SIZE; return wof_tables_base + offset; } @@ -576,7 +573,7 @@ void read_shared_sram( void ) { // Skip over the first doubleword for now (magic number and pgpe beacon) uint32_t current_pgpe_sram_addr = - G_pgpe_shared_sram_address + sizeof(uint64_t); + G_pgpe_header.shared_sram_addr + sizeof(uint64_t); // Get the actual quad states G_quad_state_0.value = in64(current_pgpe_sram_addr); @@ -639,7 +636,7 @@ void calculate_core_voltage( void ) else { // Calculate the address of the pstate for the current quad. - uint32_t pstate_addr = G_pgpe_pstate_table_address + + uint32_t pstate_addr = G_pgpe_header.occ_pstate_table_sram_addr + (g_wof->quad_x_pstates[l_quad_idx] * sizeof(OCCPstateTable_entry_t)); // Get the Pstate diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h index 65368dd..ffe3e71 100644 --- a/src/occ_405/wof/wof.h +++ b/src/occ_405/wof/wof.h @@ -51,10 +51,14 @@ #define WOF_RC_MODE_NO_SUPPORT_MASK 0x0008 +#define WOF_MAGIC_NUMBER 0x57465448 // "WFTH" + // Structure to hold relevant data from the WOF header in Mainstore typedef struct __attribute__ ((packed)) { - uint64_t magic_number; + uint32_t magic_number; + uint8_t reserved[3]; + uint8_t version; uint8_t size_of_vfrt; uint8_t vfrt_data_size; uint8_t active_quads_start; |