diff options
| author | Yue Du <daviddu@us.ibm.com> | 2017-02-09 17:07:44 -0600 |
|---|---|---|
| committer | Joshua Hunsberger <jahunsbe@us.ibm.com> | 2017-10-23 17:12:25 -0500 |
| commit | 5236343c0ffb914e3434430d7ce3a2fff9a562cb (patch) | |
| tree | d26430f09689e2891dece4a2117437e402db71d0 /import/chips/p9/procedures/utils | |
| parent | 7d0ced5efbe69cba7092d5e2055979ec66a628c1 (diff) | |
| download | talos-hcode-5236343c0ffb914e3434430d7ce3a2fff9a562cb.tar.gz talos-hcode-5236343c0ffb914e3434430d7ce3a2fff9a562cb.zip | |
Hcode: Create centralized memory map headers
findings and todos:
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
redundant cpmr linker
not sure which one is in use
cme/link.cmd
cme/linkcpmr.cmd
cme/stop_cme/link_cpmr.cmd
sgpe/stop_gpe/link.cmd
sgpe/stop_gpe/linkqpmr.cmd
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
redundant asm of cpmr and qpmr headers:
not sure which one is in use
file names are inconsistant and confusing
cme/p9_cpmr_header.S
cme/stop_cme/p9_cme_cpmr.S
cme/stop_cme/p9_cme_header.S
sgpe/p9_sgpe_qpmr.S
sgpe/stop_gpe/p9_sgpe_qpmr.S
sgpe/stop_gpe/p9_sgpe_image_header.S
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
redundant edit programs
not sure which ones are still useful
contents are overlapping and out updated
(i.e. cme one still try to edit build date/ver)
cme/p9_cpmr_img_edit.C
cme/stop_cme/p9_cme_img_edit.c
cme/stop_cme/p9_cme_edit.mk
sgpe/p9_sgpe_img_edit.c
sgpe/stop_gpe/p9_sgpe_img_edit.c
sgpe/stop_gpe/p9_sgpe_edit.mk
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
previous local makefiles
not sure if still useful
optional to keep or delete
cme/Makefile
cme/img_defs.mk
sgpe/Makefile
sgpe/img_defs.mk
sgpe/stop_gpe/Makefile
sgpe/stop_gpe/img_defs.mk
sgpe/boot/Makefile
sgpe/boot/img_defs.mk
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Change-Id: I94fbd28fc3e3c125e43232ea556a4e70b293db6d
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36253
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: AMIT KUMAR <akumar3@us.ibm.com>
Reviewed-by: Gregory S. Still <stillgs@us.ibm.com>
Diffstat (limited to 'import/chips/p9/procedures/utils')
3 files changed, 23 insertions, 16 deletions
diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_api.C b/import/chips/p9/procedures/utils/stopreg/p9_stop_api.C index 0b52addc..2fe6d769 100755 --- a/import/chips/p9/procedures/utils/stopreg/p9_stop_api.C +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_api.C @@ -325,7 +325,8 @@ StopReturnCode_t lookUpSprInImage( uint32_t* i_pThreadSectLoc, void** io_pSprEntryLoc ) { StopReturnCode_t l_rc = STOP_SAVE_FAIL; - uint32_t temp = i_isCoreReg ? CORE_SPR_SECTN_SIZE : THREAD_SECTN_SIZE; + uint32_t temp = i_isCoreReg ? uint32_t(CORE_RESTORE_CORE_AREA_SIZE) : + uint32_t(CORE_RESTORE_THREAD_AREA_SIZE); uint32_t* i_threadSectEnd = i_pThreadSectLoc + temp; uint32_t bctr_inst = SWIZZLE_4_BYTE(BLR_INST); *io_pSprEntryLoc = NULL; @@ -967,7 +968,7 @@ StopReturnCode_t p9_stop_save_scom( void* const i_pImage, if( P9_STOP_SECTION_CORE_SCOM == i_section ) { - memset( pScomEntry, 0x00, SCOM_SIZE_PER_CORE ); + memset( pScomEntry, 0x00, CORE_SCOM_RESTORE_SIZE_PER_CORE ); } break; diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_data_struct.H b/import/chips/p9/procedures/utils/stopreg/p9_stop_data_struct.H index bb2534cb..4903d5ce 100755 --- a/import/chips/p9/procedures/utils/stopreg/p9_stop_data_struct.H +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_data_struct.H @@ -39,7 +39,7 @@ #include <endian.h> #endif -#include "p9_stop_section_defines.H" +#include "p9_hcd_memmap_base.H" #ifdef __FAPI_2_ #include <fapi2.H> @@ -52,6 +52,12 @@ namespace stopImageSection { #endif +enum +{ + MAX_SPR_RESTORE_INST = 0x08, + SIZE_PER_SPR_RESTORE_INST = ((4 * sizeof(uint8_t)) / sizeof(uint32_t)), +}; + typedef struct { uint32_t scomEntryHeader; @@ -64,8 +70,8 @@ typedef struct */ typedef struct { - uint8_t threadArea[THREAD_AREA_SIZE]; - uint8_t coreArea[CORE_SPR_SECTN_SIZE]; + uint8_t threadArea[CORE_RESTORE_THREAD_AREA_SIZE]; + uint8_t coreArea[CORE_RESTORE_CORE_AREA_SIZE]; } SprRestoreArea_t; /** @@ -76,10 +82,10 @@ typedef struct typedef struct { uint8_t occ_host_sgpe_area[ TWO_MB ]; // CPU restore area starts at an offset of 2MB from chip HOMER - uint8_t interrruptHandler[INTERRUPT_HANDLER_SIZE]; + uint8_t interrruptHandler[SELF_RESTORE_INT_SIZE]; uint8_t threadLauncher[THREAD_LAUNCHER_SIZE]; - SprRestoreArea_t coreThreadRestore[MAX_CORE_ID_SUPPORTED + 1][MAX_THREAD_ID_SUPPORTED + 1]; - uint8_t reserve[(ONE_KB * ONE_KB) - SPR_RESTORE_PER_CHIP]; + SprRestoreArea_t coreThreadRestore[MAX_CORES_PER_CHIP][MAX_THREADS_PER_CORE]; + uint8_t reserve[(ONE_KB * ONE_KB) - SELF_RESTORE_SIZE_TOTAL]; } HomerSection_t; /** @@ -121,15 +127,15 @@ enum #define CORE_ID_SCOM_START(io_image,\ i_chipletId) \ -((ScomEntry_t*)(((uint8_t*)(io_image))+ CORE_SCOM_SECTN_START +\ +((ScomEntry_t*)(((uint8_t*)(io_image)) + CORE_SCOM_RESTORE_HOMER_OFFSET +\ ((i_chipletId - CORE_CHIPLET_ID_MIN) * \ - SCOM_SIZE_PER_CORE))); + CORE_SCOM_RESTORE_SIZE_PER_CORE))); #define CACHE_SECTN_START(io_image,\ i_chipletId) \ -((StopCacheSection_t *)(((uint8_t *)(io_image))+CACHE_SCOM_SECTN_START \ - + ( i_chipletId - CACHE_CHIPLET_ID_MIN ) * \ - SCOM_SIZE_PER_CACHE_CHIPLET )); +((StopCacheSection_t *)(((uint8_t *)(io_image)) + QUAD_SCOM_RESTORE_HOMER_OFFSET +\ + ((i_chipletId - CACHE_CHIPLET_ID_MIN) * \ + QUAD_SCOM_RESTORE_SIZE_PER_QUAD))); #ifdef __cplusplus } // extern "C" diff --git a/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C b/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C index 728a6aba..818fadf5 100755 --- a/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C +++ b/import/chips/p9/procedures/utils/stopreg/p9_stop_util.C @@ -65,7 +65,7 @@ StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode ) HomerSection_t* pHomerDesc = ( HomerSection_t* ) i_pImage; HomerImgDesc_t* pHomer = (HomerImgDesc_t*)( pHomerDesc->interrruptHandler ); - if( SWIZZLE_8_BYTE(CPMR_MAGIC_WORD) != pHomer->cpmrMagicWord ) + if( SWIZZLE_8_BYTE(CPMR_MAGIC_NUMBER) != pHomer->cpmrMagicWord ) { MY_ERR("corrupt or invalid HOMER image location 0x%016llx", SWIZZLE_8_BYTE(pHomer->cpmrMagicWord) ); @@ -73,13 +73,13 @@ StopReturnCode_t isFusedMode( void* const i_pImage, bool* o_fusedMode ) break; } - if( (uint8_t) FUSED_MODE == pHomer->fusedModeStatus ) + if( (uint8_t) FUSED_CORE_MODE == pHomer->fusedModeStatus ) { *o_fusedMode = true; break; } - if( (uint8_t) NONFUSED_MODE == pHomer->fusedModeStatus ) + if( (uint8_t) NONFUSED_CORE_MODE == pHomer->fusedModeStatus ) { break; } |

