summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Gupta <sgupta2m@in.ibm.com>2017-01-16 10:47:51 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2017-01-19 08:51:09 -0500
commitb975c978112d5fefef1f3e423886706ff205ff45 (patch)
tree26edbc39f17e2c2cd7838e7653f9da0da39038f3
parenta586efdb4560bfb3617f16548f8796128a3968cc (diff)
downloadtalos-sbe-b975c978112d5fefef1f3e423886706ff205ff45.tar.gz
talos-sbe-b975c978112d5fefef1f3e423886706ff205ff45.zip
Initialise empty section of l1 loader
We have reserved 512 bytes for L1 loader. If size of L1 loader is less than 512 bytes, we want to zero fill rest of areat. That is required to ensure that that there is no are of PIBMEM which is not initalize. Change-Id: I85a9490540472aaee6c671bb317fb53f147ffc32 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34937 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
-rw-r--r--src/boot/loader_l1.S27
-rw-r--r--src/build/utils/sbe_link.H2
2 files changed, 25 insertions, 4 deletions
diff --git a/src/boot/loader_l1.S b/src/boot/loader_l1.S
index 020a2912..eb35478f 100644
--- a/src/boot/loader_l1.S
+++ b/src/boot/loader_l1.S
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -56,8 +56,7 @@ __l1Loader:
_liw %r4, SBE_LOADER_BASE_ORIGIN # dest
_liw %r9, SBE_SEEPROM_BASE_ORIGIN
lwz r5, 4(r3) #size of image in bytes
- li r6, 3
- srw r5, r5, r6 # Number of double word transfers
+ srawi r5, r5, 3 # Number of double word transfers
mtctr r5 # set the counter for loop
lwz r8, 0(r3) # offset of l2loader section
adde r8, r8, r9 # add base address to offset to get absolute address
@@ -69,6 +68,8 @@ copy_loop:
addi r4, r4, 8
bdnz copy_loop
+ # initilaise empty section of L1 loader with 0
+ bl __initPibmemL1Area
############################################################
# SBE entry function is 4 byte number in image header
############################################################
@@ -80,4 +81,24 @@ copy_loop:
.epilogue __l1Loader
+# initialise the PIBMEM section for l1 loader with 0
+
+__initPibmemL1Area:
+ _liw %r3, SBE_LOADER_BASE_SECTION # Base Loader Section Location
+ _liw %r4, SBE_LOADER_BASE_ORIGIN # dest
+ lwz r5, 4(r3) #size of image in bytes
+ _liw %r6, SBE_LOADER_BASE_LENGTH #Max size of loader
+ add r4, r4, r5
+ subf r5, r5, r6
+ srawi r5, r5, 3 # Number of double word transfers
+ mtctr r5 # set the counter for loop
+ li r28, 0
+ li r29, 0
+copy_loop_init:
+ stvd d28, 0(r4)
+ addi r4, r4, 8
+ bdnz copy_loop_init
+
+ blr
+
#include "pibmem_repair.S"
diff --git a/src/build/utils/sbe_link.H b/src/build/utils/sbe_link.H
index 1c6510f0..6c8c95ff 100644
--- a/src/build/utils/sbe_link.H
+++ b/src/build/utils/sbe_link.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
OpenPOWER on IntegriCloud