1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * machines.h: Defines for taking apart the machine type value in the 4*4882a593Smuzhiyun * idprom and determining the kind of machine we are on. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 7*4882a593Smuzhiyun */ 8*4882a593Smuzhiyun #ifndef _SPARC_MACHINES_H 9*4882a593Smuzhiyun #define _SPARC_MACHINES_H 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun struct Sun_Machine_Models { 12*4882a593Smuzhiyun char *name; 13*4882a593Smuzhiyun unsigned char id_machtype; 14*4882a593Smuzhiyun }; 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun /* The machine type in the idprom area looks like this: 17*4882a593Smuzhiyun * 18*4882a593Smuzhiyun * --------------- 19*4882a593Smuzhiyun * | ARCH | MACH | 20*4882a593Smuzhiyun * --------------- 21*4882a593Smuzhiyun * 7 4 3 0 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * The ARCH field determines the architecture line (sun4m, etc). 24*4882a593Smuzhiyun * The MACH field determines the machine make within that architecture. 25*4882a593Smuzhiyun */ 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #define SM_ARCH_MASK 0xf0 28*4882a593Smuzhiyun #define M_LEON 0x30 29*4882a593Smuzhiyun #define SM_SUN4M 0x70 30*4882a593Smuzhiyun #define SM_SUN4M_OBP 0x80 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun #define SM_TYP_MASK 0x0f 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun /* Leon machines */ 35*4882a593Smuzhiyun #define M_LEON3_SOC 0x02 /* Leon3 SoC */ 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun /* Sun4m machines, these predate the OpenBoot. These values only mean 38*4882a593Smuzhiyun * something if the value in the ARCH field is SM_SUN4M, if it is 39*4882a593Smuzhiyun * SM_SUN4M_OBP then you have the following situation: 40*4882a593Smuzhiyun * 1) You either have a sun4d, a sun4e, or a recently made sun4m. 41*4882a593Smuzhiyun * 2) You have to consult OpenBoot to determine which machine this is. 42*4882a593Smuzhiyun */ 43*4882a593Smuzhiyun #define SM_4M_SS60 0x01 /* Sun4m SparcSystem 600 */ 44*4882a593Smuzhiyun #define SM_4M_SS50 0x02 /* Sun4m SparcStation 10 */ 45*4882a593Smuzhiyun #define SM_4M_SS40 0x03 /* Sun4m SparcStation 5 */ 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun /* Sun4d machines -- N/A */ 48*4882a593Smuzhiyun /* Sun4e machines -- N/A */ 49*4882a593Smuzhiyun /* Sun4u machines -- N/A */ 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun #endif /* !(_SPARC_MACHINES_H) */ 52