aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/pcbios.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/pci/pcbios.c')
-rw-r--r--arch/x86/pci/pcbios.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c
index 10ac8c316c46..2f7109ac4c15 100644
--- a/arch/x86/pci/pcbios.c
+++ b/arch/x86/pci/pcbios.c
@@ -198,6 +198,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
198 "b" (bx), 198 "b" (bx),
199 "D" ((long)reg), 199 "D" ((long)reg),
200 "S" (&pci_indirect)); 200 "S" (&pci_indirect));
201 /*
202 * Zero-extend the result beyond 8 bits, do not trust the
203 * BIOS having done it:
204 */
205 *value &= 0xff;
201 break; 206 break;
202 case 2: 207 case 2:
203 __asm__("lcall *(%%esi); cld\n\t" 208 __asm__("lcall *(%%esi); cld\n\t"
@@ -210,6 +215,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
210 "b" (bx), 215 "b" (bx),
211 "D" ((long)reg), 216 "D" ((long)reg),
212 "S" (&pci_indirect)); 217 "S" (&pci_indirect));
218 /*
219 * Zero-extend the result beyond 16 bits, do not trust the
220 * BIOS having done it:
221 */
222 *value &= 0xffff;
213 break; 223 break;
214 case 4: 224 case 4:
215 __asm__("lcall *(%%esi); cld\n\t" 225 __asm__("lcall *(%%esi); cld\n\t"