xref: /freebsd/sys/x86/include/mca.h (revision 5ecdb3c46b1e3c19cfcc6d7ccc186d73a6a60e84)
1*5ecdb3c4SJohn Baldwin /*-
2*5ecdb3c4SJohn Baldwin  * Copyright (c) 2009 Advanced Computing Technologies LLC
3*5ecdb3c4SJohn Baldwin  * Written by: John H. Baldwin <jhb@FreeBSD.org>
4*5ecdb3c4SJohn Baldwin  * All rights reserved.
5*5ecdb3c4SJohn Baldwin  *
6*5ecdb3c4SJohn Baldwin  * Redistribution and use in source and binary forms, with or without
7*5ecdb3c4SJohn Baldwin  * modification, are permitted provided that the following conditions
8*5ecdb3c4SJohn Baldwin  * are met:
9*5ecdb3c4SJohn Baldwin  * 1. Redistributions of source code must retain the above copyright
10*5ecdb3c4SJohn Baldwin  *    notice, this list of conditions and the following disclaimer.
11*5ecdb3c4SJohn Baldwin  * 2. Redistributions in binary form must reproduce the above copyright
12*5ecdb3c4SJohn Baldwin  *    notice, this list of conditions and the following disclaimer in the
13*5ecdb3c4SJohn Baldwin  *    documentation and/or other materials provided with the distribution.
14*5ecdb3c4SJohn Baldwin  *
15*5ecdb3c4SJohn Baldwin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16*5ecdb3c4SJohn Baldwin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*5ecdb3c4SJohn Baldwin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*5ecdb3c4SJohn Baldwin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19*5ecdb3c4SJohn Baldwin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20*5ecdb3c4SJohn Baldwin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21*5ecdb3c4SJohn Baldwin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22*5ecdb3c4SJohn Baldwin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23*5ecdb3c4SJohn Baldwin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24*5ecdb3c4SJohn Baldwin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25*5ecdb3c4SJohn Baldwin  * SUCH DAMAGE.
26*5ecdb3c4SJohn Baldwin  *
27*5ecdb3c4SJohn Baldwin  * $FreeBSD$
28*5ecdb3c4SJohn Baldwin  */
29*5ecdb3c4SJohn Baldwin 
30*5ecdb3c4SJohn Baldwin #ifndef __X86_MCA_H__
31*5ecdb3c4SJohn Baldwin #define	__X86_MCA_H__
32*5ecdb3c4SJohn Baldwin 
33*5ecdb3c4SJohn Baldwin struct mca_record {
34*5ecdb3c4SJohn Baldwin 	uint64_t	mr_status;
35*5ecdb3c4SJohn Baldwin 	uint64_t	mr_addr;
36*5ecdb3c4SJohn Baldwin 	uint64_t	mr_misc;
37*5ecdb3c4SJohn Baldwin 	uint64_t	mr_tsc;
38*5ecdb3c4SJohn Baldwin 	int		mr_apic_id;
39*5ecdb3c4SJohn Baldwin 	int		mr_bank;
40*5ecdb3c4SJohn Baldwin 	uint64_t	mr_mcg_cap;
41*5ecdb3c4SJohn Baldwin 	uint64_t	mr_mcg_status;
42*5ecdb3c4SJohn Baldwin 	int		mr_cpu_id;
43*5ecdb3c4SJohn Baldwin 	int		mr_cpu_vendor_id;
44*5ecdb3c4SJohn Baldwin 	int		mr_cpu;
45*5ecdb3c4SJohn Baldwin };
46*5ecdb3c4SJohn Baldwin 
47*5ecdb3c4SJohn Baldwin #ifdef _KERNEL
48*5ecdb3c4SJohn Baldwin 
49*5ecdb3c4SJohn Baldwin void	cmc_intr(void);
50*5ecdb3c4SJohn Baldwin void	mca_init(void);
51*5ecdb3c4SJohn Baldwin int	mca_intr(void);
52*5ecdb3c4SJohn Baldwin void	mca_resume(void);
53*5ecdb3c4SJohn Baldwin 
54*5ecdb3c4SJohn Baldwin #endif
55*5ecdb3c4SJohn Baldwin 
56*5ecdb3c4SJohn Baldwin #endif /* !__X86_MCA_H__ */
57