diff options
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/blackfin/cpu/os_log.c | 6 | ||||
| -rw-r--r-- | arch/blackfin/include/asm/blackfin_local.h | 2 | ||||
| -rw-r--r-- | arch/sparc/cpu/leon3/start.S | 58 | 
3 files changed, 37 insertions, 29 deletions
| diff --git a/arch/blackfin/cpu/os_log.c b/arch/blackfin/cpu/os_log.c index e1c8e2948..2092d9e3b 100644 --- a/arch/blackfin/cpu/os_log.c +++ b/arch/blackfin/cpu/os_log.c @@ -12,12 +12,12 @@  #define OS_LOG_MAGIC_ADDR  ((unsigned long *)0x4f0)  #define OS_LOG_PTR_ADDR    ((char **)0x4f4) -bool bfin_os_log_check(void) +int bfin_os_log_check(void)  {  	if (*OS_LOG_MAGIC_ADDR != OS_LOG_MAGIC) -		return false; +		return 0;  	*OS_LOG_MAGIC_ADDR = 0; -	return true; +	return 1;  }  void bfin_os_log_dump(void) diff --git a/arch/blackfin/include/asm/blackfin_local.h b/arch/blackfin/include/asm/blackfin_local.h index ab31dcb81..8ea8cde69 100644 --- a/arch/blackfin/include/asm/blackfin_local.h +++ b/arch/blackfin/include/asm/blackfin_local.h @@ -51,7 +51,7 @@ extern u_long get_dclk(void);  # define bfin_revid() (bfin_read_CHIPID() >> 28) -extern bool bfin_os_log_check(void); +extern int bfin_os_log_check(void);  extern void bfin_os_log_dump(void);  extern void blackfin_icache_flush_range(const void *, const void *); diff --git a/arch/sparc/cpu/leon3/start.S b/arch/sparc/cpu/leon3/start.S index bbc1b3476..cf897f687 100644 --- a/arch/sparc/cpu/leon3/start.S +++ b/arch/sparc/cpu/leon3/start.S @@ -1,33 +1,41 @@ -#include <config.h> - -TRAP ta 0; nop; nop; nop; - -/* Software trap. Treat as BAD_TRAP for the time being... */ -#define SOFT_TRAP TRAP(_hwerr) - -#define PSR_INIT   0x1FC0	/* Disable traps, set s and ps */ -#define WIM_INIT   2 - -/* All traps low-level code here must end with this macro. */ -#define RESTORE_ALL b ret_trap_entry; clr %l6; +/* This is where the SPARC/LEON3 starts + * Copyright (C) 2007, + * Daniel Hellstrom, daniel@gaisler.com + * + * See file CREDITS for list of people who contributed to this + * project. + * + * SPDX-License-Identifier:	GPL-2.0+ + */ -#define WRITE_PAUSE nop;nop;nop +#include <asm-offsets.h> +#include <config.h> +#include <asm/asmmacro.h> +#include <asm/winmacro.h> +#include <asm/psr.h> +#include <asm/stack.h> +#include <asm/leon.h> +#include <version.h> -WINDOWSIZE = (16 * 4) -ARGPUSHSIZE = (6 * 4) -ARGPUSH = (WINDOWSIZE + 4) -MINFRAME = (WINDOWSIZE + ARGPUSHSIZE + 4) +/* Entry for traps which jump to a programmer-specified trap handler.  */ +#define TRAPR(H)  \ +	wr	%g0, 0xfe0, %psr; \ +	mov	%g0, %tbr; \ +	ba	(H); \ +	mov	%g0, %wim; -/* Number of register windows */ -#ifndef CONFIG_SYS_SPARC_NWINDOWS -#error Must define number of SPARC register windows, default is 8 -#endif +#define TRAP(H) \ +	mov	%psr, %l0; \ +	ba	(H); \ +	nop; nop; -#define STACK_ALIGN	8 -#define SA(X)	(((X)+(STACK_ALIGN-1)) & ~(STACK_ALIGN-1)) +#define TRAPI(ilevel) \ +	mov	ilevel, %l7; \ +	mov	%psr, %l0; \ +	b	_irq_entry; \ +	mov	%wim, %l3 -	.section ".start", "ax" -	.globl	_starttate */ +/* Unexcpected trap will halt the processor by forcing it to error state */  #undef BAD_TRAP  #define BAD_TRAP ta 0; nop; nop; nop; |