diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-12-08 22:22:53 +1000 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2019-12-16 14:50:56 +1100 |
commit | b5c22130fce0145171d1ac082c25ab9074c075ce (patch) | |
tree | 00c6783cf36e9296f99280ee2c76ea931e9c1cf4 /asm | |
parent | 0880124547f48473b3e46e7f800ea627d0a39183 (diff) | |
download | skiboot-b5c22130fce0145171d1ac082c25ab9074c075ce.zip skiboot-b5c22130fce0145171d1ac082c25ab9074c075ce.tar.gz skiboot-b5c22130fce0145171d1ac082c25ab9074c075ce.tar.bz2 |
cvc: allow BE cvc code to be called from LE context
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'asm')
-rw-r--r-- | asm/cvc_entry.S | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/asm/cvc_entry.S b/asm/cvc_entry.S index 3e8b3fd..94cd1ae 100644 --- a/asm/cvc_entry.S +++ b/asm/cvc_entry.S @@ -1,28 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 -# IBM_PROLOG_BEGIN_TAG -# This is an automatically generated prolog. -# -# $Source: src/usr/secureboot/base/rom_entry.S $ -# -# OpenPOWER HostBoot Project -# -# COPYRIGHT International Business Machines Corp. 2013,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 - -#.include "kernel/ppcconsts.S" + +# Derived from automatically generated HostBoot rom_entry.S + +#include <asm-utils.h> +#include <processor.h> # Updated hostboot location is src/securerom/rom_entry.S. # This also has a fix for TOC save frame pointer. @@ -49,7 +30,20 @@ call_rom_entry: mr %r5, %r6 mr %r6, %r7 mr %r7, %r8 +#if HAVE_BIG_ENDIAN bctrl +#else + bl $+4 +1: mflr %r9 + addi %r9,%r9,2f - 1b + mtspr SPR_HSRR0, %r9 + mfmsr %r9 + xori %r9,%r9,MSR_LE + mtspr SPR_HSRR1, %r9 + hrfid +2: .long 0x2104804e /* bctrl */ + FIXUP_ENDIAN +#endif ld %r2, STACK_TOC_OFFSET(%r1) addi %r1, %r1, 128 ld %r0, 16(%r1) |