Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/mini2440 Make sure to allow MEMORY_DISK as r...



details:   https://anonhg.NetBSD.org/src/rev/4c043800f00d
branches:  trunk
changeset: 773471:4c043800f00d
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Fri Feb 03 00:33:08 2012 +0000

description:
Make sure to allow MEMORY_DISK as rootfs.

diffstat:

 sys/arch/evbarm/mini2440/mini2440_machdep.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (56 lines):

diff -r d2f420b517e1 -r 4c043800f00d sys/arch/evbarm/mini2440/mini2440_machdep.c
--- a/sys/arch/evbarm/mini2440/mini2440_machdep.c       Fri Feb 03 00:05:57 2012 +0000
+++ b/sys/arch/evbarm/mini2440/mini2440_machdep.c       Fri Feb 03 00:33:08 2012 +0000
@@ -131,7 +131,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mini2440_machdep.c,v 1.1 2012/01/30 03:28:34 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mini2440_machdep.c,v 1.2 2012/02/03 00:33:08 nisimura Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -262,11 +262,11 @@
 
 #define KERNEL_PT_SYS          0       /* L2 table for mapping zero page */
 #define KERNEL_PT_KERNEL       1       /* L2 table for mapping kernel */
-#define        KERNEL_PT_KERNEL_NUM    2       /* L2 tables for mapping kernel VM */
+#define KERNEL_PT_KERNEL_NUM   3       /* L2 tables for mapping kernel VM */
 
 #define KERNEL_PT_VMDATA       (KERNEL_PT_KERNEL + KERNEL_PT_KERNEL_NUM)
 
-#define        KERNEL_PT_VMDATA_NUM    4       /* start with 16MB of KVM */
+#define KERNEL_PT_VMDATA_NUM   4       /* start with 16MB of KVM */
 #define NUM_KERNEL_PTS         (KERNEL_PT_VMDATA + KERNEL_PT_VMDATA_NUM)
 
 pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
@@ -1110,6 +1110,7 @@
 static void
 mini2440_device_register(device_t dev, void *aux) {
        if (device_class(dev) == DV_IFNET) {
+#ifndef MEMORY_DISK_IS_ROOT
                if (bi_rdev != NULL && device_is_a(dev, bi_rdev->devname) ) {
                        booted_device = dev;
                        rootfstype = MOUNT_NFS;
@@ -1117,6 +1118,7 @@
                                booted_kernel = bi_path->bootpath;
                        }
                }
+#endif
                if (bi_net != NULL && device_is_a(dev, bi_net->devname)) {
                        prop_data_t pd;
                        pd = prop_data_create_data_nocopy(bi_net->mac_address, ETHER_ADDR_LEN);
@@ -1128,6 +1130,7 @@
                        bi_net = NULL;
                }
        }
+#ifndef MEMORY_DISK_IS_ROOT
        if (bi_rdev != NULL && device_class(dev) == DV_DISK
            && device_is_a(dev, bi_rdev->devname)
            && device_unit(dev) == bi_rdev->cookie) {
@@ -1138,4 +1141,5 @@
                        booted_kernel = bi_path->bootpath;
                }
        }
+#endif
 }



Home | Main Index | Thread Index | Old Index