Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/sys/arch/newsmips Pull up following revision(s) (requeste...
details: https://anonhg.NetBSD.org/src/rev/8aa37c0a0ed3
branches: netbsd-8
changeset: 445935:8aa37c0a0ed3
user: martin <martin%NetBSD.org@localhost>
date: Sun Nov 18 11:54:02 2018 +0000
description:
Pull up following revision(s) (requested by tsutsui in ticket #1095):
sys/arch/newsmips/apbus/apbus.c: revision 1.23
sys/arch/newsmips/apbus/apbus_subr.c: revision 1.10
sys/arch/newsmips/apbus/apbusvar.h: revision 1.10
sys/arch/newsmips/conf/std.newsmips: revision 1.18
Fix news5000 panic during boot on APbus attach. PR port-newsmips/53626
Discussed with ryo@ (the original author of news5000 support).
Should be pulled up to netbsd-8.
diffstat:
sys/arch/newsmips/apbus/apbus.c | 5 +++--
sys/arch/newsmips/apbus/apbus_subr.c | 36 ++++++++++++++++++++++++++++++++++--
sys/arch/newsmips/apbus/apbusvar.h | 3 ++-
sys/arch/newsmips/conf/std.newsmips | 4 +++-
4 files changed, 42 insertions(+), 6 deletions(-)
diffs (118 lines):
diff -r b6f0108293df -r 8aa37c0a0ed3 sys/arch/newsmips/apbus/apbus.c
--- a/sys/arch/newsmips/apbus/apbus.c Sun Nov 18 11:16:52 2018 +0000
+++ b/sys/arch/newsmips/apbus/apbus.c Sun Nov 18 11:54:02 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apbus.c,v 1.22 2011/02/20 07:56:31 matt Exp $ */
+/* $NetBSD: apbus.c,v 1.22.48.1 2018/11/18 11:54:02 martin Exp $ */
/*-
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.22 2011/02/20 07:56:31 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.22.48.1 2018/11/18 11:54:02 martin Exp $");
#define __INTR_PRIVATE
@@ -99,6 +99,7 @@
struct newsmips_intr *ip;
int i;
+ apbus_map_romwork();
mips_set_wbflush(apbus_wbflush);
*(volatile uint32_t *)(NEWS5000_APBUS_INTST) = 0xffffffff;
diff -r b6f0108293df -r 8aa37c0a0ed3 sys/arch/newsmips/apbus/apbus_subr.c
--- a/sys/arch/newsmips/apbus/apbus_subr.c Sun Nov 18 11:16:52 2018 +0000
+++ b/sys/arch/newsmips/apbus/apbus_subr.c Sun Nov 18 11:54:02 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $ */
+/* $NetBSD: apbus_subr.c,v 1.9.22.1 2018/11/18 11:54:02 martin Exp $ */
/*-
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
@@ -27,15 +27,47 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apbus_subr.c,v 1.9 2014/03/24 20:05:20 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apbus_subr.c,v 1.9.22.1 2018/11/18 11:54:02 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
+#include <uvm/uvm_extern.h>
+
+#include <mips/locore.h>
+#include <mips/pte.h>
+
+#include <machine/wired_map.h>
+
#include <newsmips/apbus/apbusvar.h>
static void apctl_dump(struct apbus_ctl *);
+#define APBUS_ROMWORK_VA 0xfff00000
+
+void
+apbus_map_romwork(void)
+{
+ static bool mapped = false;
+ vaddr_t apbd_work_va;
+ vsize_t apbd_work_sz;
+ paddr_t apbd_work_pa;
+
+ if (!mapped) {
+ /* map PROM work RAM into VA 0xFFF00000 - 0xFFFFFFFF */
+ apbd_work_va = APBUS_ROMWORK_VA;
+ apbd_work_sz = MIPS3_PG_SIZE_MASK_TO_SIZE(MIPS3_PG_SIZE_1M);
+ apbd_work_pa = ctob(physmem);
+
+ mapped = mips3_wired_enter_page(apbd_work_va, apbd_work_pa,
+ apbd_work_sz);
+ if (!mapped) {
+ printf("%s: cannot allocate APbus PROM work\n",
+ __func__);
+ }
+ }
+}
+
void *
apbus_device_to_hwaddr(struct apbus_dev *apbus_dev)
{
diff -r b6f0108293df -r 8aa37c0a0ed3 sys/arch/newsmips/apbus/apbusvar.h
--- a/sys/arch/newsmips/apbus/apbusvar.h Sun Nov 18 11:16:52 2018 +0000
+++ b/sys/arch/newsmips/apbus/apbusvar.h Sun Nov 18 11:54:02 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apbusvar.h,v 1.9 2007/10/17 19:55:54 garbled Exp $ */
+/* $NetBSD: apbusvar.h,v 1.9.100.1 2018/11/18 11:54:02 martin Exp $ */
/*-
* Copyright (C) 1999 SHIMIZU Ryo. All rights reserved.
@@ -39,6 +39,7 @@
u_long apa_hwbase; /* hardware I/O address */
};
+void apbus_map_romwork(void);
void *apbus_device_to_hwaddr(struct apbus_dev *);
struct apbus_dev *apbus_lookupdev(char *);
void apdevice_dump(struct apbus_dev *);
diff -r b6f0108293df -r 8aa37c0a0ed3 sys/arch/newsmips/conf/std.newsmips
--- a/sys/arch/newsmips/conf/std.newsmips Sun Nov 18 11:16:52 2018 +0000
+++ b/sys/arch/newsmips/conf/std.newsmips Sun Nov 18 11:54:02 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: std.newsmips,v 1.17 2005/12/11 12:18:24 christos Exp $
+# $NetBSD: std.newsmips,v 1.17.158.1 2018/11/18 11:54:03 martin Exp $
machine newsmips mips
include "conf/std" # MI standard options
@@ -7,5 +7,7 @@
options EXEC_ELF32 # exec ELF32 binaries
options EXEC_SCRIPT # exec #! scripts
+options ENABLE_MIPS3_WIRED_MAP
+
makeoptions DEFTEXTADDR="0x80001000"
makeoptions LINKFORMAT="-N"
Home |
Main Index |
Thread Index |
Old Index