From 03dc99911e2d405593cf532d5ffa01c50a8ed007 Mon Sep 17 00:00:00 2001 From: Anusha Reddy Rangareddygari Date: Wed, 26 Apr 2017 11:01:13 +0200 Subject: OTPROM updates * To check if SBE started booting from OTP OR NOT * Reg 2809 bits 30:31 set to '01' Change-Id: If89fa1a6748e2cd24ac7634535fefdff533922de Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/39701 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: SRINIVAS V. POLISETTY Reviewed-by: Sachin Gupta Reviewed-by: PARVATHI RACHAKONDA --- src/boot/otprom_init.S | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/boot/otprom_init.S b/src/boot/otprom_init.S index 61e82d34..430690a0 100644 --- a/src/boot/otprom_init.S +++ b/src/boot/otprom_init.S @@ -69,6 +69,18 @@ __sbe_config_reg: .quad 0x000A800030000000 .endm oos_start: +####################################################################################### +# UPDATE bits 30:31 of sbe message register : 0x50009 with 0b01 to indicate OTPROM Control +####################################################################################### + lis r5 , 0x5 # load r5 with 0x00050000 + lvd d2 , 0x9(r5) # loads data from 0x50009 to d2 + ori r2 , r2 , 0x0001 # set bit 31 to 1 + + lis r6 , 0xFFFF # clear bit 30 + ori r6 , r6 ,0xFFFD + and r2 , r2 , r6 + + stvd d2 , 0x9(r5) # store data back into 0x50009 oos_load_cfg_regs: @@ -99,10 +111,10 @@ oos_load_cfg_regs: oos_load_reg_addrs: lis r4 , 0xA - ori r4 , r4 , 0x0 + #ori r4 , r4 , 0x0 stvd d0 , 1(r4) #Write reset reg . A0001 lis r5 , 0x5 #Check the validity of scratch reg and then program the bit rate div - ori r5 , r5 , 0x0000 + #ori r5 , r5 , 0x0000 lvd d2 , 0x3F(r5) #loads scratch_8 and updates R5 to scratch_1 bb0wi r2 , 1 , oos_load_const_brd #checks if valid bit (bit1) is 1 if yes continue else branch lvd d2 , 0x39(r5) -- cgit v1.2.1