summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-08-10 07:42:59 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-08-10 07:42:59 +0000
commitc9fe1d291dd5d5bf162bd30309e3977c74c81c36 (patch)
treec93f6298898aaa2ffc03c1b2da79ff5941275e38
parent113132e0732cc61bec8f6a8ee1d20bca4d106b07 (diff)
Initialize first_addr much earlier, in locore; this will help adding
symbols support in the not-so-distant future. ok aoyama@
-rw-r--r--sys/arch/luna88k/luna88k/locore.S8
-rw-r--r--sys/arch/luna88k/luna88k/machdep.c14
2 files changed, 13 insertions, 9 deletions
diff --git a/sys/arch/luna88k/luna88k/locore.S b/sys/arch/luna88k/luna88k/locore.S
index fb57b06f439..a8adfa3dc54 100644
--- a/sys/arch/luna88k/luna88k/locore.S
+++ b/sys/arch/luna88k/luna88k/locore.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: locore.S,v 1.26 2013/08/10 07:41:16 miod Exp $ */
+/* $OpenBSD: locore.S,v 1.27 2013/08/10 07:42:58 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -148,6 +148,12 @@ ASLOCAL(main_init)
bsr.n _C_LABEL(bzero) /* bzero(edata, end-edata) */
subu %r3, %r4, %r2
+ /* figure out the end of the kernel image. */
+ or.u %r4, %r0, %hi16(_C_LABEL(end))
+ or %r4, %r4, %lo16(_C_LABEL(end))
+ or.u %r5, %r0, %hi16(_C_LABEL(first_addr))
+ st %r4, %r5, %lo16(_C_LABEL(first_addr)) /* no symbols yet */
+
/*
* Have curcpu() point to the dummy cpuinfo structure,
* and initialize cr17.
diff --git a/sys/arch/luna88k/luna88k/machdep.c b/sys/arch/luna88k/luna88k/machdep.c
index d6c41c81657..f8194562e91 100644
--- a/sys/arch/luna88k/luna88k/machdep.c
+++ b/sys/arch/luna88k/luna88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.88 2013/06/11 16:42:09 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.89 2013/08/10 07:42:58 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -292,9 +292,6 @@ size_memory()
{
unsigned int *volatile look;
unsigned int *max;
-#if 0
- extern char *end;
-#endif
#define PATTERN 0x5a5a5a5a
#define STRIDE (4*1024) /* 4k at a time */
#define Roundup(value, stride) (((unsigned)(value) + (stride) - 1) & ~((stride)-1))
@@ -987,7 +984,6 @@ void
luna88k_bootstrap()
{
extern const struct cmmu_p cmmu8820x;
- extern char *end;
vaddr_t avail_start;
extern vaddr_t avail_end;
#ifndef MULTIPROCESSOR
@@ -1001,13 +997,15 @@ luna88k_bootstrap()
*int_mask_reg[2] = *int_mask_reg[3] = 0;
/* clear software interrupts; just read registers */
- *swi_reg[0]; *swi_reg[1];
- *swi_reg[2]; *swi_reg[3];
+ *(volatile uint32_t *)swi_reg[0];
+ *(volatile uint32_t *)swi_reg[1];
+ *(volatile uint32_t *)swi_reg[2];
+ *(volatile uint32_t *)swi_reg[3];
uvmexp.pagesize = PAGE_SIZE;
uvm_setpagesize();
- first_addr = round_page((vaddr_t)&end); /* XXX temp until symbols */
+ first_addr = round_page(first_addr);
last_addr = size_memory();
physmem = atop(last_addr);