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