11556Srgrimes/* SPDX-License-Identifier: GPL-2.0 */ 21556Srgrimes/* 31556Srgrimes * ARCS hardware/memory inventory/configuration and system ID definitions. 496196Sdes */ 596196Sdes#ifndef _ASM_ARC_HINV_H 61556Srgrimes#define _ASM_ARC_HINV_H 796196Sdes 896196Sdes#include <asm/sgidefs.h> 996196Sdes#include <asm/fw/arc/types.h> 1096196Sdes 1196196Sdes/* configuration query defines */ 121556Srgrimestypedef enum configclass { 131556Srgrimes SystemClass, 141556Srgrimes ProcessorClass, 151556Srgrimes CacheClass, 161556Srgrimes#ifndef _NT_PROM 171556Srgrimes MemoryClass, 181556Srgrimes AdapterClass, 191556Srgrimes ControllerClass, 201556Srgrimes PeripheralClass 211556Srgrimes#else /* _NT_PROM */ 221556Srgrimes AdapterClass, 231556Srgrimes ControllerClass, 241556Srgrimes PeripheralClass, 251556Srgrimes MemoryClass 261556Srgrimes#endif /* _NT_PROM */ 271556Srgrimes} CONFIGCLASS; 281556Srgrimes 291556Srgrimestypedef enum configtype { 301556Srgrimes ARC, 311556Srgrimes CPU, 321556Srgrimes FPU, 331556Srgrimes PrimaryICache, 341556Srgrimes PrimaryDCache, 351556Srgrimes SecondaryICache, 361556Srgrimes SecondaryDCache, 371556Srgrimes SecondaryCache, 381556Srgrimes#ifndef _NT_PROM 391556Srgrimes Memory, 401556Srgrimes#endif 411556Srgrimes EISAAdapter, 4220420Ssteve TCAdapter, 431556Srgrimes SCSIAdapter, 441556Srgrimes DTIAdapter, 451556Srgrimes MultiFunctionAdapter, 461556Srgrimes DiskController, 471556Srgrimes TapeController, 4836149Scharnier CDROMController, 4936149Scharnier WORMController, 5036149Scharnier SerialController, 511556Srgrimes NetworkController, 5299110Sobrien DisplayController, 5399110Sobrien ParallelController, 541556Srgrimes PointerController, 551556Srgrimes KeyboardController, 561556Srgrimes AudioController, 571556Srgrimes OtherController, 581556Srgrimes DiskPeripheral, 591556Srgrimes FloppyDiskPeripheral, 601556Srgrimes TapePeripheral, 611556Srgrimes ModemPeripheral, 621556Srgrimes MonitorPeripheral, 631556Srgrimes PrinterPeripheral, 641556Srgrimes PointerPeripheral, 651556Srgrimes KeyboardPeripheral, 661556Srgrimes TerminalPeripheral, 671556Srgrimes LinePeripheral, 6877462Simp NetworkPeripheral, 6977462Simp#ifdef _NT_PROM 701556Srgrimes Memory, 7196196Sdes#endif 721556Srgrimes OtherPeripheral, 731556Srgrimes 741556Srgrimes /* new stuff for IP30 */ 751556Srgrimes /* added without moving anything */ 761556Srgrimes /* except ANONYMOUS. */ 771556Srgrimes 781556Srgrimes XTalkAdapter, 791556Srgrimes PCIAdapter, 801556Srgrimes GIOAdapter, 811556Srgrimes TPUAdapter, 821556Srgrimes 8357454Smarkm Anonymous 8429914Smarkm} CONFIGTYPE; 8551434Smarkm 861556Srgrimestypedef enum { 871556Srgrimes Failed = 1, 881556Srgrimes ReadOnly = 2, 891556Srgrimes Removable = 4, 9096196Sdes ConsoleIn = 8, 911556Srgrimes ConsoleOut = 16, 921556Srgrimes Input = 32, 931556Srgrimes Output = 64 941556Srgrimes} IDENTIFIERFLAG; 951556Srgrimes 961556Srgrimes#ifndef NULL /* for GetChild(NULL); */ 971556Srgrimes#define NULL 0 981556Srgrimes#endif 991556Srgrimes 1001556Srgrimesunion key_u { 1011556Srgrimes struct { 1021556Srgrimes#ifdef _MIPSEB 1031556Srgrimes unsigned char c_bsize; /* block size in lines */ 1041556Srgrimes unsigned char c_lsize; /* line size in bytes/tag */ 1051556Srgrimes unsigned short c_size; /* cache size in 4K pages */ 1061556Srgrimes#else /* _MIPSEL */ 1071556Srgrimes unsigned short c_size; /* cache size in 4K pages */ 1081556Srgrimes unsigned char c_lsize; /* line size in bytes/tag */ 10934898Smarkm unsigned char c_bsize; /* block size in lines */ 11034898Smarkm#endif /* _MIPSEL */ 11134898Smarkm } cache; 1121556Srgrimes ULONG FullKey; 1131556Srgrimes}; 1141556Srgrimes 1151556Srgrimes#if _MIPS_SIM == _MIPS_SIM_ABI64 11690110Simp#define SGI_ARCS_VERS 64 /* sgi 64-bit version */ 11790110Simp#define SGI_ARCS_REV 0 /* rev .00 */ 1181556Srgrimes#else 11990110Simp#define SGI_ARCS_VERS 1 /* first version */ 12090110Simp#define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ 12190110Simp#endif 12290110Simp 12390110Simptypedef struct { 12490110Simp CONFIGCLASS Class; 12590110Simp CONFIGTYPE Type; 12690110Simp IDENTIFIERFLAG Flags; 1271556Srgrimes USHORT Version; 1281556Srgrimes USHORT Revision; 12990110Simp ULONG Key; 1301556Srgrimes ULONG AffinityMask; 1311556Srgrimes ULONG ConfigurationDataSize; 13248560Sbde ULONG IdentifierLength; 1331556Srgrimes char *Identifier; 13440101Smarkm} COMPONENT; 13540101Smarkm 13640101Smarkm/* internal structure that holds pathname parsing data */ 1371556Srgrimesstruct cfgdata { 13834898Smarkm char *name; /* full name */ 13934898Smarkm int minlen; /* minimum length to match */ 14034898Smarkm CONFIGTYPE type; /* type of token */ 14134898Smarkm}; 14234898Smarkm 14334898Smarkm/* System ID */ 14434898Smarkmtypedef struct { 14534898Smarkm CHAR VendorId[8]; 14634898Smarkm CHAR ProductId[8]; 14748560Sbde} SYSTEMID; 14834898Smarkm 14934898Smarkm/* memory query functions */ 15034898Smarkmtypedef enum memorytype { 15134898Smarkm ExceptionBlock, 15234898Smarkm SPBPage, /* ARCS == SystemParameterBlock */ 15334898Smarkm#ifndef _NT_PROM 1541556Srgrimes FreeContiguous, 15524348Simp FreeMemory, 1561556Srgrimes BadMemory, 1571556Srgrimes LoadedProgram, 1581556Srgrimes FirmwareTemporary, 1591556Srgrimes FirmwarePermanent 1601556Srgrimes#else /* _NT_PROM */ 1611556Srgrimes FreeMemory, 1621556Srgrimes BadMemory, 1631556Srgrimes LoadedProgram, 1641556Srgrimes FirmwareTemporary, 16525612Sjoerg FirmwarePermanent, 16625612Sjoerg FreeContiguous 1671556Srgrimes#endif /* _NT_PROM */ 1681556Srgrimes} MEMORYTYPE; 1691556Srgrimes 1701556Srgrimestypedef struct { 1711556Srgrimes MEMORYTYPE Type; 1721556Srgrimes LONG BasePage; 1731556Srgrimes LONG PageCount; 1741556Srgrimes} MEMORYDESCRIPTOR; 1751556Srgrimes 1761556Srgrimes#endif /* _ASM_ARC_HINV_H */ 1771556Srgrimes