Files
system76-coreboot/src/arch/mips/bootblock.S
Ionela Voinescu 8fa8f4bdc3 arch/mips: provide proper cache primitives
This provides the opportunity to remove the kludge of disabling caches
altogether in the bootblock.

[pg: originally, this commit also provided automatic cache management
after loading stages, ie. flush dcache, so code ends up in icache. This
is done differently in upstream, so it's left out here]

BUG=chrome-os-partner:34127, chrome-os-partner:31438
TEST=with this fix romstage, ramstage and payload are executed properly
BRANCH=none

Change-Id: I568c68d02b2cd9c1c2c9c1495ba3343c82509ccc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 95ab0f159cabf21fc100f371d451211e7d113761
Original-Change-Id: Iaf90b052073dd355ab9114e8dba9f5ef76188c94
Original-Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/232410
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9618
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2015-04-13 20:25:21 +02:00

49 lines
1.3 KiB
ArmAsm

/*
* This file is part of the coreboot project.
*
* Copyright (C) 2014 Imagination Technologies
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
.set noreorder /* Prevent assembler from "optimizing" this code. */
.section ".text._start", "ax", %progbits
.globl _start
_start:
/* Set the stack pointer */
la $sp, _estack
/*
* Initialise the stack to a known value, used later to check for
* overflow.
*/
la $t0, _stack
addi $t1, $sp, -4
li $t2, 0xdeadbeef
1: sw $t2, 0($t0)
bne $t0, $t1, 1b
addi $t0, $t0, 4
/* Run main */
b main
/*
* Should never return from main. Make sure there is no branch in the
* branch delay slot.
*/
2: nop
b 2b
nop /* Make sure there is no branch after this either. */