Add a stub driver to consume the PnP "system resource" items, and hide

them in the !bootverbose case.
This commit is contained in:
Mike Smith 2000-06-23 08:18:53 +00:00
parent 2a50a6d730
commit 49b66ff559
4 changed files with 196 additions and 0 deletions

View File

@ -62,6 +62,7 @@
#include <machine/mpapic.h>
#endif
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
@ -455,3 +456,51 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{
return (inthand_remove(ih));
}
/*
* Placeholder which claims PnP 'devices' which describe system
* resources.
*/
static struct isa_pnp_id sysresource_ids[] = {
{ 0x010cd041 /* PNP0c01 */, "System Memory" },
{ 0x020cd041 /* PNP0c02 */, "System Resource" },
{ 0 }
};
static int
sysresource_probe(device_t dev)
{
int result;
if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) {
device_quiet(dev);
}
return(result);
}
static int
sysresource_attach(device_t dev)
{
return(0);
}
static device_method_t sysresource_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, sysresource_probe),
DEVMETHOD(device_attach, sysresource_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};
static driver_t sysresource_driver = {
"sysresource",
sysresource_methods,
1, /* no softc */
};
static devclass_t sysresource_devclass;
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);

View File

@ -62,6 +62,7 @@
#include <machine/mpapic.h>
#endif
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
@ -455,3 +456,51 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{
return (inthand_remove(ih));
}
/*
* Placeholder which claims PnP 'devices' which describe system
* resources.
*/
static struct isa_pnp_id sysresource_ids[] = {
{ 0x010cd041 /* PNP0c01 */, "System Memory" },
{ 0x020cd041 /* PNP0c02 */, "System Resource" },
{ 0 }
};
static int
sysresource_probe(device_t dev)
{
int result;
if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) {
device_quiet(dev);
}
return(result);
}
static int
sysresource_attach(device_t dev)
{
return(0);
}
static device_method_t sysresource_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, sysresource_probe),
DEVMETHOD(device_attach, sysresource_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};
static driver_t sysresource_driver = {
"sysresource",
sysresource_methods,
1, /* no softc */
};
static devclass_t sysresource_devclass;
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);

View File

@ -62,6 +62,7 @@
#include <machine/mpapic.h>
#endif
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
@ -455,3 +456,51 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{
return (inthand_remove(ih));
}
/*
* Placeholder which claims PnP 'devices' which describe system
* resources.
*/
static struct isa_pnp_id sysresource_ids[] = {
{ 0x010cd041 /* PNP0c01 */, "System Memory" },
{ 0x020cd041 /* PNP0c02 */, "System Resource" },
{ 0 }
};
static int
sysresource_probe(device_t dev)
{
int result;
if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) {
device_quiet(dev);
}
return(result);
}
static int
sysresource_attach(device_t dev)
{
return(0);
}
static device_method_t sysresource_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, sysresource_probe),
DEVMETHOD(device_attach, sysresource_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};
static driver_t sysresource_driver = {
"sysresource",
sysresource_methods,
1, /* no softc */
};
static devclass_t sysresource_devclass;
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);

View File

@ -62,6 +62,7 @@
#include <machine/mpapic.h>
#endif
#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
@ -455,3 +456,51 @@ nexus_teardown_intr(device_t dev, device_t child, struct resource *r, void *ih)
{
return (inthand_remove(ih));
}
/*
* Placeholder which claims PnP 'devices' which describe system
* resources.
*/
static struct isa_pnp_id sysresource_ids[] = {
{ 0x010cd041 /* PNP0c01 */, "System Memory" },
{ 0x020cd041 /* PNP0c02 */, "System Resource" },
{ 0 }
};
static int
sysresource_probe(device_t dev)
{
int result;
if ((result = ISA_PNP_PROBE(device_get_parent(dev), dev, sysresource_ids)) <= 0) {
device_quiet(dev);
}
return(result);
}
static int
sysresource_attach(device_t dev)
{
return(0);
}
static device_method_t sysresource_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, sysresource_probe),
DEVMETHOD(device_attach, sysresource_attach),
DEVMETHOD(device_detach, bus_generic_detach),
DEVMETHOD(device_shutdown, bus_generic_shutdown),
DEVMETHOD(device_suspend, bus_generic_suspend),
DEVMETHOD(device_resume, bus_generic_resume),
{ 0, 0 }
};
static driver_t sysresource_driver = {
"sysresource",
sysresource_methods,
1, /* no softc */
};
static devclass_t sysresource_devclass;
DRIVER_MODULE(sysresource, isa, sysresource_driver, sysresource_devclass, 0, 0);