Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/epoc32/epoc32 Support boothowto.
details: https://anonhg.NetBSD.org/src/rev/88bde290e127
branches: trunk
changeset: 787486:88bde290e127
user: kiyohara <kiyohara%NetBSD.org@localhost>
date: Thu Jun 20 13:40:09 2013 +0000
description:
Support boothowto.
diffstat:
sys/arch/epoc32/epoc32/autoconf.c | 8 ++++++--
sys/arch/epoc32/epoc32/machdep.c | 23 +++++++++++++++++++++--
2 files changed, 27 insertions(+), 4 deletions(-)
diffs (92 lines):
diff -r 3123ef2c3eec -r 88bde290e127 sys/arch/epoc32/epoc32/autoconf.c
--- a/sys/arch/epoc32/epoc32/autoconf.c Thu Jun 20 13:36:48 2013 +0000
+++ b/sys/arch/epoc32/epoc32/autoconf.c Thu Jun 20 13:40:09 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */
+/* $NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */
/*
* Copyright (c) 2013 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $");
#include <sys/systm.h>
#include <sys/types.h>
@@ -71,4 +71,8 @@
prop_dictionary_set_uint32(dict, "height", epoc32_fb_height);
prop_dictionary_set_uint32(dict, "addr", epoc32_fb_addr);
}
+
+ if (booted_device == NULL)
+ if (device_is_a(dev, "wd"))
+ booted_device = dev;
}
diff -r 3123ef2c3eec -r 88bde290e127 sys/arch/epoc32/epoc32/machdep.c
--- a/sys/arch/epoc32/epoc32/machdep.c Thu Jun 20 13:36:48 2013 +0000
+++ b/sys/arch/epoc32/epoc32/machdep.c Thu Jun 20 13:40:09 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */
+/* $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */
/*
* Copyright (c) 2012, 2013 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $");
#include "clpscom.h"
#include "clpslcd.h"
@@ -84,6 +84,7 @@
BootConfig bootconfig; /* Boot config storage */
+static char bootargs[256];
char *boot_args = NULL;
vm_offset_t physical_start;
@@ -170,6 +171,7 @@
struct btinfo_model *model = NULL;
struct btinfo_memory *memory = NULL;
struct btinfo_video *video = NULL;
+ struct btinfo_bootargs *args = NULL;
u_int l1pagetable, _end_physical;
int loop, loop1, n, i;
@@ -211,6 +213,20 @@
epoc32_fb_width = video->width;
epoc32_fb_height = video->height;
break;
+
+ case BTINFO_BOOTARGS:
+ args = (struct btinfo_bootargs *)btinfo;
+ btinfo = &(args + 1)->common;
+ memcpy(bootargs, args->bootargs,
+ min(sizeof(bootargs), sizeof(args->bootargs)));
+ bootargs[sizeof(bootargs) - 1] = '\0';
+ boot_args = bootargs;
+ break;
+
+ default:
+#define NEXT_BOOTINFO(bi) (struct btinfo_common *)((char *)bi + (bi)->len)
+
+ btinfo = NEXT_BOOTINFO(btinfo);
}
}
if (bootconfig.dramblocks == 0)
@@ -218,6 +234,9 @@
consinit();
+ if (boot_args != NULL)
+ parse_mi_bootargs(boot_args);
+
physical_start = bootconfig.dram[0].address;
physical_freestart = bootconfig.dram[0].address;
physical_freeend = KERNEL_TEXT_BASE;
Home |
Main Index |
Thread Index |
Old Index