Module Name: src Committed By: andvar Date: Thu Sep 28 21:45:43 UTC 2023
Modified Files: src/sys/arch/mmeye/mmeye: locore.S Log Message: apply few commits from uwe in evbsh3/locore.S to mmeye counterpart: 1) Wrap _ROM_START in #ifdef ROMIMAGE to match its use. 2) Use symbolic constants for SR init values. 3) Don't write SR twice. reduces diff between two mainly to SH4 specific code and few other lines. NFCI (confirmed with uwe by email) Additionally: rearrange includes alphabetically and remove sh3/mmu_sh4.h, since SH4 specific code is missing. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mmeye/mmeye/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mmeye/mmeye/locore.S diff -u src/sys/arch/mmeye/mmeye/locore.S:1.13 src/sys/arch/mmeye/mmeye/locore.S:1.14 --- src/sys/arch/mmeye/mmeye/locore.S:1.13 Sun Sep 24 20:17:26 2023 +++ src/sys/arch/mmeye/mmeye/locore.S Thu Sep 28 21:45:43 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.13 2023/09/24 20:17:26 andvar Exp $ */ +/* $NetBSD: locore.S,v 1.14 2023/09/28 21:45:43 andvar Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -81,12 +81,13 @@ #endif #include <sh3/asm.h> -#include <sh3/locore.h> +#include <sh3/psl.h> #include <sh3/exception.h> -#include <sh3/cache_sh3.h> -#include <sh3/cache_sh4.h> +#include <sh3/locore.h> #include <sh3/mmu_sh3.h> #include <sh3/mmu_sh4.h> +#include <sh3/cache_sh3.h> +#include <sh3/cache_sh4.h> #define INIT_STACK \ ((IOM_RAM_BEGIN + IOM_RAM_SIZE - 0x00001000) | 0x80000000) @@ -99,20 +100,19 @@ ALTENTRY(kernel_text) /* Set SP to initial position */ mov.l XLtmpstk, r15 - __INTR_MASK(r0, r1) - - /* Set Register Bank to Bank 0 */ + /* Set Status Register */ mov.l SR_init, r0 ldc r0, sr + /* MMU off */ xor r0, r0 MOV (MMUCR, r2) - mov.l r0, @r2 /* MMU OFF */ + mov.l r0, @r2 bra start1 nop .align 2 -SR_init: .long 0x500000F0 +SR_init: .long PSL_MD | PSL_BL | PSL_IMASK REG_SYMBOL(MMUCR) start1: @@ -190,7 +190,9 @@ ___etext: .long _etext ___end: .long _end XLtmpstk: .long INIT_STACK _KERNBASE: .long 0x8c000000 +#ifdef ROMIMAGE _ROM_START: .long IOM_ROM_BEGIN +#endif XLinitSH3: .long _C_LABEL(initSH3) XLmain: .long _C_LABEL(main)