Home | History | Annotate | Line # | Download | only in include
cpu_msr.h revision 1.4.18.1
      1  1.4.18.1    joerg /* $NetBSD: cpu_msr.h,v 1.4.18.1 2007/10/07 13:25:01 joerg Exp $ */
      2       1.1  xtraeme 
      3       1.1  xtraeme /*-
      4  1.4.18.1    joerg  * Copyright (c) 2007 Juan Romero Pardines.
      5       1.1  xtraeme  * All rights reserved.
      6       1.1  xtraeme  *
      7       1.1  xtraeme  * Redistribution and use in source and binary forms, with or without
      8       1.1  xtraeme  * modification, are permitted provided that the following conditions
      9       1.1  xtraeme  * are met:
     10       1.1  xtraeme  * 1. Redistributions of source code must retain the above copyright
     11       1.1  xtraeme  *    notice, this list of conditions and the following disclaimer.
     12       1.1  xtraeme  * 2. Redistributions in binary form must reproduce the above copyright
     13       1.1  xtraeme  *    notice, this list of conditions and the following disclaimer in the
     14       1.1  xtraeme  *    documentation and/or other materials provided with the distribution.
     15       1.1  xtraeme  *
     16  1.4.18.1    joerg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.4.18.1    joerg  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.4.18.1    joerg  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.4.18.1    joerg  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.4.18.1    joerg  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  1.4.18.1    joerg  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  1.4.18.1    joerg  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  1.4.18.1    joerg  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  1.4.18.1    joerg  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  1.4.18.1    joerg  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26       1.1  xtraeme  */
     27       1.1  xtraeme 
     28       1.1  xtraeme #ifndef _X86_CPU_MSR_H
     29       1.1  xtraeme #define _X86_CPU_MSR_H
     30       1.1  xtraeme 
     31       1.1  xtraeme #include <sys/param.h>
     32       1.1  xtraeme #include <machine/cpu.h>
     33       1.1  xtraeme 
     34       1.1  xtraeme #ifdef _KERNEL
     35       1.1  xtraeme 
     36       1.1  xtraeme struct msr_cpu_broadcast {
     37       1.4  xtraeme 	int msr_read;
     38       1.1  xtraeme 	int msr_type;
     39       1.1  xtraeme 	uint64_t msr_value;
     40       1.1  xtraeme 	uint64_t msr_mask;
     41       1.1  xtraeme };
     42       1.1  xtraeme 
     43       1.1  xtraeme void		x86_init(void);
     44       1.1  xtraeme void		msr_write_ipi(struct cpu_info *);
     45       1.1  xtraeme void		msr_cpu_broadcast_initmtx(void);
     46       1.2  xtraeme void		msr_cpu_broadcast(struct msr_cpu_broadcast *);
     47       1.1  xtraeme 
     48       1.1  xtraeme #endif /* ! _KERNEL */
     49       1.1  xtraeme 
     50       1.1  xtraeme #endif /* ! _X86_CPU_MSR_H */
     51