18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * machines.h: Defines for taking apart the machine type value in the 48c2ecf20Sopenharmony_ci * idprom and determining the kind of machine we are on. 58c2ecf20Sopenharmony_ci * 68c2ecf20Sopenharmony_ci * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _SPARC_MACHINES_H 98c2ecf20Sopenharmony_ci#define _SPARC_MACHINES_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_cistruct Sun_Machine_Models { 128c2ecf20Sopenharmony_ci char *name; 138c2ecf20Sopenharmony_ci unsigned char id_machtype; 148c2ecf20Sopenharmony_ci}; 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* The machine type in the idprom area looks like this: 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * --------------- 198c2ecf20Sopenharmony_ci * | ARCH | MACH | 208c2ecf20Sopenharmony_ci * --------------- 218c2ecf20Sopenharmony_ci * 7 4 3 0 228c2ecf20Sopenharmony_ci * 238c2ecf20Sopenharmony_ci * The ARCH field determines the architecture line (sun4m, etc). 248c2ecf20Sopenharmony_ci * The MACH field determines the machine make within that architecture. 258c2ecf20Sopenharmony_ci */ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#define SM_ARCH_MASK 0xf0 288c2ecf20Sopenharmony_ci#define M_LEON 0x30 298c2ecf20Sopenharmony_ci#define SM_SUN4M 0x70 308c2ecf20Sopenharmony_ci#define SM_SUN4M_OBP 0x80 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#define SM_TYP_MASK 0x0f 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* Leon machines */ 358c2ecf20Sopenharmony_ci#define M_LEON3_SOC 0x02 /* Leon3 SoC */ 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci/* Sun4m machines, these predate the OpenBoot. These values only mean 388c2ecf20Sopenharmony_ci * something if the value in the ARCH field is SM_SUN4M, if it is 398c2ecf20Sopenharmony_ci * SM_SUN4M_OBP then you have the following situation: 408c2ecf20Sopenharmony_ci * 1) You either have a sun4d, a sun4e, or a recently made sun4m. 418c2ecf20Sopenharmony_ci * 2) You have to consult OpenBoot to determine which machine this is. 428c2ecf20Sopenharmony_ci */ 438c2ecf20Sopenharmony_ci#define SM_4M_SS60 0x01 /* Sun4m SparcSystem 600 */ 448c2ecf20Sopenharmony_ci#define SM_4M_SS50 0x02 /* Sun4m SparcStation 10 */ 458c2ecf20Sopenharmony_ci#define SM_4M_SS40 0x03 /* Sun4m SparcStation 5 */ 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* Sun4d machines -- N/A */ 488c2ecf20Sopenharmony_ci/* Sun4e machines -- N/A */ 498c2ecf20Sopenharmony_ci/* Sun4u machines -- N/A */ 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci#endif /* !(_SPARC_MACHINES_H) */ 52