00001 /* 00002 * Copyright (C) 2005 Jakub Jermar 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 00009 * - Redistributions of source code must retain the above copyright 00010 * notice, this list of conditions and the following disclaimer. 00011 * - Redistributions in binary form must reproduce the above copyright 00012 * notice, this list of conditions and the following disclaimer in the 00013 * documentation and/or other materials provided with the distribution. 00014 * - The name of the author may not be used to endorse or promote products 00015 * derived from this software without specific prior written permission. 00016 * 00017 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00018 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00019 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00020 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00022 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00024 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00025 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00026 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 */ 00028 00035 #ifndef __sparc64_REGISTER_H__ 00036 #define __sparc64_REGISTER_H__ 00037 00038 #include <arch/types.h> 00039 00041 union ver_reg { 00042 __u64 value; 00043 struct { 00044 __u16 manuf; 00045 __u16 impl; 00046 __u8 mask; 00047 unsigned : 8; 00048 __u8 maxtl; 00049 unsigned : 3; 00050 unsigned maxwin : 5; 00051 } __attribute__ ((packed)); 00052 }; 00053 typedef union ver_reg ver_reg_t; 00054 00056 union pstate_reg { 00057 __u64 value; 00058 struct { 00059 __u64 : 52; 00060 unsigned ig : 1; 00061 unsigned mg : 1; 00062 unsigned cle : 1; 00063 unsigned tle : 1; 00064 unsigned mm : 2; 00065 unsigned red : 1; 00066 unsigned pef : 1; 00067 unsigned am : 1; 00068 unsigned priv : 1; 00069 unsigned ie : 1; 00070 unsigned ag : 1; 00071 } __attribute__ ((packed)); 00072 }; 00073 typedef union pstate_reg pstate_reg_t; 00074 00076 union tick_reg { 00077 __u64 value; 00078 struct { 00079 unsigned npt : 1; 00080 __u64 counter : 63; 00081 } __attribute__ ((packed)); 00082 }; 00083 typedef union tick_reg tick_reg_t; 00084 00086 union tick_compare_reg { 00087 __u64 value; 00088 struct { 00089 unsigned int_dis : 1; 00090 __u64 tick_cmpr : 63; 00091 } __attribute__ ((packed)); 00092 }; 00093 typedef union tick_compare_reg tick_compare_reg_t; 00094 00096 union softint_reg { 00097 __u64 value; 00098 struct { 00099 __u64 : 47; 00100 unsigned stick_int : 1; 00101 unsigned int_level : 15; 00102 unsigned tick_int : 1; 00103 } __attribute__ ((packed)); 00104 }; 00105 typedef union softint_reg softint_reg_t; 00106 00107 #endif 00108