NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-newsmips/53626 (NetBSD/newsmips 8.0 GENERIC boot fails on NWS-5000X)
Synopsis: NetBSD/newsmips 8.0 GENERIC boot fails on NWS-5000X
Responsible-Changed-From-To: port-newsmips-maintainer->tsutsui
Responsible-Changed-By: tsutsui%NetBSD.org@localhost
Responsible-Changed-When: Sat, 22 Sep 2018 14:29:22 +0000
Responsible-Changed-Why:
I'll check this one.
State-Changed-From-To: open->analyzed
State-Changed-By: tsutsui%NetBSD.org@localhost
State-Changed-When: Sat, 22 Sep 2018 14:29:22 +0000
State-Changed-Why:
Mapping the last 1MB of physical RAM to 0xFFF00000 via wired map make
the GENERIC kernel boot, but I'm not sure if it's proper way.
Index: conf/std.newsmips
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/conf/std.newsmips,v
retrieving revision 1.17
diff -u -p -d -r1.17 std.newsmips
--- conf/std.newsmips 11 Dec 2005 12:18:24 -0000 1.17
+++ conf/std.newsmips 22 Sep 2018 14:07:26 -0000
@@ -7,5 +7,7 @@ makeoptions MACHINE_ARCH="mipseb"
options EXEC_ELF32 # exec ELF32 binaries
options EXEC_SCRIPT # exec #! scripts
+options ENABLE_MIPS3_WIRED_MAP
+
makeoptions DEFTEXTADDR="0x80001000"
makeoptions LINKFORMAT="-N"
Index: newsmips/news5000.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/newsmips/news5000.c,v
retrieving revision 1.21
diff -u -p -d -r1.21 news5000.c
--- newsmips/news5000.c 21 Jul 2016 19:49:59 -0000 1.21
+++ newsmips/news5000.c 22 Sep 2018 14:07:27 -0000
@@ -37,9 +37,13 @@ __KERNEL_RCSID(0, "$NetBSD: news5000.c,v
#include <sys/cpu.h>
#include <sys/intr.h>
+#include <uvm/uvm_extern.h>
+
#include <mips/locore.h>
+#include <mips/pte.h>
#include <machine/adrsmap.h>
+#include <machine/wired_map.h>
#include <newsmips/apbus/apbusvar.h>
#include <newsmips/newsmips/machid.h>
@@ -53,6 +57,7 @@ static void news5000_enable_timer(void);
static void news5000_readidrom(uint8_t *);
static void news5000_tc_init(void);
static uint32_t news5000_getfreerun(struct timecounter *);
+static void news5000_map_promwork(void);
/*
* This is a mask of bits to clear in the SR when we go to a
@@ -295,4 +300,25 @@ news5000_init(void)
#define NEWS5000_FDC_FDOUT 0xbed20000
#define FDO_FRST 0x04
*(volatile uint8_t *)NEWS5000_FDC_FDOUT = FDO_FRST;
+
+ news5000_map_promwork();
+}
+
+static void
+news5000_map_promwork(void)
+{
+ vaddr_t promwork_va;
+ vsize_t promwork_sz;
+ paddr_t promwork_pa;
+
+#define NEWS5000_PROMWORK 0xfff00000
+
+ /* map PROM work RAM into VA 0xFFF00000 - 0xFFFFFFFF */
+ promwork_va = NEWS5000_PROMWORK;
+ promwork_sz = MIPS3_PG_SIZE_MASK_TO_SIZE(MIPS3_PG_SIZE_1M);
+ promwork_pa = ctob(physmem);
+ if (mips3_wired_enter_page(promwork_va, promwork_pa, promwork_sz)
+ == false) {
+ printf("%s: cannot allocate PROM work\n", __func__);
+ }
}
Home |
Main Index |
Thread Index |
Old Index