Module Name: src
Committed By: mhitch
Date: Sun Jul 10 21:02:39 UTC 2011
Modified Files:
src/sys/arch/amiga/amiga: amiga_init.c
src/sys/arch/amiga/stand/bootblock/boot: main.c
src/sys/arch/amiga/stand/loadbsd: loadbsd.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/amiga/amiga/amiga_init.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/amiga/stand/bootblock/boot/main.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/amiga/stand/loadbsd/loadbsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amiga/amiga/amiga_init.c
diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.123 src/sys/arch/amiga/amiga/amiga_init.c:1.124
--- src/sys/arch/amiga/amiga/amiga_init.c:1.123 Sun Jun 12 03:35:38 2011
+++ src/sys/arch/amiga/amiga/amiga_init.c Sun Jul 10 21:02:37 2011
@@ -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;
Index: src/sys/arch/amiga/stand/bootblock/boot/main.c
diff -u src/sys/arch/amiga/stand/bootblock/boot/main.c:1.27 src/sys/arch/amiga/stand/bootblock/boot/main.c:1.28
--- src/sys/arch/amiga/stand/bootblock/boot/main.c:1.27 Sat Jan 22 19:19:16 2011
+++ src/sys/arch/amiga/stand/bootblock/boot/main.c Sun Jul 10 21:02:38 2011
@@ -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;
Index: src/sys/arch/amiga/stand/loadbsd/loadbsd.c
diff -u src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.34 src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.35
--- src/sys/arch/amiga/stand/loadbsd/loadbsd.c:1.34 Wed Oct 21 23:53:38 2009
+++ src/sys/arch/amiga/stand/loadbsd/loadbsd.c Sun Jul 10 21:02:39 2011
@@ -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.