Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/arch/sparc64 Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/9e1911938952
branches: netbsd-7
changeset: 799583:9e1911938952
user: martin <martin%NetBSD.org@localhost>
date: Fri Sep 04 14:43:45 2015 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #951):
sys/arch/sparc64/dev/pckbc_ebus.c: revision 1.2
sys/arch/sparc64/sparc64/autoconf.c: revision 1.204
Detect a boot device more precisely on QEMU by checking the device
name.
pckbc@ebus: match "kb_ps2" device to make keyboard and mouse work
on qemu-sparc64.
XXX OpenBIOS doesn't provide interrupts for pckbc currently, so use
the interrupt numbers described in QEMU's hw/sparc64/sun4u.c::isa_irq_handler.
diffstat:
sys/arch/sparc64/dev/pckbc_ebus.c | 31 ++++++++++++++++++++++++++-----
sys/arch/sparc64/sparc64/autoconf.c | 7 ++++---
2 files changed, 30 insertions(+), 8 deletions(-)
diffs (94 lines):
diff -r 5fa0ac1a66da -r 9e1911938952 sys/arch/sparc64/dev/pckbc_ebus.c
--- a/sys/arch/sparc64/dev/pckbc_ebus.c Thu Sep 03 03:31:53 2015 +0000
+++ b/sys/arch/sparc64/dev/pckbc_ebus.c Fri Sep 04 14:43:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pckbc_ebus.c,v 1.1 2012/10/09 20:55:04 jdc Exp $ */
+/* $NetBSD: pckbc_ebus.c,v 1.1.16.1 2015/09/04 14:43:45 martin Exp $ */
/*
* Copyright (c) 2002 Valeriy E. Ushakov
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pckbc_ebus.c,v 1.1 2012/10/09 20:55:04 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_ebus.c,v 1.1.16.1 2015/09/04 14:43:45 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,6 +58,7 @@
static void pckbc_ebus_intr_establish(struct pckbc_softc *, pckbport_slot_t);
#define PCKBC_PROM_DEVICE_NAME "8042"
+#define PCKBC_PROM_DEVICE_NAME2 "kb_ps2"
CFATTACH_DECL_NEW(pckbc_ebus, sizeof(struct pckbc_ebus_softc),
pckbc_ebus_match, pckbc_ebus_attach, NULL, NULL);
@@ -68,7 +69,10 @@
{
struct ebus_attach_args *ea = aux;
- return (strcmp(ea->ea_name, PCKBC_PROM_DEVICE_NAME) == 0);
+ if (strcmp(ea->ea_name, PCKBC_PROM_DEVICE_NAME) == 0 ||
+ strcmp(ea->ea_name, PCKBC_PROM_DEVICE_NAME2) == 0)
+ return 1;
+ return 0;
}
static void
@@ -98,8 +102,25 @@
psc->intr_establish = pckbc_ebus_intr_establish;
- for (i = 0; i < PCKBC_NSLOTS; i++)
- sc->psc_intr[i] = ea->ea_intr[i];
+ if (ea->ea_nintr < PCKBC_NSLOTS) {
+ aprint_error(": no intr %d", ea->ea_nintr);
+
+ /*
+ * XXX OpenBIOS doesn't provide interrupts for pckbc
+ * currently, so use the interrupt numbers described in
+ * QEMU's hw/sparc64/sun4u.c::isa_irq_handler.
+ */
+ if (strcmp(machine_model, "OpenBiosTeam,OpenBIOS") == 0) {
+ sc->psc_intr[PCKBC_KBD_SLOT] = 0x29;
+ sc->psc_intr[PCKBC_AUX_SLOT] = 0x2a;
+ } else {
+ aprint_error("\n");
+ return;
+ }
+ } else {
+ for (i = 0; i < PCKBC_NSLOTS; i++)
+ sc->psc_intr[i] = ea->ea_intr[i];
+ }
if (isconsole) {
int status;
diff -r 5fa0ac1a66da -r 9e1911938952 sys/arch/sparc64/sparc64/autoconf.c
--- a/sys/arch/sparc64/sparc64/autoconf.c Thu Sep 03 03:31:53 2015 +0000
+++ b/sys/arch/sparc64/sparc64/autoconf.c Fri Sep 04 14:43:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.198.2.3 2015/07/20 06:12:23 snj Exp $ */
+/* $NetBSD: autoconf.c,v 1.198.2.4 2015/09/04 14:43:45 martin Exp $ */
/*
* Copyright (c) 1996
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.198.2.3 2015/07/20 06:12:23 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.198.2.4 2015/09/04 14:43:45 martin Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -838,7 +838,8 @@
snprintf(buf, sizeof(buf), "%s@w%016" PRIx64 ",%d",
name, wwn, lun);
else if (ide_node)
- snprintf(buf, sizeof(buf), "%s@0", name);
+ snprintf(buf, sizeof(buf), "%s@0",
+ device_is_a(dev, "cd") ? "cdrom" : "disk");
else
snprintf(buf, sizeof(buf), "%s@%d,%d",
name, target, lun);
Home |
Main Index |
Thread Index |
Old Index