Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga Add a serial console flag passed from the boo...
details: https://anonhg.NetBSD.org/src/rev/f9167ed498bd
branches: trunk
changeset: 767184:f9167ed498bd
user: mhitch <mhitch%NetBSD.org@localhost>
date: Sun Jul 10 21:02:37 2011 +0000
description:
Add a serial console flag passed from the boot loader to the kernel to
allow enabling the serial console with the boot command. Loadbsd has
the option added, but I am not able to buid a new loadbsd binary at this
time, so only the bootxx loader can set the option.
diffstat:
sys/arch/amiga/amiga/amiga_init.c | 13 +++++++++++--
sys/arch/amiga/stand/bootblock/boot/main.c | 5 ++++-
sys/arch/amiga/stand/loadbsd/loadbsd.c | 10 +++++++---
3 files changed, 22 insertions(+), 6 deletions(-)
diffs (108 lines):
diff -r b79cb499e98e -r f9167ed498bd sys/arch/amiga/amiga/amiga_init.c
--- a/sys/arch/amiga/amiga/amiga_init.c Sun Jul 10 20:01:37 2011 +0000
+++ b/sys/arch/amiga/amiga/amiga_init.c Sun Jul 10 21:02:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amiga_init.c,v 1.123 2011/06/12 03:35:38 rmind Exp $ */
+/* $NetBSD: amiga_init.c,v 1.124 2011/07/10 21:02:37 mhitch Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -35,9 +35,10 @@
#include "opt_p5ppc68kboard.h"
#include "opt_devreload.h"
#include "opt_m68k_arch.h"
+#include "ser.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.123 2011/06/12 03:35:38 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.124 2011/07/10 21:02:37 mhitch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -83,6 +84,10 @@
extern u_long aga_enable;
#endif
+#if NSER > 0
+extern int serconsole;
+#endif
+
extern u_long noncontig_enable;
/*
@@ -257,6 +262,10 @@
#endif
if (flags & (3 << 1))
RELOC(noncontig_enable, u_long) = (flags >> 1) & 3;
+#if NSER > 0
+ if (flags & (1 << 3))
+ RELOC(serconsole, int) = 0;
+#endif
RELOC(scsi_nosync, u_long) = inh_sync;
diff -r b79cb499e98e -r f9167ed498bd sys/arch/amiga/stand/bootblock/boot/main.c
--- a/sys/arch/amiga/stand/bootblock/boot/main.c Sun Jul 10 20:01:37 2011 +0000
+++ b/sys/arch/amiga/stand/bootblock/boot/main.c Sun Jul 10 21:02:37 2011 +0000
@@ -1,5 +1,5 @@
/*
- * $NetBSD: main.c,v 1.27 2011/01/22 19:19:16 joerg Exp $
+ * $NetBSD: main.c,v 1.28 2011/07/10 21:02:38 mhitch Exp $
*
*
* Copyright (c) 1996,1999 Ignatios Souvatzis
@@ -217,6 +217,9 @@
case 'A': /* enable AGA modes */
amiga_flags |= 1;
break;
+ case 'C': /* Serial Console */
+ amiga_flags |= (1 << 3);
+ break;
case 'D': /* enter Debugger */
boothowto |= RB_KDB;
break;
diff -r b79cb499e98e -r f9167ed498bd sys/arch/amiga/stand/loadbsd/loadbsd.c
--- a/sys/arch/amiga/stand/loadbsd/loadbsd.c Sun Jul 10 20:01:37 2011 +0000
+++ b/sys/arch/amiga/stand/loadbsd/loadbsd.c Sun Jul 10 21:02:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: loadbsd.c,v 1.34 2009/10/21 23:53:38 snj Exp $ */
+/* $NetBSD: loadbsd.c,v 1.35 2011/07/10 21:02:39 mhitch Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -198,7 +198,7 @@
if ((ExpansionBase=(void *)OpenLibrary(EXPANSIONNAME, 0)) == NULL)
err(20, "can't open expansion library");
- while ((ch = getopt(argc, argv, "aAbc:DhI:km:n:qptsSvVZ")) != -1) {
+ while ((ch = getopt(argc, argv, "aAbCc:DhI:km:n:qptsSvVZ")) != -1) {
switch (ch) {
case 'k':
k_flag = 1;
@@ -251,6 +251,9 @@
else
err(20, "-n option must be 0, 1, 2, or 3");
break;
+ case 'C':
+ amiga_flags |= (1 << 3);
+ break;
case 'I':
I_flag = strtoul(optarg, NULL, 16);
break;
@@ -835,7 +838,7 @@
void
usage(void)
{
- fprintf(stderr, "usage: %s [-abhkpstADSVZ] [-c machine] [-m mem] [-n mode] [-I sync-inhibit] kernel\n",
+ fprintf(stderr, "usage: %s [-abhkpstACDSVZ] [-c machine] [-m mem] [-n mode] [-I sync-inhibit] kernel\n",
program_name);
exit(1);
}
@@ -854,6 +857,7 @@
\t-b Ask for which root device.
\t Its possible to have multiple roots and choose between them.
\t-c Set machine type. [e.g 3000; use 32000+N for DraCo rev. N]
+\t-C Use Serial Console.
\t-D Enter debugger
\t-h This help message.
\t-I Inhibit sync negotiation. Option value is bit-encoded targets.
Home |
Main Index |
Thread Index |
Old Index