diff options
author | Bill Schwartz <whs@us.ibm.com> | 2014-05-19 20:31:14 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-05-29 11:15:18 -0500 |
commit | 6681d384d729d448ef2b864a1f28d8982ad8f3cc (patch) | |
tree | 62906fc34533bd51be7e1d3b67063b4badaa08f0 /src/usr/hwpf/plat/fapiPlatAttributeService.C | |
parent | 6750245027d53c6ba0b671f522e26971dc142653 (diff) | |
download | talos-hostboot-6681d384d729d448ef2b864a1f28d8982ad8f3cc.tar.gz talos-hostboot-6681d384d729d448ef2b864a1f28d8982ad8f3cc.zip |
Get raw card info
Add fapi attribute to return Module Specific Reference Raw Card and Revision.
Revision can be returned directly from the generic fapiPlatGetSpdAttr.
Merge Ref Raw Card Extention and Ref Raw Card so caller has a single
enumeration.
Change-Id: I8cc71ac758d57453b5aaae0daed4df9ff26b6d31
Backport: release-fips811
RTC: 107809
CQ: SW262043
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11171
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/plat/fapiPlatAttributeService.C')
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatAttributeService.C | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C index 2a0802ad2..ac58d87b4 100644 --- a/src/usr/hwpf/plat/fapiPlatAttributeService.C +++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C @@ -1506,6 +1506,54 @@ fapi::ReturnCode fapiPlatGetPciOscswitchConfig return l_rc; } +//----------------------------------------------------------------------------- +fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard + (const fapi::Target * i_pDimmTarget, + uint8_t &o_val) +{ + fapi::ReturnCode l_rc; + uint8_t l_cardExt = 0; + uint8_t l_card = 0; + + do { + + // Get the Reference Raw Card Extention (0 or 1) + l_rc = fapiPlatGetSpdAttr(i_pDimmTarget, + SPD::MODSPEC_COM_REF_RAW_CARD_EXT, + &l_cardExt, sizeof(l_cardExt)); + if (l_rc) + { + break; //break with error + } + + // Get the Refernce Raw Card (bits 4-0) + // When Reference Raw Card Extension = 0 + // Reference raw cards A through AL + // When Reference Raw Card Extension = 1 + // Reference raw cards AM through CB + l_rc = fapiPlatGetSpdAttr(i_pDimmTarget, SPD::MODSPEC_COM_REF_RAW_CARD, + &l_card, sizeof(l_card)); + if (l_rc) + { + break; //break with error + } + + // Raw Card = 0x1f(ZZ) means no JEDEC reference raw card design used. + // Have one ZZ in the return merged enumeration. + if (0x1f == l_card) + { + l_cardExt = 1; //Just one ZZ in the enumeration (0x3f) + } + + // Merge into a single enumeration + o_val = (l_cardExt <<5) | l_card; + + } while (0); + + return l_rc; +} + + } // End platAttrSvc namespace } // End fapi namespace |