diff options
Diffstat (limited to 'import/chips/p9/procedures')
-rw-r--r-- | import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c | 32 | ||||
-rw-r--r-- | import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c | 7 |
2 files changed, 14 insertions, 25 deletions
diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c b/import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c index 8a1fac76..298f9cd3 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c +++ b/import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HCODE Project */ /* */ -/* COPYRIGHT 2017 */ +/* COPYRIGHT 2017,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -30,33 +30,15 @@ #include "pk.h" #include "ppe42.h" -#define BUFFER_BASE (0xFFF2B800 - 0x100) -#define IDX (BUFFER_BASE - 4) -#define SRAM_MAX 0xFFF2B7FC -#define QUAD_PS_CURR_ADDR_0 0xFFF2025C -#define QUAD_PS_CURR_ADDR_1 (QUAD_PS_CURR_ADDR_0 + 0x4) -uint32_t buffer_address; +#define BUFFER_SIZE 32 +uint8_t buffer[BUFFER_SIZE]; void aux_task() { - if(buffer_address < BUFFER_BASE)//handles initialization + uint32_t i; + + for (i = 0; i < BUFFER_SIZE; i++) { - buffer_address = BUFFER_BASE; + buffer[i] = i; } - - /* get pstates */ - uint32_t data; - uint32_t temp; - - temp = in32(QUAD_PS_CURR_ADDR_0); - data = (temp << 16); - temp = in32(QUAD_PS_CURR_ADDR_1); - data |= (temp >> 16); - - /* write pstates */ - out32(buffer_address, data); - buffer_address = (buffer_address == SRAM_MAX) ? BUFFER_BASE : (buffer_address + 0x4); - out32(buffer_address, ((temp & 0xFFFF) << 16)); - buffer_address = (buffer_address == SRAM_MAX) ? BUFFER_BASE : (buffer_address + 0x4); - out32(IDX, buffer_address); } diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c index 65fa03ee..708b1c4a 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c @@ -29,6 +29,7 @@ #include "p9_pgpe_header.h" #include <p9_hcd_memmap_occ_sram.H> #include "p9_pgpe_optrace.h" +#include "occhw_shared_data.h" #define AUX_TASK 14 #define GPE2TSEL 0xC0020000 @@ -97,6 +98,12 @@ void p9_pgpe_fit_init() if(aux_period) //multiply by attribute if nonzero { + //If auxilary task is enabled, then fills up the fields in OCC Complex Shared SRAM + //NOte: PGPE ends up writing gpe3 area, but this is because in future aux task will + //move to GPE3. So, to have continuity for aux task interface, we are writing + //it through GPE2 for now. + OSD_PTR->occ_comp_shr_data.gpe3_data.aux_region_start = OCC_SRAM_AUX_TASK_ADDR; + OSD_PTR->occ_comp_shr_data.gpe3_data.aux_region_length = PGPE_AUX_TASK_SIZE; G_aux_task_count_threshold *= aux_period; } |