Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 639 → Rev 640

/kernel/trunk/arch/sparc64/include/asm.h
85,6 → 85,19
return v;
}
 
/** Read Version Register.
*
* @return Value of VER register.
*/
static inline __u64 ver_read(void)
{
__u64 v;
__asm__ volatile ("rdpr %%ver, %0\n" : "=r" (v));
return v;
}
 
/** Read Trap Base Address register.
*
* @return Current value in TBA.
/kernel/trunk/arch/sparc64/include/register.h
0,0 → 1,49
/*
* Copyright (C) 2005 Jakub Jermar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* - The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
 
#ifndef __sparc64_REGISTER_H__
#define __sparc64_REGISTER_H__
 
#include <arch/types.h>
 
/** Version Register. */
union ver_reg {
__u64 value;
struct {
__u16 manuf; /**< Manufacturer code. */
__u16 impl;
__u8 mask; /**< Mask set revision. */
unsigned : 8;
__u8 maxtl;
unsigned : 3;
unsigned maxwin : 5;
} __attribute__ ((packed));
};
typedef union ver_reg ver_reg_t;
 
#endif
/kernel/trunk/arch/sparc64/include/cpu.h
29,9 → 29,23
#ifndef __sparc64_CPU_H__
#define __sparc64_CPU_H__
 
#include <typedefs.h>
#include <arch/register.h>
 
#define MANUF_FUJITSU 0x04
#define MANUF_ULTRASPARC 0x17 /**< UltraSPARC I, UltraSPARC II */
#define MANUF_SUN 0x3e
 
#define IMPL_ULTRASPARCI 0x10
#define IMPL_ULTRASPARCII 0x11
#define IMPL_ULTRASPARCII_I 0x12
#define IMPL_ULTRASPARCII_E 0x13
#define IMPL_ULTRASPARCIII 0x15
#define IMPL_ULTRASPARCIV_PLUS 0x19
 
#define IMPL_SPARC64V 0x5
 
struct cpu_arch {
ver_reg_t ver;
};
#endif