Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * ARCS hardware/memory inventory/configuration and system ID definitions.
0004  */
0005 #ifndef _ASM_ARC_HINV_H
0006 #define _ASM_ARC_HINV_H
0007 
0008 #include <asm/sgidefs.h>
0009 #include <asm/fw/arc/types.h>
0010 
0011 /* configuration query defines */
0012 typedef enum configclass {
0013     SystemClass,
0014     ProcessorClass,
0015     CacheClass,
0016 #ifndef _NT_PROM
0017     MemoryClass,
0018     AdapterClass,
0019     ControllerClass,
0020     PeripheralClass
0021 #else   /* _NT_PROM */
0022     AdapterClass,
0023     ControllerClass,
0024     PeripheralClass,
0025     MemoryClass
0026 #endif  /* _NT_PROM */
0027 } CONFIGCLASS;
0028 
0029 typedef enum configtype {
0030     ARC,
0031     CPU,
0032     FPU,
0033     PrimaryICache,
0034     PrimaryDCache,
0035     SecondaryICache,
0036     SecondaryDCache,
0037     SecondaryCache,
0038 #ifndef _NT_PROM
0039     Memory,
0040 #endif
0041     EISAAdapter,
0042     TCAdapter,
0043     SCSIAdapter,
0044     DTIAdapter,
0045     MultiFunctionAdapter,
0046     DiskController,
0047     TapeController,
0048     CDROMController,
0049     WORMController,
0050     SerialController,
0051     NetworkController,
0052     DisplayController,
0053     ParallelController,
0054     PointerController,
0055     KeyboardController,
0056     AudioController,
0057     OtherController,
0058     DiskPeripheral,
0059     FloppyDiskPeripheral,
0060     TapePeripheral,
0061     ModemPeripheral,
0062     MonitorPeripheral,
0063     PrinterPeripheral,
0064     PointerPeripheral,
0065     KeyboardPeripheral,
0066     TerminalPeripheral,
0067     LinePeripheral,
0068     NetworkPeripheral,
0069 #ifdef  _NT_PROM
0070     Memory,
0071 #endif
0072     OtherPeripheral,
0073 
0074     /* new stuff for IP30 */
0075     /* added without moving anything */
0076     /* except ANONYMOUS. */
0077 
0078     XTalkAdapter,
0079     PCIAdapter,
0080     GIOAdapter,
0081     TPUAdapter,
0082 
0083     Anonymous
0084 } CONFIGTYPE;
0085 
0086 typedef enum {
0087     Failed = 1,
0088     ReadOnly = 2,
0089     Removable = 4,
0090     ConsoleIn = 8,
0091     ConsoleOut = 16,
0092     Input = 32,
0093     Output = 64
0094 } IDENTIFIERFLAG;
0095 
0096 #ifndef NULL            /* for GetChild(NULL); */
0097 #define NULL    0
0098 #endif
0099 
0100 union key_u {
0101     struct {
0102 #ifdef  _MIPSEB
0103         unsigned char  c_bsize;     /* block size in lines */
0104         unsigned char  c_lsize;     /* line size in bytes/tag */
0105         unsigned short c_size;      /* cache size in 4K pages */
0106 #else   /* _MIPSEL */
0107         unsigned short c_size;      /* cache size in 4K pages */
0108         unsigned char  c_lsize;     /* line size in bytes/tag */
0109         unsigned char  c_bsize;     /* block size in lines */
0110 #endif  /* _MIPSEL */
0111     } cache;
0112     ULONG FullKey;
0113 };
0114 
0115 #if _MIPS_SIM == _MIPS_SIM_ABI64
0116 #define SGI_ARCS_VERS   64          /* sgi 64-bit version */
0117 #define SGI_ARCS_REV    0           /* rev .00 */
0118 #else
0119 #define SGI_ARCS_VERS   1           /* first version */
0120 #define SGI_ARCS_REV    10          /* rev .10, 3/04/92 */
0121 #endif
0122 
0123 typedef struct {
0124     CONFIGCLASS Class;
0125     CONFIGTYPE  Type;
0126     IDENTIFIERFLAG  Flags;
0127     USHORT      Version;
0128     USHORT      Revision;
0129     ULONG       Key;
0130     ULONG       AffinityMask;
0131     ULONG       ConfigurationDataSize;
0132     ULONG       IdentifierLength;
0133     char        *Identifier;
0134 } COMPONENT;
0135 
0136 /* internal structure that holds pathname parsing data */
0137 struct cfgdata {
0138     char *name;         /* full name */
0139     int minlen;         /* minimum length to match */
0140     CONFIGTYPE type;        /* type of token */
0141 };
0142 
0143 /* System ID */
0144 typedef struct {
0145     CHAR VendorId[8];
0146     CHAR ProductId[8];
0147 } SYSTEMID;
0148 
0149 /* memory query functions */
0150 typedef enum memorytype {
0151     ExceptionBlock,
0152     SPBPage,            /* ARCS == SystemParameterBlock */
0153 #ifndef _NT_PROM
0154     FreeContiguous,
0155     FreeMemory,
0156     BadMemory,
0157     LoadedProgram,
0158     FirmwareTemporary,
0159     FirmwarePermanent
0160 #else   /* _NT_PROM */
0161     FreeMemory,
0162     BadMemory,
0163     LoadedProgram,
0164     FirmwareTemporary,
0165     FirmwarePermanent,
0166     FreeContiguous
0167 #endif  /* _NT_PROM */
0168 } MEMORYTYPE;
0169 
0170 typedef struct {
0171     MEMORYTYPE  Type;
0172     LONG        BasePage;
0173     LONG        PageCount;
0174 } MEMORYDESCRIPTOR;
0175 
0176 #endif /* _ASM_ARC_HINV_H */