diff options
author | dfr <dfr@FreeBSD.org> | 1999-10-14 21:03:03 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-10-14 21:03:03 +0000 |
commit | f7cfef8ecf037d19a81279dcc4e946b79fc3837b (patch) | |
tree | 9cfc808248748600189af9b09481a97025b4b8ce /sys/isa/pnp.c | |
parent | cdedefff3d29174f78d8e07698cec803b5553099 (diff) | |
download | FreeBSD-src-f7cfef8ecf037d19a81279dcc4e946b79fc3837b.zip FreeBSD-src-f7cfef8ecf037d19a81279dcc4e946b79fc3837b.tar.gz |
* Add some verbose logging to the PnP parser and fix a couple of bugs.
* Move pnp_eisaformat() to pnp.c, declared in <isa/pnpvar.h>.
* Turn the pnpbios code into an enumerator for the isa bus. This allows
all devices known to the bios to be probed automatically.
Currently the pnpbios code is dependant on the PNPBIOS option. As the code
is tested more and when more drivers are converted this will be made the
default. I have PnP changes in the wings for fdc, atkbd, psm, pcaudio, and
joy. Sio already works with pnpbios.
Diffstat (limited to 'sys/isa/pnp.c')
-rw-r--r-- | sys/isa/pnp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/isa/pnp.c b/sys/isa/pnp.c index abd79f4..12b5dab 100644 --- a/sys/isa/pnp.c +++ b/sys/isa/pnp.c @@ -90,6 +90,24 @@ static void pnp_send_initiation_key(void); static int pnp_get_serial(pnp_id *p); static int pnp_isolation_protocol(device_t parent); +char * +pnp_eisaformat(u_int32_t id) +{ + u_int8_t *data = (u_int8_t *) &id; + static char idbuf[8]; + const char hextoascii[] = "0123456789abcdef"; + + idbuf[0] = '@' + ((data[0] & 0x7c) >> 2); + idbuf[1] = '@' + (((data[0] & 0x3) << 3) + ((data[1] & 0xe0) >> 5)); + idbuf[2] = '@' + (data[1] & 0x1f); + idbuf[3] = hextoascii[(data[2] >> 4)]; + idbuf[4] = hextoascii[(data[2] & 0xf)]; + idbuf[5] = hextoascii[(data[3] >> 4)]; + idbuf[6] = hextoascii[(data[3] & 0xf)]; + idbuf[7] = 0; + return(idbuf); +} + static void pnp_write(int d, u_char r) { |