From f2d94b5f809410300fe10dc9d0786790018463a0 Mon Sep 17 00:00:00 2001 From: Shakeeb Date: Sat, 27 Aug 2016 10:50:49 -0500 Subject: SBE code restructure: sbe -> src rename Change-Id: I6e4378d0e71a00ed2b239658d43f180df2a9b748 RTC:159709 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28875 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: RAJA DAS Reviewed-by: Sachin Gupta --- src/boot/loader_l1.S | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 src/boot/loader_l1.S (limited to 'src/boot/loader_l1.S') diff --git a/src/boot/loader_l1.S b/src/boot/loader_l1.S new file mode 100644 index 00000000..1699b239 --- /dev/null +++ b/src/boot/loader_l1.S @@ -0,0 +1,82 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/boot/loader_l1.S $ */ +/* */ +/* OpenPOWER sbe Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ + + .nolist +#include "pk.h" +#include "sbe_link.H" + .list + +### **************************************************************************** +### .loader_text - This section contains pm loader code +### @TODO via RTC 136315 +### It also contains vector code. We can remove vector code +### once OTPROM support for simics is in. +### **************************************************************************** + + .section .loader_text, "ax", @progbits + + .global _pibmemRepair + +__vectors: + + ############################################################ + # 0x0040 : System Reset + ############################################################ + .org __vectors + 0x0040 + +__system_reset: + b __pmLoader + + +__pmLoader: + bl _pibmemRepair + _liw %r3, SBE_LOADER_BASE_SECTION # Base Loader Section Location + _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 + mtctr r5 # set the counter for loop + lwz r8, 0(r3) # offset of baseloader section + adde r8, r8, r9 # add base address to offset to get absolute address + +copy_loop: + lvd d28, 0(r8) + stvd d28, 0(r4) + addi r8, r8, 8 + addi r4, r4, 8 + bdnz copy_loop + + ############################################################ + # SBE entry function is 4 byte number in image header + ############################################################ + + _liw %r3, SBE_SEEPROM_BASE_ORIGIN + SBE_LOADER_ENTRY_HEADER_OFFSET + lwz r6, 0(r3) + mtlr r6 + blr + + .epilogue __pmLoader + +#include "pibmem_repair.S" -- cgit v1.2.1