diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 16:14:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 16:14:41 -0700 |
commit | bec706838ec2f9c8c2b99e88a1270d7cba159b06 (patch) | |
tree | 96ec3ccbab3596dee79ef874483238853351a4f8 /arch/x86/boot/mca.c | |
parent | bb7762961d3ce745688e9050e914c1d3f980268d (diff) | |
parent | ee0736627d3347be0be2769fa7b26431f9726c9d (diff) | |
download | op-kernel-dev-bec706838ec2f9c8c2b99e88a1270d7cba159b06.zip op-kernel-dev-bec706838ec2f9c8c2b99e88a1270d7cba159b06.tar.gz |
Merge branch 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-setup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, setup: fix comment in the "glove box" code
x86, setup: "glove box" BIOS interrupts in the video code
x86, setup: "glove box" BIOS interrupts in the MCA code
x86, setup: "glove box" BIOS interrupts in the EDD code
x86, setup: "glove box" BIOS interrupts in the APM code
x86, setup: "glove box" BIOS interrupts in the core boot code
x86, setup: "glove box" BIOS calls -- infrastructure
Diffstat (limited to 'arch/x86/boot/mca.c')
-rw-r--r-- | arch/x86/boot/mca.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/arch/x86/boot/mca.c b/arch/x86/boot/mca.c index 911eaae..a95a531 100644 --- a/arch/x86/boot/mca.c +++ b/arch/x86/boot/mca.c @@ -2,6 +2,7 @@ * * Copyright (C) 1991, 1992 Linus Torvalds * Copyright 2007 rPath, Inc. - All Rights Reserved + * Copyright 2009 Intel Corporation; author H. Peter Anvin * * This file is part of the Linux kernel, and is made available under * the terms of the GNU General Public License version 2. @@ -16,26 +17,22 @@ int query_mca(void) { - u8 err; - u16 es, bx, len; - - asm("pushw %%es ; " - "int $0x15 ; " - "setc %0 ; " - "movw %%es, %1 ; " - "popw %%es" - : "=acd" (err), "=acdSD" (es), "=b" (bx) - : "a" (0xc000)); - - if (err) + struct biosregs ireg, oreg; + u16 len; + + initregs(&ireg); + ireg.ah = 0xc0; + intcall(0x15, &ireg, &oreg); + + if (oreg.eflags & X86_EFLAGS_CF) return -1; /* No MCA present */ - set_fs(es); - len = rdfs16(bx); + set_fs(oreg.es); + len = rdfs16(oreg.bx); if (len > sizeof(boot_params.sys_desc_table)) len = sizeof(boot_params.sys_desc_table); - copy_from_fs(&boot_params.sys_desc_table, bx, len); + copy_from_fs(&boot_params.sys_desc_table, oreg.bx, len); return 0; } |