Define some optional routines that will help device_register() to
register ISA & PCI devices. Add stub implementations of the routines.
This commit is contained in:
parent
27ae6db87b
commit
848492afca
|
@ -0,0 +1,3 @@
|
|||
/* $NetBSD: autoconf.h,v 1.3 2011/10/18 23:25:20 dyoung Exp $ */
|
||||
|
||||
#include <x86/autoconf.h>
|
|
@ -0,0 +1,3 @@
|
|||
/* $NetBSD: autoconf.h,v 1.3 2011/10/18 23:25:20 dyoung Exp $ */
|
||||
|
||||
#include <x86/autoconf.h>
|
|
@ -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_ */
|
|
@ -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 @@ x86_nullop(void)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue