From 08188269016392f2d42835ef4b8548c0f312f941 Mon Sep 17 00:00:00 2001 From: Prem Shanker Jha Date: Fri, 10 Nov 2017 07:55:37 -0600 Subject: PM: Fixed generation of MTSPR instruction in STOP API. STOP API generates SPR restore instruction for a given SPR. Commit fixes the generation of mtspr instruction by API. Problem will show up only when API is changed to generate restore instruction using a GPR other than R0. CQ: SW407799 Change-Id: I2a841a9aae417b7bcd92a323197d9c6a1f3cb149 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49525 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA Reviewed-by: STEWART E. SMITH Dev-Ready: Gregory S. Still Reviewed-by: Gregory S. Still Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49529 Reviewed-by: Hostboot Team Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes Signed-off-by: Stewart Smith --- libpore/p9_stop_api.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpore') diff --git a/libpore/p9_stop_api.C b/libpore/p9_stop_api.C index 7242c423..5c0f2e5e 100644 --- a/libpore/p9_stop_api.C +++ b/libpore/p9_stop_api.C @@ -258,7 +258,7 @@ static uint32_t getMtsprInstruction( const uint16_t i_Rs, const uint16_t i_Spr ) uint32_t mtsprInstOpcode = 0; uint32_t temp = (( i_Spr & 0x03FF ) << 11); mtsprInstOpcode = (uint8_t)i_Rs << 21; - mtsprInstOpcode = ( temp & 0x0000F800 ) << 5; + mtsprInstOpcode |= ( temp & 0x0000F800 ) << 5; mtsprInstOpcode |= ( temp & 0x001F0000 ) >> 5; mtsprInstOpcode |= MTSPR_BASE_OPCODE; -- cgit v1.2.1