diff options
author | Doug Rabson <dfr@FreeBSD.org> | 2000-03-31 07:07:51 +0000 |
---|---|---|
committer | Doug Rabson <dfr@FreeBSD.org> | 2000-03-31 07:07:51 +0000 |
commit | 1f1624dcee25f741ee724b466f4023a18be9a2ea (patch) | |
tree | 9f1453ddf5a7747193b23c1b61932f960f163ad7 /sys/isa/pnpparse.c | |
parent | 26b0377cc1204db9a900149c2d37887531ce7ebe (diff) | |
download | src-1f1624dcee25f741ee724b466f4023a18be9a2ea.tar.gz src-1f1624dcee25f741ee724b466f4023a18be9a2ea.zip |
Fix PnP memory range calculations.
Submitted by: Nikolai Saoukh <nms@Brigada-A.Ethereal.RU>
PR: kern/16712
Notes
Notes:
svn path=/head/; revision=58847
Diffstat (limited to 'sys/isa/pnpparse.c')
-rw-r--r-- | sys/isa/pnpparse.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/isa/pnpparse.c b/sys/isa/pnpparse.c index e513662524eb..8782defe31dd 100644 --- a/sys/isa/pnpparse.c +++ b/sys/isa/pnpparse.c @@ -261,14 +261,15 @@ pnp_parse_resources(device_t dev, u_char *resources, int len) case PNP_TAG_MEMORY_RANGE: if (bootverbose) { + int temp = I16(resinfo + 7) << 8; + printf("%s: adding memory range " "%#x-%#x, size=%#x, " "align=%#x\n", pnp_eisaformat(id), I16(resinfo + 1)<<8, - (I16(resinfo + 3)<<8) - + I16(resinfo + 7) - 1, - I16(resinfo + 7), + (I16(resinfo + 3)<<8) + temp - 1, + temp, I16(resinfo + 5)); } @@ -282,9 +283,9 @@ pnp_parse_resources(device_t dev, u_char *resources, int len) I16(resinfo + 1)<<8; config->ic_mem[config->ic_nmem].ir_end = (I16(resinfo + 3)<<8) - + I16(resinfo + 7) - 1; + + (I16(resinfo + 7) << 8) - 1; config->ic_mem[config->ic_nmem].ir_size = - I16(resinfo + 7); + I16(resinfo + 7) << 8; config->ic_mem[config->ic_nmem].ir_align = I16(resinfo + 5); if (!config->ic_mem[config->ic_nmem].ir_align) |