diff options
| author | Greg Still <stillgs@us.ibm.com> | 2016-09-18 21:55:32 -0500 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 16:45:21 -0500 |
| commit | d669d91ff9f0e29dfc7cfab85aca3638c0748d5d (patch) | |
| tree | 5a2dcedf2c6dfdbbab6f7f8313fabc78693e42bc | |
| parent | 202e04951a3dd622b6ecca26e86bfe3fc000b46f (diff) | |
| download | talos-hcode-d669d91ff9f0e29dfc7cfab85aca3638c0748d5d.tar.gz talos-hcode-d669d91ff9f0e29dfc7cfab85aca3638c0748d5d.zip | |
Refined OCC<>PGPE APIs
- IPC definitions
- Shared memory for Requested Active Quads
Change-Id: I2ea6ef5b2d841dba993cb68a46b07e021c958e43
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31329
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com>
Reviewed-by: Michael S. Floyd <mfloyd@us.ibm.com>
Dev-Ready: Michael S. Floyd <mfloyd@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
| -rw-r--r-- | import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h | 59 | ||||
| -rw-r--r-- | import/chips/p9/procedures/hwp/lib/p9_pstates_common.h | 21 |
2 files changed, 61 insertions, 19 deletions
diff --git a/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h b/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h index 33a1ab3d..5c300219 100644 --- a/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h +++ b/import/chips/p9/common/pmlib/include/pstate_pgpe_occ_api.h @@ -41,6 +41,10 @@ extern "C" { #endif +// Maximum Number of Quads supported +#define MAX_QUADS 6 + + //--------------- // IPC from 405 //--------------- @@ -50,21 +54,26 @@ enum MESSAGE_ID_IPI2HI MSGID_405_INVALID = 0, MSGID_405_START_SUSPEND = 1, MSGID_405_CLIPS = 2, - MSGID_405_WOF_INDEX = 3 + MSGID_405_WOF_CONTROL = 3, + MSGID_405_WOF_VFRT = 4 }; // // Return Codes // -// Will be filled in with the PK_PANIC code +#define PGPE_RC_SUCCESS 0x01 +#define PGPE_WOF_RC_NOT_ENABLED 0x10 +// Active quad mismatch with requested active quads. PGPE did not switch +// to using the new VFRT. The original VFRT is still being used. +#define PGPE_WOF_RC_VFRT_QUAD_MISMATCH 0x20 // // PMCR Owner // enum PMCR_OWNER { - PMCR_OWNER_OCC = 0, - PMCR_OWNER_HOST = 1 + PMCR_OWNER_HOST = 0, + PMCR_OWNER_OCC = 1 }; typedef struct ipcmsg_base @@ -73,40 +82,51 @@ typedef struct ipcmsg_base uint8_t rc; } ipcmsg_base_t; + +// +// Start Suspend Actions +// +#define PGPE_ACTION_PSTATE_START 0 +#define PGPE_ACTION_PSTATE_SUSPEND 1 + typedef struct ipcmsg_start_suspend { ipcmsg_base_t msg_cb; uint8_t action; PMCR_OWNER pmcr_owner; - } ipcmsg_start_suspend_t; -typedef struct ipcmsg_clips +typedef struct ipcmsg_clip_update { ipcmsg_base_t msg_cb; - uint8_t ps_clip_min[MAX_QUADS]; - uint8_t ps_clip_max[MAX_QUADS]; + uint8_t ps_val_clip_min[MAX_QUADS]; + uint8_t ps_val_clip_max[MAX_QUADS]; uint8_t pad[2]; -} ipcmsg_clips_t; +} ipcmsg_clip_update_t; +// +// WOF Control Actions +// +#define PGPE_ACTION_WOF_ON 1 +#define PGPE_ACTION_WOF_OFF 2 -typedef struct ipcmsg_wof +typedef struct ipcmsg_wof_control { ipcmsg_base_t msg_cb; - uint8_t enable; // WOF enable - uint8_t ceff_vdd_index; // Effective Capacitance VDD - uint8_t ceff_vdn_index; // Effective Capacitance VDN - uint8_t fratio_index; // Frequency Ratio - uint8_t vratio_index; // Voltage Ratio + uint8_t action; uint8_t pad; -} ipcmsg_wof_t; +} ipcmsg_wof_control_t; -typedef struct ipcmsg_reset +typedef struct ipcmsg_wof_vfrt { ipcmsg_base_t msg_cb; -} ipcmsg_reset_t; + uint8_t active_quads; // OCC updated with the Active Quads that it + // is using for its Ceff calculations + uint8_t pad; + VFRT_Hcode_t* vfrt_ptr; // Voltage Frequency Ratio Table +} ipcmsg_wof_vfrt_t; // ----------------------------------------------------------------------------- @@ -256,7 +276,8 @@ typedef union quad_state1 { uint64_t quad4_pstate : 8; // Pstate of Quad 4; 0xFF indicates EQ is off uint64_t quad5_pstate : 8; // Pstate of Quad 5; 0xFF indicates EQ is off - uint64_t quad_pstate_rsvd : 16; + uint64_t requested_active_quad : 6; // Pstate of Quad 5; 0xFF indicates EQ is off + uint64_t quad_pstate_rsvd : 10; uint64_t ivrm_state : 2; // ivrm state: bit vector 0:quad4, 1:quad5 uint64_t ivrm_state_rsvd : 6; uint64_t core_poweron_state : 8; // bit vector: 0:core16, 1:core17, ..., 7:core23 diff --git a/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h b/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h index b13ad4e1..1e96ca85 100644 --- a/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h +++ b/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h @@ -234,6 +234,27 @@ typedef struct } SysPowerDistParms; + +// +// WOF Voltage, Frequency Ratio Tables +// + +// VDN + +// Data is provided in 12ths (eg 12 core pairs on a 24 core chip) +#define VFRT_VRATIO_SIZE 12 + +// 100%/10% steps + 1 (for 0) +#define VFRT_FRATIO_SIZE 11 + +typedef uint16_t VFRT_Circuit_t; // Holds a frequency in MHz +typedef Pstate VFRT_Hcode_t; + +extern VFRT_Circuit_t VFRTCircuitTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE]; + +extern VFRT_Hcode_t VFRTInputTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE]; + + #ifdef __cplusplus } // end extern C #endif |

