summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-03-31 07:07:51 +0000
committerdfr <dfr@FreeBSD.org>2000-03-31 07:07:51 +0000
commitaea8b08fa18ef48a106505cf730160aaebac4995 (patch)
treeda42818eaa92c863768811eed261af422ba4c2dc
parent6bfa82197293277c159c079f65b8a9fcfd79f7d7 (diff)
downloadFreeBSD-src-aea8b08fa18ef48a106505cf730160aaebac4995.zip
FreeBSD-src-aea8b08fa18ef48a106505cf730160aaebac4995.tar.gz
Fix PnP memory range calculations.
Submitted by: Nikolai Saoukh <nms@Brigada-A.Ethereal.RU> PR: kern/16712
-rw-r--r--sys/isa/pnpparse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/isa/pnpparse.c b/sys/isa/pnpparse.c
index e513662..8782def 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)
OpenPOWER on IntegriCloud