Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch variable start address of the main memory (now we c...
details: https://anonhg.NetBSD.org/src/rev/8cded83f78a7
branches: trunk
changeset: 482887:8cded83f78a7
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Feb 24 19:42:35 2000 +0000
description:
variable start address of the main memory (now we can use
the area 2 as main memory with "options IOM_RAM_BEGIN=0x88000000")
diffstat:
sys/arch/evbsh3/conf/COMPUTEXEVB | 6 ++++--
sys/arch/evbsh3/conf/CQREEKSH3 | 4 +++-
sys/arch/evbsh3/conf/files.evbsh3 | 4 ++--
sys/arch/evbsh3/evbsh3/genassym.cf | 12 ++++--------
sys/arch/evbsh3/evbsh3/locore.s | 13 +++++++------
sys/arch/evbsh3/evbsh3/machdep.c | 11 ++++++-----
sys/arch/evbsh3/include/param.h | 18 +++++++++++++-----
sys/arch/mmeye/conf/files.mmeye | 4 +++-
sys/arch/mmeye/conf/std.mmeye | 7 ++++++-
sys/arch/mmeye/include/Makefile | 4 ++--
sys/arch/mmeye/include/param.h | 18 +++++++++++++-----
sys/arch/mmeye/include/sh3.h | 12 ------------
sys/arch/mmeye/mmeye/locore.s | 13 +++++++------
sys/arch/mmeye/mmeye/machdep.c | 10 ++++++----
sys/arch/sh3/sh3/md_root.c | 5 +++--
15 files changed, 79 insertions(+), 62 deletions(-)
diffs (truncated from 475 to 300 lines):
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/conf/COMPUTEXEVB
--- a/sys/arch/evbsh3/conf/COMPUTEXEVB Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/conf/COMPUTEXEVB Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: COMPUTEXEVB,v 1.3 2000/02/24 17:07:36 msaitoh Exp $
+# $NetBSD: COMPUTEXEVB,v 1.4 2000/02/24 19:42:35 msaitoh Exp $
#
# GENERIC -- everything that's currently supported
#
@@ -16,7 +16,9 @@
# CPU support. At least one is REQUIRED.
options SH7709A # 100MHz
options PCLOCK=25000000 # 25.000MHz
-options IOM_ROM_SIZE=0x00200000 # 1MB
+options IOM_ROM_BEGIN=0x00000000
+options IOM_ROM_SIZE=0x00100000 # 1MB
+options IOM_RAM_BEGIN=0x8c000000
options IOM_RAM_SIZE=0x01000000 # 16MB
options LED_ADDR=0xb8000000
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/conf/CQREEKSH3
--- a/sys/arch/evbsh3/conf/CQREEKSH3 Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/conf/CQREEKSH3 Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: CQREEKSH3,v 1.6 2000/02/24 17:07:36 msaitoh Exp $
+# $NetBSD: CQREEKSH3,v 1.7 2000/02/24 19:42:35 msaitoh Exp $
#
# GENERIC -- everything that's currently supported
#
@@ -18,7 +18,9 @@
# CPU support. At least one is REQUIRED.
options SH7708 # 100MHz
options PCLOCK=15000000 # 15.000MHz
+options IOM_ROM_BEGIN=0x00000000
options IOM_ROM_SIZE=0x00200000 # 2MB
+options IOM_RAM_BEGIN=0x8c000000
options IOM_RAM_SIZE=0x00400000 # 4MB
options LED_ADDR=0xa8000000
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/conf/files.evbsh3
--- a/sys/arch/evbsh3/conf/files.evbsh3 Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/conf/files.evbsh3 Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.evbsh3,v 1.1 1999/09/13 10:30:23 itojun Exp $
+# $NetBSD: files.evbsh3,v 1.2 2000/02/24 19:42:35 msaitoh Exp $
#
# new style config file for sh3 architecture
#
@@ -8,7 +8,7 @@
file arch/evbsh3/evbsh3/conf.c
file arch/evbsh3/evbsh3/machdep.c
-defopt opt_memsize.h IOM_ROM_SIZE IOM_RAM_SIZE
+defopt opt_memsize.h IOM_ROM_BEGIN IOM_ROM_SIZE IOM_RAM_BEGIN IOM_RAM_SIZE
defopt opt_led_addr.h LED_ADDR
defopt opt_initbsc.h BSC_BCR1_VAL BSC_BCR2_VAL BSC_WCR1_VAL BSC_WCR2_VAL
BSC_MCR_VAL BSC_SDMR_VAL BSC_RTCSR_VAL BSC_RTCNT_VAL
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/evbsh3/genassym.cf
--- a/sys/arch/evbsh3/evbsh3/genassym.cf Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/evbsh3/genassym.cf Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.3 1999/09/16 21:23:40 msaitoh Exp $
+# $NetBSD: genassym.cf,v 1.4 2000/02/24 19:42:36 msaitoh Exp $
#
# Copyright (c) 1995, 1997 Charles M. Hannum. All rights reserved.
@@ -39,6 +39,9 @@
# @(#)genassym.c 5.11 (Berkeley) 5/10/91
#
+include "opt_memsize.h"
+include "opt_led_addr.h"
+
include <sys/param.h>
include <sys/proc.h>
include <sys/resourcevar.h>
@@ -55,9 +58,6 @@
include <machine/pmap.h>
include <machine/vmparam.h>
-include "opt_memsize.h"
-include "opt_led_addr.h"
-
define SRUN SRUN
define PDSLOT_PTE PDSLOT_PTE
@@ -100,10 +100,6 @@
define SC_EFLAGS offsetof(struct sigcontext, sc_ssr)
define IOM_RAM_BEGIN IOM_RAM_BEGIN
-define IOM_RAM_END (unsigned int)IOM_RAM_BEGIN + IOM_RAM_SIZE - 1
-define IOM_RAM_SIZE IOM_RAM_SIZE
define IOM_ROM_BEGIN IOM_ROM_BEGIN
-define IOM_ROM_END (unsigned int)IOM_ROM_BEGIN + IOM_ROM_SIZE - 1
-define IOM_ROM_SIZE IOM_ROM_SIZE
define LED_ADDR LED_ADDR
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/evbsh3/locore.s
--- a/sys/arch/evbsh3/evbsh3/locore.s Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/evbsh3/locore.s Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.9 2000/02/24 19:01:26 msaitoh Exp $ */
+/* $NetBSD: locore.s,v 1.10 2000/02/24 19:42:36 msaitoh Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995, 1997
@@ -292,7 +292,7 @@
#ifdef ROMIMAGE
/* Initialize BUS State Control Regs. */
mov.l _ROM_START, r3
- mov.l _RAM_START, r4
+ mov.l _C_LABEL(ram_start), r4
sub r3, r4
/* Set Bus State Controler */
mov.l XLInitializeBsc, r0
@@ -313,7 +313,7 @@
add r3, r1 /* src address */
mov.l ___start, r3
sub r2, r3
- mov.l _RAM_START, r4
+ mov.l _C_LABEL(ram_start), r4
add r4, r3 /* dest address */
1:
mov.l @r1+, r4
@@ -358,13 +358,14 @@
.align 2
+ .globl _C_LABEL(ram_start)
XLInitializeBsc:.long _C_LABEL(InitializeBsc)
___start: .long start
___etext: .long _etext
___end: .long _end
XLtmpstk: .long INIT_STACK
_KERNBASE: .long KERNBASE
-_RAM_START: .long IOM_RAM_BEGIN
+_C_LABEL(ram_start): .long IOM_RAM_BEGIN
_ROM_START: .long IOM_ROM_BEGIN
XLKernelStack: .long KernelStack
XLinitSH3: .long _C_LABEL(initSH3)
@@ -1485,7 +1486,7 @@
.align 2
XL_start_address:
- .long 0x8c010000
+ .long IOM_RAM_BEGIN + 0x00010000
load_and_reset_end:
ENTRY(XLoadAndReset)
@@ -1507,7 +1508,7 @@
.align 2
XL_load_trampoline_addr:
- .long 0x8c008000
+ .long IOM_RAM_BEGIN + 0x00008000
XL_load_and_reset:
.long load_and_reset
XL_load_and_reset_end:
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/evbsh3/machdep.c
--- a/sys/arch/evbsh3/evbsh3/machdep.c Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/evbsh3/machdep.c Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.7 2000/01/19 20:05:34 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.8 2000/02/24 19:42:36 msaitoh Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -520,7 +520,7 @@
/*
* Initialize segments and descriptor tables
*/
-#define VBRINIT ((char *)0x8c000000)
+#define VBRINIT ((char *)IOM_RAM_BEGIN)
#define Trap100Vec (VBRINIT + 0x100)
#define Trap600Vec (VBRINIT + 0x600)
#define TLBVECTOR (VBRINIT + 0x400)
@@ -986,6 +986,10 @@
}
#include <machine/mmeye.h>
+
+ /* XXX This value depends on physical available memory */
+#define OSIMAGE_BUF_ADDR (IOM_RAM_BEGIN + 0x00400000)
+
void
LoadAndReset(osimage)
char *osimage;
@@ -997,9 +1001,6 @@
u_long csum = 0;
u_long csum2 = 0;
u_long size2;
-#define OSIMAGE_BUF_ADDR 0x8c400000 /* !!!!!! This value depends on physical
- available memory */
-
printf("LoadAndReset: copy start\n");
buf_addr = (void *)OSIMAGE_BUF_ADDR;
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/evbsh3/include/param.h
--- a/sys/arch/evbsh3/include/param.h Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/evbsh3/include/param.h Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.3 2000/02/11 19:25:15 thorpej Exp $ */
+/* $NetBSD: param.h,v 1.4 2000/02/24 19:42:36 msaitoh Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -78,17 +78,25 @@
*/
#define ALIGNBYTES (sizeof(int) - 1)
#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
-#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
-/* #define ALIGNED_POINTER(p,t) 1 */
+#define ALIGNED_POINTER(p, t) ((((u_long)(p)) & (sizeof(t)-1)) == 0)
+/* #define ALIGNED_POINTER(p, t) 1 */
#define PGSHIFT 12 /* LOG2(NBPG) */
#define NBPG (1 << PGSHIFT) /* bytes/page */
#define PGOFSET (NBPG-1) /* byte offset into page */
#define NPTEPG (NBPG/(sizeof (pt_entry_t)))
-#define KERNBASE 0x8c000000 /* start of kernel virtual space */
+#ifdef _KERNEL
+#ifndef _LOCORE
+extern vaddr_t ram_start;
+#define KERNBASE ram_start /* start of kernel virtual space */
+#define KERNTEXTOFF ram_start /* start of kernel text */
+#else
+#define KERNBASE IOM_RAM_BEGIN /* start of kernel virtual space */
+#define KERNTEXTOFF IOM_RAM_BEGIN /* start of kernel text */
+#endif
+#endif
#define KERNSIZE 0x01800000 /* size of kernel virtual space */
-#define KERNTEXTOFF 0x8c000000 /* start of kernel text */
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
#define NPGDIR (1*NBPG)
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/mmeye/conf/files.mmeye
--- a/sys/arch/mmeye/conf/files.mmeye Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/mmeye/conf/files.mmeye Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.mmeye,v 1.1 1999/09/13 10:30:50 itojun Exp $
+# $NetBSD: files.mmeye,v 1.2 2000/02/24 19:42:36 msaitoh Exp $
#
# config file for mmeye
@@ -6,3 +6,5 @@
file arch/mmeye/mmeye/conf.c
file arch/mmeye/mmeye/machdep.c
+
+defopt opt_memsize.h IOM_ROM_BEGIN IOM_ROM_SIZE IOM_RAM_BEGIN IOM_RAM_SIZE
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/mmeye/conf/std.mmeye
--- a/sys/arch/mmeye/conf/std.mmeye Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/mmeye/conf/std.mmeye Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.mmeye,v 1.3 1999/11/15 19:00:28 fvdl Exp $
+# $NetBSD: std.mmeye,v 1.4 2000/02/24 19:42:36 msaitoh Exp $
#
# standard, required NetBSD/mmeye 'options'
@@ -8,4 +8,9 @@
cinclude "conf/files.softdep"
prefix
+options IOM_ROM_BEGIN=0x00000000
+options IOM_RAM_SIZE=0x01000000 # 16MB
+options IOM_RAM_BEGIN=0x8c000000
+options IOM_ROM_SIZE=0x00200000 # 2MB
+
options EXEC_SCRIPT # exec #! scripts
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/mmeye/include/Makefile
--- a/sys/arch/mmeye/include/Makefile Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/mmeye/include/Makefile Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2000/01/17 16:27:53 kleink Exp $
+# $NetBSD: Makefile,v 1.4 2000/02/24 19:42:36 msaitoh Exp $
KDIR= /sys/arch/mmeye/include
INCSDIR= /usr/include/mmeye
@@ -8,7 +8,7 @@
disklabel.h elf_machdep.h endian.h float.h frame.h \
ieee.h ieeefp.h intr.h limits.h loadfile_machdep.h math.h mmeye.h \
param.h pcb.h pio.h pmap.h proc.h profile.h psl.h pte.h ptrace.h reg.h \
- segments.h setjmp.h sh3.h shbvar.h signal.h stdarg.h \
+ segments.h setjmp.h shbvar.h signal.h stdarg.h \
trap.h types.h varargs.h vmparam.h
.include <bsd.kinc.mk>
diff -r ce5e35bd1997 -r 8cded83f78a7 sys/arch/mmeye/include/param.h
--- a/sys/arch/mmeye/include/param.h Thu Feb 24 19:01:24 2000 +0000
+++ b/sys/arch/mmeye/include/param.h Thu Feb 24 19:42:35 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.3 2000/02/11 19:30:27 thorpej Exp $ */
+/* $NetBSD: param.h,v 1.4 2000/02/24 19:42:36 msaitoh Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -69,17 +69,25 @@
*/
#define ALIGNBYTES (sizeof(int) - 1)
Home |
Main Index |
Thread Index |
Old Index