From 8692b24a1ec04118db45555886f497ae9fe7a374 Mon Sep 17 00:00:00 2001 From: Matt Derksen Date: Wed, 21 Feb 2018 16:42:57 -0600 Subject: Include WOF power mode explicitly inside tables New header for mode inclusion. Needed to distinguish which table to use. Change-Id: I037e95288ccb5a963bd24e53484c8731c52d9790 RTC:187340 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54535 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Tested-by: Hostboot CI Reviewed-by: Christian R. Geddes Reviewed-by: Corey V. Swenson Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54544 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Daniel M. Crowell --- .../p9/procedures/hwp/lib/p9_pstates_common.h | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h') diff --git a/src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h b/src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h index bc46c3445..0bd69a534 100644 --- a/src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h +++ b/src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -341,6 +341,13 @@ typedef struct __attribute__((packed)) VFRTHeaderLayout uint8_t rsvd_QAId; } VFRTHeaderLayout_t;// WOF Tables Header +typedef enum +{ + WOF_MODE_UNKNOWN = 0, + WOF_MODE_NOMINAL = 1, + WOF_MODE_TURBO = 2 +} WOF_MODE; + typedef struct __attribute__((packed, aligned(128))) WofTablesHeader { @@ -348,7 +355,19 @@ typedef struct __attribute__((packed, aligned(128))) WofTablesHeader /// Set to ASCII "WFTH___x" where x is the version of the VFRT structure uint32_t magic_number; - uint32_t reserved_version; // reserved:24b, version:8b + /// Reserved version + /// version 1 - mode is reserved (0) + /// version 2 - mode is SET to 1 or 2 + union + { + uint32_t reserved_version; + struct + { + unsigned reserved_bits: 20; + unsigned mode: 4; /// new to version 2 (1 = Nominal, 2 = Turbo) + uint8_t version; + } PACKED; + }; /// VFRT Block Size /// Length, in bytes, of a VFRT -- cgit v1.2.1