diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C index c0ffea65d..7bbb5720a 100644 --- a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C +++ b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C @@ -43,6 +43,23 @@ using namespace fapi2; #ID); \ } +#define MBOX_ATTR_SET(ID,TARGET,IMAGE) \ + { \ + fapi2::ID##_Type ID##_attrVal = 1; \ + FAPI_TRY(p9_xip_set_scalar(IMAGE,#ID,ID##_attrVal),\ + "MBOX_ATTR_SET: Error writing attr %s to seeprom image",\ + #ID); \ + } + +#define MBOX_ATTR_CLEAR(ID,TARGET,IMAGE) \ + { \ + fapi2::ID##_Type ID##_attrVal = 0; \ + FAPI_TRY(p9_xip_set_scalar(IMAGE,#ID,ID##_attrVal),\ + "MBOX_ATTR_CLEAR: Error writing attr %s to seeprom image",\ + #ID); \ + } + + fapi2::ReturnCode writeMboxRegs ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_proc_target, void* i_image) @@ -66,9 +83,9 @@ fapi2::ReturnCode writeMboxRegs ( MBOX_ATTR_WRITE (ATTR_RISK_LEVEL, FAPI_SYSTEM, i_image); MBOX_ATTR_WRITE (ATTR_DISABLE_HBBL_VECTORS, FAPI_SYSTEM, i_image); MBOX_ATTR_WRITE (ATTR_MC_SYNC_MODE, i_proc_target, i_image); - MBOX_ATTR_WRITE (ATTR_PROC_SBE_MASTER_CHIP, i_proc_target, i_image); - MBOX_ATTR_WRITE (ATTR_PROC_FABRIC_GROUP_ID, i_proc_target, i_image); - MBOX_ATTR_WRITE (ATTR_PROC_FABRIC_CHIP_ID, i_proc_target, i_image); + MBOX_ATTR_SET (ATTR_PROC_SBE_MASTER_CHIP, i_proc_target, i_image); + MBOX_ATTR_CLEAR (ATTR_PROC_FABRIC_GROUP_ID, i_proc_target, i_image); + MBOX_ATTR_CLEAR (ATTR_PROC_FABRIC_CHIP_ID, i_proc_target, i_image); fapi_try_exit: FAPI_DBG("writeMboxRegs Exiting..."); |