Add a stub driver to consume the PnP "system resource" items, and hide
them in the !bootverbose case.
This commit is contained in:
parent
2a50a6d730
commit
49b66ff559
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user