Skip to content

Commit

Permalink
OTPROM updates
Browse files Browse the repository at this point in the history
* 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 <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: SRINIVAS V. POLISETTY <srinivan@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: PARVATHI RACHAKONDA <prachako@in.ibm.com>
  • Loading branch information
anusrang authored and Parvathir committed Jun 8, 2017
1 parent f3be129 commit 03dc999
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/boot/otprom_init.S
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 03dc999

Please sign in to comment.