18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * ARCS hardware/memory inventory/configuration and system ID definitions. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci#ifndef _ASM_ARC_HINV_H 68c2ecf20Sopenharmony_ci#define _ASM_ARC_HINV_H 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#include <asm/sgidefs.h> 98c2ecf20Sopenharmony_ci#include <asm/fw/arc/types.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci/* configuration query defines */ 128c2ecf20Sopenharmony_citypedef enum configclass { 138c2ecf20Sopenharmony_ci SystemClass, 148c2ecf20Sopenharmony_ci ProcessorClass, 158c2ecf20Sopenharmony_ci CacheClass, 168c2ecf20Sopenharmony_ci#ifndef _NT_PROM 178c2ecf20Sopenharmony_ci MemoryClass, 188c2ecf20Sopenharmony_ci AdapterClass, 198c2ecf20Sopenharmony_ci ControllerClass, 208c2ecf20Sopenharmony_ci PeripheralClass 218c2ecf20Sopenharmony_ci#else /* _NT_PROM */ 228c2ecf20Sopenharmony_ci AdapterClass, 238c2ecf20Sopenharmony_ci ControllerClass, 248c2ecf20Sopenharmony_ci PeripheralClass, 258c2ecf20Sopenharmony_ci MemoryClass 268c2ecf20Sopenharmony_ci#endif /* _NT_PROM */ 278c2ecf20Sopenharmony_ci} CONFIGCLASS; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_citypedef enum configtype { 308c2ecf20Sopenharmony_ci ARC, 318c2ecf20Sopenharmony_ci CPU, 328c2ecf20Sopenharmony_ci FPU, 338c2ecf20Sopenharmony_ci PrimaryICache, 348c2ecf20Sopenharmony_ci PrimaryDCache, 358c2ecf20Sopenharmony_ci SecondaryICache, 368c2ecf20Sopenharmony_ci SecondaryDCache, 378c2ecf20Sopenharmony_ci SecondaryCache, 388c2ecf20Sopenharmony_ci#ifndef _NT_PROM 398c2ecf20Sopenharmony_ci Memory, 408c2ecf20Sopenharmony_ci#endif 418c2ecf20Sopenharmony_ci EISAAdapter, 428c2ecf20Sopenharmony_ci TCAdapter, 438c2ecf20Sopenharmony_ci SCSIAdapter, 448c2ecf20Sopenharmony_ci DTIAdapter, 458c2ecf20Sopenharmony_ci MultiFunctionAdapter, 468c2ecf20Sopenharmony_ci DiskController, 478c2ecf20Sopenharmony_ci TapeController, 488c2ecf20Sopenharmony_ci CDROMController, 498c2ecf20Sopenharmony_ci WORMController, 508c2ecf20Sopenharmony_ci SerialController, 518c2ecf20Sopenharmony_ci NetworkController, 528c2ecf20Sopenharmony_ci DisplayController, 538c2ecf20Sopenharmony_ci ParallelController, 548c2ecf20Sopenharmony_ci PointerController, 558c2ecf20Sopenharmony_ci KeyboardController, 568c2ecf20Sopenharmony_ci AudioController, 578c2ecf20Sopenharmony_ci OtherController, 588c2ecf20Sopenharmony_ci DiskPeripheral, 598c2ecf20Sopenharmony_ci FloppyDiskPeripheral, 608c2ecf20Sopenharmony_ci TapePeripheral, 618c2ecf20Sopenharmony_ci ModemPeripheral, 628c2ecf20Sopenharmony_ci MonitorPeripheral, 638c2ecf20Sopenharmony_ci PrinterPeripheral, 648c2ecf20Sopenharmony_ci PointerPeripheral, 658c2ecf20Sopenharmony_ci KeyboardPeripheral, 668c2ecf20Sopenharmony_ci TerminalPeripheral, 678c2ecf20Sopenharmony_ci LinePeripheral, 688c2ecf20Sopenharmony_ci NetworkPeripheral, 698c2ecf20Sopenharmony_ci#ifdef _NT_PROM 708c2ecf20Sopenharmony_ci Memory, 718c2ecf20Sopenharmony_ci#endif 728c2ecf20Sopenharmony_ci OtherPeripheral, 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci /* new stuff for IP30 */ 758c2ecf20Sopenharmony_ci /* added without moving anything */ 768c2ecf20Sopenharmony_ci /* except ANONYMOUS. */ 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci XTalkAdapter, 798c2ecf20Sopenharmony_ci PCIAdapter, 808c2ecf20Sopenharmony_ci GIOAdapter, 818c2ecf20Sopenharmony_ci TPUAdapter, 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci Anonymous 848c2ecf20Sopenharmony_ci} CONFIGTYPE; 858c2ecf20Sopenharmony_ci 868c2ecf20Sopenharmony_citypedef enum { 878c2ecf20Sopenharmony_ci Failed = 1, 888c2ecf20Sopenharmony_ci ReadOnly = 2, 898c2ecf20Sopenharmony_ci Removable = 4, 908c2ecf20Sopenharmony_ci ConsoleIn = 8, 918c2ecf20Sopenharmony_ci ConsoleOut = 16, 928c2ecf20Sopenharmony_ci Input = 32, 938c2ecf20Sopenharmony_ci Output = 64 948c2ecf20Sopenharmony_ci} IDENTIFIERFLAG; 958c2ecf20Sopenharmony_ci 968c2ecf20Sopenharmony_ci#ifndef NULL /* for GetChild(NULL); */ 978c2ecf20Sopenharmony_ci#define NULL 0 988c2ecf20Sopenharmony_ci#endif 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ciunion key_u { 1018c2ecf20Sopenharmony_ci struct { 1028c2ecf20Sopenharmony_ci#ifdef _MIPSEB 1038c2ecf20Sopenharmony_ci unsigned char c_bsize; /* block size in lines */ 1048c2ecf20Sopenharmony_ci unsigned char c_lsize; /* line size in bytes/tag */ 1058c2ecf20Sopenharmony_ci unsigned short c_size; /* cache size in 4K pages */ 1068c2ecf20Sopenharmony_ci#else /* _MIPSEL */ 1078c2ecf20Sopenharmony_ci unsigned short c_size; /* cache size in 4K pages */ 1088c2ecf20Sopenharmony_ci unsigned char c_lsize; /* line size in bytes/tag */ 1098c2ecf20Sopenharmony_ci unsigned char c_bsize; /* block size in lines */ 1108c2ecf20Sopenharmony_ci#endif /* _MIPSEL */ 1118c2ecf20Sopenharmony_ci } cache; 1128c2ecf20Sopenharmony_ci ULONG FullKey; 1138c2ecf20Sopenharmony_ci}; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci#if _MIPS_SIM == _MIPS_SIM_ABI64 1168c2ecf20Sopenharmony_ci#define SGI_ARCS_VERS 64 /* sgi 64-bit version */ 1178c2ecf20Sopenharmony_ci#define SGI_ARCS_REV 0 /* rev .00 */ 1188c2ecf20Sopenharmony_ci#else 1198c2ecf20Sopenharmony_ci#define SGI_ARCS_VERS 1 /* first version */ 1208c2ecf20Sopenharmony_ci#define SGI_ARCS_REV 10 /* rev .10, 3/04/92 */ 1218c2ecf20Sopenharmony_ci#endif 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_citypedef struct { 1248c2ecf20Sopenharmony_ci CONFIGCLASS Class; 1258c2ecf20Sopenharmony_ci CONFIGTYPE Type; 1268c2ecf20Sopenharmony_ci IDENTIFIERFLAG Flags; 1278c2ecf20Sopenharmony_ci USHORT Version; 1288c2ecf20Sopenharmony_ci USHORT Revision; 1298c2ecf20Sopenharmony_ci ULONG Key; 1308c2ecf20Sopenharmony_ci ULONG AffinityMask; 1318c2ecf20Sopenharmony_ci ULONG ConfigurationDataSize; 1328c2ecf20Sopenharmony_ci ULONG IdentifierLength; 1338c2ecf20Sopenharmony_ci char *Identifier; 1348c2ecf20Sopenharmony_ci} COMPONENT; 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci/* internal structure that holds pathname parsing data */ 1378c2ecf20Sopenharmony_cistruct cfgdata { 1388c2ecf20Sopenharmony_ci char *name; /* full name */ 1398c2ecf20Sopenharmony_ci int minlen; /* minimum length to match */ 1408c2ecf20Sopenharmony_ci CONFIGTYPE type; /* type of token */ 1418c2ecf20Sopenharmony_ci}; 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* System ID */ 1448c2ecf20Sopenharmony_citypedef struct { 1458c2ecf20Sopenharmony_ci CHAR VendorId[8]; 1468c2ecf20Sopenharmony_ci CHAR ProductId[8]; 1478c2ecf20Sopenharmony_ci} SYSTEMID; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci/* memory query functions */ 1508c2ecf20Sopenharmony_citypedef enum memorytype { 1518c2ecf20Sopenharmony_ci ExceptionBlock, 1528c2ecf20Sopenharmony_ci SPBPage, /* ARCS == SystemParameterBlock */ 1538c2ecf20Sopenharmony_ci#ifndef _NT_PROM 1548c2ecf20Sopenharmony_ci FreeContiguous, 1558c2ecf20Sopenharmony_ci FreeMemory, 1568c2ecf20Sopenharmony_ci BadMemory, 1578c2ecf20Sopenharmony_ci LoadedProgram, 1588c2ecf20Sopenharmony_ci FirmwareTemporary, 1598c2ecf20Sopenharmony_ci FirmwarePermanent 1608c2ecf20Sopenharmony_ci#else /* _NT_PROM */ 1618c2ecf20Sopenharmony_ci FreeMemory, 1628c2ecf20Sopenharmony_ci BadMemory, 1638c2ecf20Sopenharmony_ci LoadedProgram, 1648c2ecf20Sopenharmony_ci FirmwareTemporary, 1658c2ecf20Sopenharmony_ci FirmwarePermanent, 1668c2ecf20Sopenharmony_ci FreeContiguous 1678c2ecf20Sopenharmony_ci#endif /* _NT_PROM */ 1688c2ecf20Sopenharmony_ci} MEMORYTYPE; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_citypedef struct { 1718c2ecf20Sopenharmony_ci MEMORYTYPE Type; 1728c2ecf20Sopenharmony_ci LONG BasePage; 1738c2ecf20Sopenharmony_ci LONG PageCount; 1748c2ecf20Sopenharmony_ci} MEMORYDESCRIPTOR; 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#endif /* _ASM_ARC_HINV_H */ 177