xref: /freebsd/sys/x86/include/mca.h (revision f2e3bfc0745666a107d8bf41485213bac9cc08ea)
15ecdb3c4SJohn Baldwin /*-
25ecdb3c4SJohn Baldwin  * Copyright (c) 2009 Advanced Computing Technologies LLC
35ecdb3c4SJohn Baldwin  * Written by: John H. Baldwin <jhb@FreeBSD.org>
45ecdb3c4SJohn Baldwin  * All rights reserved.
55ecdb3c4SJohn Baldwin  *
65ecdb3c4SJohn Baldwin  * Redistribution and use in source and binary forms, with or without
75ecdb3c4SJohn Baldwin  * modification, are permitted provided that the following conditions
85ecdb3c4SJohn Baldwin  * are met:
95ecdb3c4SJohn Baldwin  * 1. Redistributions of source code must retain the above copyright
105ecdb3c4SJohn Baldwin  *    notice, this list of conditions and the following disclaimer.
115ecdb3c4SJohn Baldwin  * 2. Redistributions in binary form must reproduce the above copyright
125ecdb3c4SJohn Baldwin  *    notice, this list of conditions and the following disclaimer in the
135ecdb3c4SJohn Baldwin  *    documentation and/or other materials provided with the distribution.
145ecdb3c4SJohn Baldwin  *
155ecdb3c4SJohn Baldwin  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
165ecdb3c4SJohn Baldwin  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
175ecdb3c4SJohn Baldwin  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
185ecdb3c4SJohn Baldwin  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
195ecdb3c4SJohn Baldwin  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
205ecdb3c4SJohn Baldwin  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
215ecdb3c4SJohn Baldwin  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
225ecdb3c4SJohn Baldwin  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
235ecdb3c4SJohn Baldwin  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
245ecdb3c4SJohn Baldwin  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
255ecdb3c4SJohn Baldwin  * SUCH DAMAGE.
265ecdb3c4SJohn Baldwin  *
275ecdb3c4SJohn Baldwin  * $FreeBSD$
285ecdb3c4SJohn Baldwin  */
295ecdb3c4SJohn Baldwin 
305ecdb3c4SJohn Baldwin #ifndef __X86_MCA_H__
315ecdb3c4SJohn Baldwin #define	__X86_MCA_H__
325ecdb3c4SJohn Baldwin 
335ecdb3c4SJohn Baldwin struct mca_record {
345ecdb3c4SJohn Baldwin 	uint64_t	mr_status;
355ecdb3c4SJohn Baldwin 	uint64_t	mr_addr;
365ecdb3c4SJohn Baldwin 	uint64_t	mr_misc;
375ecdb3c4SJohn Baldwin 	uint64_t	mr_tsc;
385ecdb3c4SJohn Baldwin 	int		mr_apic_id;
395ecdb3c4SJohn Baldwin 	int		mr_bank;
405ecdb3c4SJohn Baldwin 	uint64_t	mr_mcg_cap;
415ecdb3c4SJohn Baldwin 	uint64_t	mr_mcg_status;
425ecdb3c4SJohn Baldwin 	int		mr_cpu_id;
435ecdb3c4SJohn Baldwin 	int		mr_cpu_vendor_id;
445ecdb3c4SJohn Baldwin 	int		mr_cpu;
455ecdb3c4SJohn Baldwin };
465ecdb3c4SJohn Baldwin 
475ecdb3c4SJohn Baldwin #ifdef _KERNEL
485ecdb3c4SJohn Baldwin 
495ecdb3c4SJohn Baldwin void	cmc_intr(void);
505ecdb3c4SJohn Baldwin void	mca_init(void);
51*f2e3bfc0SJohn Baldwin void	mca_intr(void);
525ecdb3c4SJohn Baldwin void	mca_resume(void);
535ecdb3c4SJohn Baldwin 
545ecdb3c4SJohn Baldwin #endif
555ecdb3c4SJohn Baldwin 
565ecdb3c4SJohn Baldwin #endif /* !__X86_MCA_H__ */
57