Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Define some optional routines that will help device...
details: https://anonhg.NetBSD.org/src/rev/a7d078b6c219
branches: trunk
changeset: 770489:a7d078b6c219
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue Oct 18 23:25:20 2011 +0000
description:
Define some optional routines that will help device_register() to
register ISA & PCI devices. Add stub implementations of the routines.
diffstat:
sys/arch/amd64/include/autoconf.h | 3 +++
sys/arch/i386/include/autoconf.h | 3 +++
sys/arch/x86/include/autoconf.h | 11 +++++++++++
sys/arch/x86/x86/x86_stub.c | 22 +++++++++++++++++-----
4 files changed, 34 insertions(+), 5 deletions(-)
diffs (72 lines):
diff -r 6fdb98b5c355 -r a7d078b6c219 sys/arch/amd64/include/autoconf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amd64/include/autoconf.h Tue Oct 18 23:25:20 2011 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: autoconf.h,v 1.3 2011/10/18 23:25:20 dyoung Exp $ */
+
+#include <x86/autoconf.h>
diff -r 6fdb98b5c355 -r a7d078b6c219 sys/arch/i386/include/autoconf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/i386/include/autoconf.h Tue Oct 18 23:25:20 2011 +0000
@@ -0,0 +1,3 @@
+/* $NetBSD: autoconf.h,v 1.3 2011/10/18 23:25:20 dyoung Exp $ */
+
+#include <x86/autoconf.h>
diff -r 6fdb98b5c355 -r a7d078b6c219 sys/arch/x86/include/autoconf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/x86/include/autoconf.h Tue Oct 18 23:25:20 2011 +0000
@@ -0,0 +1,11 @@
+/* $NetBSD: autoconf.h,v 1.3 2011/10/18 23:25:20 dyoung Exp $ */
+#ifndef _X86_AUTOCONF_H_
+#define _X86_AUTOCONF_H_
+
+#include <sys/device.h>
+
+void device_pci_props_register(device_t, void *);
+device_t device_pci_register(device_t, void *);
+device_t device_isa_register(device_t, void *);
+
+#endif /* _X86_AUTOCONF_H_ */
diff -r 6fdb98b5c355 -r a7d078b6c219 sys/arch/x86/x86/x86_stub.c
--- a/sys/arch/x86/x86/x86_stub.c Tue Oct 18 23:23:20 2011 +0000
+++ b/sys/arch/x86/x86/x86_stub.c Tue Oct 18 23:25:20 2011 +0000
@@ -1,13 +1,16 @@
-/* $NetBSD: x86_stub.c,v 1.1 2011/04/03 22:29:27 dyoung Exp $ */
+/* $NetBSD: x86_stub.c,v 1.2 2011/10/18 23:25:20 dyoung Exp $ */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_stub.c,v 1.1 2011/04/03 22:29:27 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_stub.c,v 1.2 2011/10/18 23:25:20 dyoung Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kgdb.h>
+#include <machine/autoconf.h>
+
int x86_nullop(void);
+void *x86_zeroop(void);
void x86_voidop(void);
void
@@ -21,8 +24,17 @@
return 0;
}
-__weak_alias(kdb_trap, x86_nullop);
-__weak_alias(kgdb_disconnected, x86_nullop);
-__weak_alias(kgdb_trap, x86_nullop);
+void *
+x86_zeroop(void)
+{
+ return NULL;
+}
+
+__weak_alias(device_pci_props_register, x86_voidop);
+__weak_alias(device_pci_register, x86_nullop);
+__weak_alias(device_isa_register, x86_nullop);
+__weak_alias(kdb_trap, x86_zeroop);
+__weak_alias(kgdb_disconnected, x86_zeroop);
+__weak_alias(kgdb_trap, x86_zeroop);
__weak_alias(mca_nmi, x86_voidop);
__weak_alias(x86_nmi, x86_voidop);
Home |
Main Index |
Thread Index |
Old Index