From b0decd01a99a34ac23a3effe49448bd46a77b7dd Mon Sep 17 00:00:00 2001 From: Ben Gass Date: Mon, 1 Jul 2019 15:04:28 -0400 Subject: Fix bar address swizzle in p9a_addr_ext.C 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 Dev-Ready: FEIHONG YAN Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Thi N. Tran Reviewed-by: Jennifer A Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79880 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- .../chips/p9/procedures/hwp/nest/p9a_addr_ext.C | 68 ++++++++-------------- 1 file changed, 23 insertions(+), 45 deletions(-) (limited to 'src/import/chips') diff --git a/src/import/chips/p9/procedures/hwp/nest/p9a_addr_ext.C b/src/import/chips/p9/procedures/hwp/nest/p9a_addr_ext.C index 4f6aeeb07..31f826501 100644 --- a/src/import/chips/p9/procedures/hwp/nest/p9a_addr_ext.C +++ b/src/import/chips/p9/procedures/hwp/nest/p9a_addr_ext.C @@ -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 @@ -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& i_bar_addr, @@ -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; -- cgit v1.2.1