/* -*- linux-c -*- ------------------------------------------------------- *1*2* Copyright (C) 1991, 1992 Linus Torvalds3* Copyright 2007 rPath, Inc. - All Rights Reserved4* Copyright 2009 Intel Corporation; author H. Peter Anvin5*6* This file is part of the Linux kernel, and is made available under7* the terms of the GNU General Public License version 2.8*9* ----------------------------------------------------------------------- */1011/*12* Get the MCA system description table13*/1415#include "boot.h"1617int query_mca(void)18{19struct biosregs ireg, oreg;20u16 len;2122initregs(&ireg);23ireg.ah = 0xc0;24intcall(0x15, &ireg, &oreg);2526if (oreg.eflags & X86_EFLAGS_CF)27return -1; /* No MCA present */2829set_fs(oreg.es);30len = rdfs16(oreg.bx);3132if (len > sizeof(boot_params.sys_desc_table))33len = sizeof(boot_params.sys_desc_table);3435copy_from_fs(&boot_params.sys_desc_table, oreg.bx, len);36return 0;37}383940