From 589c1074195e19ad2d0600832362007b228ce975 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Mon, 10 Mar 2008 18:04:34 +0100 Subject: [PATCH] --- yaml --- r: 87137 b: refs/heads/master c: f5dbb55b995b77d396fe2204495a0af3e24d28c2 h: refs/heads/master i: 87135: 9bf33bc47a5d4712fae0d5a037070f29f42c02b1 v: v3 --- [refs] | 2 +- trunk/arch/x86/pci/pcbios.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e7773f1aafa4..5f963cd0eb25 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: effe008d276f52674d5352deefb68ec409a5ef9b +refs/heads/master: f5dbb55b995b77d396fe2204495a0af3e24d28c2 diff --git a/trunk/arch/x86/pci/pcbios.c b/trunk/arch/x86/pci/pcbios.c index 10ac8c316c46..2f7109ac4c15 100644 --- a/trunk/arch/x86/pci/pcbios.c +++ b/trunk/arch/x86/pci/pcbios.c @@ -198,6 +198,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, "b" (bx), "D" ((long)reg), "S" (&pci_indirect)); + /* + * Zero-extend the result beyond 8 bits, do not trust the + * BIOS having done it: + */ + *value &= 0xff; break; case 2: __asm__("lcall *(%%esi); cld\n\t" @@ -210,6 +215,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, "b" (bx), "D" ((long)reg), "S" (&pci_indirect)); + /* + * Zero-extend the result beyond 16 bits, do not trust the + * BIOS having done it: + */ + *value &= 0xffff; break; case 4: __asm__("lcall *(%%esi); cld\n\t"