Skip to content

Commit 9bc92eb

Browse files
rbatraAustinIBMop-jenkins
authored andcommitted
PM: Fix default aux task
Key_Cronus_Test=PM_REGRESS Change-Id: Icdfe0f0f30402257637ef4cf851653ec151675bf Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68199 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Prem Shanker Jha <premjha2@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
1 parent bb0509e commit 9bc92eb

File tree

3 files changed

+17
-26
lines changed

3 files changed

+17
-26
lines changed

import/chips/p9/common/pmlib/occlib/occhw_shared_data.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ typedef struct gpe3_occ_sram_region_data
7575
uint32_t gpe3_sram_region_start; //GPE3 sram region starting address
7676
uint32_t gpe3_image_header_addr;
7777
uint32_t gpe3_debug_header_addr;
78-
uint8_t reserved[52];
78+
uint8_t reserved[44];
79+
uint32_t aux_region_start;
80+
uint32_t aux_region_length;
7981
} gpe3_occ_sram_region_data_t;
8082

8183
//OCC Complex Shared Data.

import/chips/p9/procedures/ppe_closed/pgpe/boot/p9_pgpe_aux_task.c

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER HCODE Project */
77
/* */
8-
/* COPYRIGHT 2017 */
8+
/* COPYRIGHT 2017,2018 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -30,33 +30,15 @@
3030
#include "pk.h"
3131
#include "ppe42.h"
3232

33-
#define BUFFER_BASE (0xFFF2B800 - 0x100)
34-
#define IDX (BUFFER_BASE - 4)
35-
#define SRAM_MAX 0xFFF2B7FC
36-
#define QUAD_PS_CURR_ADDR_0 0xFFF2025C
37-
#define QUAD_PS_CURR_ADDR_1 (QUAD_PS_CURR_ADDR_0 + 0x4)
3833

39-
uint32_t buffer_address;
34+
#define BUFFER_SIZE 32
35+
uint8_t buffer[BUFFER_SIZE];
4036
void aux_task()
4137
{
42-
if(buffer_address < BUFFER_BASE)//handles initialization
38+
uint32_t i;
39+
40+
for (i = 0; i < BUFFER_SIZE; i++)
4341
{
44-
buffer_address = BUFFER_BASE;
42+
buffer[i] = i;
4543
}
46-
47-
/* get pstates */
48-
uint32_t data;
49-
uint32_t temp;
50-
51-
temp = in32(QUAD_PS_CURR_ADDR_0);
52-
data = (temp << 16);
53-
temp = in32(QUAD_PS_CURR_ADDR_1);
54-
data |= (temp >> 16);
55-
56-
/* write pstates */
57-
out32(buffer_address, data);
58-
buffer_address = (buffer_address == SRAM_MAX) ? BUFFER_BASE : (buffer_address + 0x4);
59-
out32(buffer_address, ((temp & 0xFFFF) << 16));
60-
buffer_address = (buffer_address == SRAM_MAX) ? BUFFER_BASE : (buffer_address + 0x4);
61-
out32(IDX, buffer_address);
6244
}

import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "p9_pgpe_header.h"
3030
#include <p9_hcd_memmap_occ_sram.H>
3131
#include "p9_pgpe_optrace.h"
32+
#include "occhw_shared_data.h"
3233

3334
#define AUX_TASK 14
3435
#define GPE2TSEL 0xC0020000
@@ -97,6 +98,12 @@ void p9_pgpe_fit_init()
9798

9899
if(aux_period) //multiply by attribute if nonzero
99100
{
101+
//If auxilary task is enabled, then fills up the fields in OCC Complex Shared SRAM
102+
//NOte: PGPE ends up writing gpe3 area, but this is because in future aux task will
103+
//move to GPE3. So, to have continuity for aux task interface, we are writing
104+
//it through GPE2 for now.
105+
OSD_PTR->occ_comp_shr_data.gpe3_data.aux_region_start = OCC_SRAM_AUX_TASK_ADDR;
106+
OSD_PTR->occ_comp_shr_data.gpe3_data.aux_region_length = PGPE_AUX_TASK_SIZE;
100107
G_aux_task_count_threshold *= aux_period;
101108
}
102109

0 commit comments

Comments
 (0)