Skip to content

Commit

Permalink
Fix bar address swizzle in p9a_addr_ext.C
Browse files Browse the repository at this point in the history
There was a typo in the documentation for the
extension mask swizzle.

Change-Id: I2a625917328eaa6e080c8defbff17297735141a6
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79855
Reviewed-by: FEIHONG YAN <fyan@us.ibm.com>
Dev-Ready: FEIHONG YAN <fyan@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Reviewed-by: Jennifer A Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79880
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
  • Loading branch information
BenAtIBM authored and crgeddes committed Jul 10, 2019
1 parent 4cedc84 commit b0decd0
Showing 1 changed file with 23 additions and 45 deletions.
68 changes: 23 additions & 45 deletions src/import/chips/p9/procedures/hwp/nest/p9a_addr_ext.C
Expand Up @@ -69,7 +69,8 @@ fapi_try_exit:


/*
* As documented
* As documented (TYPO in BAR Bits)
* They should be naturally ordered.
* BAR Bits 6 8 9 7 10 11 12 13
* 0x00 15 16 17 18 21 20 19 14
* 0x04 15 16 17 18 21 20 14 19
Expand All @@ -92,29 +93,6 @@ fapi_try_exit:
* 0xF6 15 21 14 20 19 18 17 16
* 0xF7 15 14 21 20 19 18 17 16
*
* Ordered bar bits
* BAR Bits 5 6 7 8 9 10 11 12 13 14 ...
* 0x00 13 15 18 16 17 21 20 19 14 22 ...
* 0x04 13 15 18 16 17 21 20 14 19 22 ...
* 0x06 13 15 18 16 17 21 14 20 19 22 ...
* 0x07 13 15 18 16 17 14 21 20 19 22 ...
* 0x80 13 15 18 16 17 21 20 19 14 22 ...
* 0x84 13 15 18 16 17 21 20 14 19 22 ...
* 0x86 13 15 18 16 17 21 14 20 19 22 ...
* 0x87 13 15 18 16 17 14 21 20 19 22 ...
* 0xC0 13 15 21 17 18 20 19 14 16 22 ...
* 0xC4 13 15 21 17 18 20 14 19 16 22 ...
* 0xC6 13 15 21 17 18 14 20 19 16 22 ...
* 0xC7 13 15 14 17 18 21 20 19 16 22 ...
* 0xE0 13 15 20 18 21 19 14 17 16 22 ...
* 0xE4 13 15 20 18 21 14 19 17 16 22 ...
* 0xE6 13 15 14 18 21 20 19 17 16 22 ...
* 0xE7 13 15 21 18 14 20 19 17 16 22 ...
* 0xF0 13 15 19 21 20 14 18 17 16 22 ...
* 0xF4 13 15 14 21 20 19 18 17 16 22 ...
* 0xF6 13 15 20 21 14 19 18 17 16 22 ...
* 0xF7 13 15 20 14 21 19 18 17 16 22 ...
*
*
*/
fapi2::ReturnCode extendBarAddress(const uint64_t& i_ext_mask, const fapi2::buffer<uint64_t>& i_bar_addr,
Expand All @@ -127,27 +105,27 @@ fapi2::ReturnCode extendBarAddress(const uint64_t& i_ext_mask, const fapi2::buff
static const int NUM_EXT_MASKS = 20; // 20 different extension masks are supported
static const uint64_t EXT_MASK_REORDER[][9] = // Workbook table 7
{
// B 6 7 8 9 10 11 12 13
{ 0x00, 15, 18, 16, 17, 21, 20, 19, 14 },
{ 0x04, 15, 18, 16, 17, 21, 20, 14, 19 },
{ 0x06, 15, 18, 16, 17, 21, 14, 20, 19 },
{ 0x07, 15, 18, 16, 17, 14, 21, 20, 19 },
{ 0x80, 15, 18, 16, 17, 21, 20, 19, 14 },
{ 0x84, 15, 18, 16, 17, 21, 20, 14, 19 },
{ 0x86, 15, 18, 16, 17, 21, 14, 20, 19 },
{ 0x87, 15, 18, 16, 17, 14, 21, 20, 19 },
{ 0xC0, 15, 21, 17, 18, 20, 19, 14, 16 },
{ 0xC4, 15, 21, 17, 18, 20, 14, 19, 16 },
{ 0xC6, 15, 21, 17, 18, 14, 20, 19, 16 },
{ 0xC7, 15, 14, 17, 18, 21, 20, 19, 16 },
{ 0xE0, 15, 20, 18, 21, 19, 14, 17, 16 },
{ 0xE4, 15, 20, 18, 21, 14, 19, 17, 16 },
{ 0xE6, 15, 14, 18, 21, 20, 19, 17, 16 },
{ 0xE7, 15, 21, 18, 14, 20, 19, 17, 16 },
{ 0xF0, 15, 19, 21, 20, 14, 18, 17, 16 },
{ 0xF4, 15, 14, 21, 20, 19, 18, 17, 16 },
{ 0xF6, 15, 20, 21, 14, 19, 18, 17, 16 },
{ 0xF7, 15, 20, 14, 21, 19, 18, 17, 16 }
// B 6 7 8 9 10 11 12 13
{ 0x00, 15, 16, 17, 18, 21, 20, 19, 14 },
{ 0x04, 15, 16, 17, 18, 21, 20, 14, 19 },
{ 0x06, 15, 16, 17, 18, 21, 14, 20, 19 },
{ 0x07, 15, 16, 17, 18, 14, 21, 20, 19 },
{ 0x80, 15, 16, 17, 18, 21, 20, 19, 14 },
{ 0x84, 15, 16, 17, 18, 21, 20, 14, 19 },
{ 0x86, 15, 16, 17, 18, 21, 14, 20, 19 },
{ 0x87, 15, 16, 17, 18, 14, 21, 20, 19 },
{ 0xC0, 15, 17, 18, 21, 20, 19, 14, 16 },
{ 0xC4, 15, 17, 18, 21, 20, 14, 19, 16 },
{ 0xC6, 15, 17, 18, 21, 14, 20, 19, 16 },
{ 0xC7, 15, 17, 18, 14, 21, 20, 19, 16 },
{ 0xE0, 15, 18, 21, 20, 19, 14, 17, 16 },
{ 0xE4, 15, 18, 21, 20, 14, 19, 17, 16 },
{ 0xE6, 15, 18, 21, 14, 20, 19, 17, 16 },
{ 0xE7, 15, 18, 14, 21, 20, 19, 17, 16 },
{ 0xF0, 15, 21, 20, 19, 14, 18, 17, 16 },
{ 0xF4, 15, 21, 20, 14, 19, 18, 17, 16 },
{ 0xF6, 15, 21, 14, 20, 19, 18, 17, 16 },
{ 0xF7, 15, 14, 21, 20, 19, 18, 17, 16 }
};

uint64_t l_bar = i_bar_addr;
Expand Down

0 comments on commit b0decd0

Please sign in to comment.