Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/s3c2xx0 add a function to initialize variables ...



details:   https://anonhg.NetBSD.org/src/rev/da7a82ab5e24
branches:  trunk
changeset: 556464:da7a82ab5e24
user:      bsh <bsh%NetBSD.org@localhost>
date:      Wed Dec 17 13:20:04 2003 +0000

description:
add a function to initialize variables used by splfoo().
This should be called in bootstrap so that splfoo() doesn't touch illegal address.

diffstat:

 sys/arch/arm/s3c2xx0/s3c2xx0_intr.c |  16 ++++++++++++++--
 sys/arch/arm/s3c2xx0/s3c2xx0_intr.h |   6 +++++-
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r a2d1912f6eca -r da7a82ab5e24 sys/arch/arm/s3c2xx0/s3c2xx0_intr.c
--- a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c       Wed Dec 17 10:38:39 2003 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.c       Wed Dec 17 13:20:04 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s3c2xx0_intr.c,v 1.7 2003/08/04 12:31:12 bsh Exp $ */
+/* $NetBSD: s3c2xx0_intr.c,v 1.8 2003/12/17 13:20:04 bsh Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Fujitsu Component Limited
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: s3c2xx0_intr.c,v 1.7 2003/08/04 12:31:12 bsh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: s3c2xx0_intr.c,v 1.8 2003/12/17 13:20:04 bsh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -228,6 +228,18 @@
        enable_interrupts(I32_bit);
 }
 
+/*
+ * initialize variables so that splfoo() doesn't touch illegal address.
+ * called during bootstrap.
+ */
+void
+s3c2xx0_intr_bootstrap(vaddr_t icureg)
+{
+       s3c2xx0_intr_mask_reg = (volatile uint32_t *)(icureg + INTCTL_INTMSK);
+}
+
+
+
 #undef splx
 void
 splx(int ipl)
diff -r a2d1912f6eca -r da7a82ab5e24 sys/arch/arm/s3c2xx0/s3c2xx0_intr.h
--- a/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h       Wed Dec 17 10:38:39 2003 +0000
+++ b/sys/arch/arm/s3c2xx0/s3c2xx0_intr.h       Wed Dec 17 13:20:04 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: s3c2xx0_intr.h,v 1.5 2003/09/21 19:32:38 matt Exp $ */
+/*     $NetBSD: s3c2xx0_intr.h,v 1.6 2003/12/17 13:20:04 bsh Exp $ */
 
 /*
  * Copyright (c) 2002, 2003 Fujitsu Component Limited
@@ -216,4 +216,8 @@
 /* used by s3c2{80,40,41}0 interrupt handler */
 void s3c2xx0_intr_init(struct s3c2xx0_intr_dispatch *, int );
 
+/* initialize some variable so that splfoo() doesn't touch ileegal
+   address during bootstrap */
+void s3c2xx0_intr_bootstrap(vaddr_t);
+
 #endif /* _S3C2XX0_INTR_H_ */



Home | Main Index | Thread Index | Old Index