/****************************************************************************
*   File:   ebi2.h - Standard definitions for EBI II interfacing.	    *
*									    *
*   Data structures, defined values and function prototypes for accessing   *
*   AST EBI II compliant function libraries.				    *
*									    *
*   Version 2.9 - 9/21/92						    *
*									    *
/****************************************************************************


/*
 * Miscellaneous
 */

#define VERSION 	0x00000010
#define _64K		(64 * 1024)
#define PAGESHIFT	12			/* log base 2 of PAGESIZE */
#define PAGESIZE	(1 << PAGESHIFT)	/* 0x00001000 or 4096 */
#define PAGEMASK	(PAGESIZE - 1)		/* 0x00000fff */


/*
 * PLMA structure
 */

typedef struct plma_s {
   ulong_t procnum;
} PLMA;


/*
 * Maximum number of processors currently supported by EBI2
 */

#define EBI2_MAXPROCESSORS    8

/*
 * The EBI II signature is located in the BIOS segment at offset
 * EBI2_SIGNATURE_OFF.
 */

#define  BIOS_SEG	      (0xf000)
#define  EBI2_SIGNATURE_OFF   (0xffe2)
#define  EBI2_SIGNATURE       0x32494245   // 'EBI2'

#define  EBI2_SIGNATURE_WORD_LOW  0x4245   // 'I2'
#define  EBI2_SIGNATURE_WORD_HIGH 0x3249   // 'EB'

#define  EBI2_START_SEG 	  0x40
#define  EBI2_START_OFF 	  0x67

/*
 * Data structure defining EBI II signature/pointer area.
 */

typedef struct _ebi2sig {  // ebi2sig
   ulong_t  sig;	   // Signature string: literally "EBI2"
   ushort_t seg;	   // Real mode segment
   ushort_t off;	   // Real mode offset
} ebi2Sig;


/*
 * EBI II function completion codes.  Non-error values are zero
 * or greater.	Erroneous results are less than zero.
 */

#define     OK			    (0)
#define     PROC_RUNNING	    (1)
#define     PROC_STOPPED	    (2)
#define     NO_CACHE		    (3)
#define     NO_MEMORY_ERRORS	    (4)
#define     MEMORY_ERROR_FOUND	    (5)
#define     WRONG_PROC_GRAPH_MODE   (6)

#define     BAD 		    (-1)
#define     ERR_NOT_SUPPORTED	    (-2)
#define     ERR_NONESUCH	    (-3)
#define     ERR_BAD_PROC_ID	    (-4)
#define     ERR_PROC_ABSENT	    (-5)
#define     ERR_PROC_BAD	    (-6)
#define     ERR_UNKNOWN_INT	    (-7)
#define     ERR_DISPLAY_OVERFLOW    (-8)
#define     ERR_BAD_CHARS	    (-9)
#define     ERR_BAD_SELECTOR	    (-10)
#define     ERR_BAD_CACHE_MODE	    (-11)
#define     ERR_BAD_VECTOR	    (-12)
#define     ERR_BAD_COLOR	    (-13)
#define     ERR_BAD_GRAPH_MODE	    (-14)
#define     ERR_BAD_BOARD_NUM	    (-15)
#define     ERR_BAD_MODULE_NUM	    (-16)
#define     ERR_BAD_IRQ_NUM	    (-17)
#define     ERR_BAD_OFFSWITCH	    (-18)
#define     ERR_BAD_PHYS_ADDR	    (-19)
#define     ERR_BAD_LENGTH	    (-20)
#define     ERR_BAD_BLOCK_NUM	    (-21)
#define     ERR_BAD_GLOB_MASK_IRQ   (-22)
#define     ERR_BAD_LOC_MASK_IRQ    (-23)
#define     ERR_CANT_CANCEL_INT     (-24)
#define     ERR_PROC_STILL_RUNNING  (-25)
#define     ERR_POWER_SUPPLY_NUM    (-26)
#define     ERR_BAD_VIS_MODE	    (-27)

//XLATOFF
#define  IsOK(n)	( n >= OK )
#define  IsBad(n)	( n < OK )
//XLATON


/*
 * Independent hardware manufacturers and OEMs are allowed to define
 * function extensions to the calling system in the OEM function array
 * at the end of the ebi2 structure.  To avoid collisions in OEM
 * specified completion/error codes, use the following system:
 * To define a non-error completion code, define it as:
 *    #define  name  OEMCompCode(OEMNum,sequenceNum)
 *
 * Define an error code as:
 *    #define  name  OEMErrorCode( OEMNum,sequenceNum)
 *
 *    Where:
 *
 *	 OEMNum 	The OEM number assigned you by AST (if you don't
 *			have one, contact them.  Really, go ahead.)  For
 *			example, AST themselves are OEM #0.
 *
 *	 sequenceNum	The conditions sequential number.  I.e.- the
 *			1st condition defined is 0, then next 1, etc.
 *
 *    Example:
 *	 AST uses the following definition in it's OEM include file, astoem.h:
 *
 *    #define  ERR_BAD_COM2_OVERRIDE  OEMErrorCode(0,-1)
 *
 *    (See astoem.h for additional examples.)
 */

/*
 * Macros for OEM completion code definition.
 */

#define  EBI2_OEM_COMP_CODE_BASE (65536L)
#define  EBI2_OEM_ERR_CODE_BASE  (-65536L)
#define  EBI2_OEM_COMP_CODE_GAP  (65536L)

//XLATOFF
#define  OEMCompCode(OEMNum,sequenceNum)				   \
	    ( EBI2_OEM_COMP_CODE_BASE + (OEMNum * EBI2_OEM_COMP_CODE_GAP)  \
	    + sequenceNum )

#define  OEMErrorCode(OEMNum,sequenceNum)				   \
	    ( EBI2_OEM_ERR_CODE_BASE - (OEMNum * EBI2_OEM_COMP_CODE_GAP)   \
	    - sequenceNum )
//XLATON


/*
 * Processor configuration data table
 */
typedef struct procConfigData {   // procConfigData
   uchar_t	processorStatus;  // See Table 3
   uchar_t	processorType;	  // See Table 4
   uchar_t	coprocessorType;  // See Table 6
   uchar_t	serialNum[4];	  // Packed BCD board serial number
   uchar_t	boardRev;	  // 2 uchar_t Hex board revision
   uchar_t	boardType;	  // See table 5
   uchar_t	manufacturing[8]; // Unused bytes, NULL filled
   uchar_t	boardInfo[20];	  // Board specific info, format
				  // to be defined
   ulong_t     slotNumber;	  // Physical slot this board occupies
} procConfigData;


/*
 * ProcessorType codes
 */

#define  PTYPE_80386	(0x10)	 // Intel family of processors
#define  PTYPE_80486	(0x11)
#define  PTYPE_80586	(0x12)
#define  PTYPE_80686	(0x13)
#define  PTYPE_80786	(0x14)
#define  PTYPE_80x86MASK (0x17)

#define  PTYPE_SPARC	(0x20)	 // Sun SPARC type processor

#define  PTYPE_MIPS4000 (0x30)	 // Mips
#define  PTYPE_MIPS5000 (0x31)

#define  PTYPE_68030	(0x40)	 // Motorola 68000 family
#define  PTYPE_68040	(0x41)
#define  PTYPE_68050	(0x42)

#define  PTYPE_88000	(0x50)	 // Motorola 88000 RISC family
#define  PTYPE_88110	(0x51)

#define  PTYPE_34010	(0x60)	 // TI 34000 graphics processor family
#define  PTYPE_34020	(0x61)
#define  PTYPE_34030	(0x62)

#define  PTYPE_R6000	(0x70)	 // IBM

#define  PTYPE_80860	(0x80)	 // Intel i860 RISC processor family
#define  PTYPE_80960	(0x81)


/*
 * ProcessorStatus codes
 */

#define  PSTAT_ABSENT	(0)
#define  PSTAT_RUNNING	(1)
#define  PSTAT_RESET	(2)
#define  PSTAT_FAULT	(0x0f)


/*
 * coprocessorType codes
 */

#define  CPTYPE_387	(0x10)	 // Intel type coprocessor family
#define  CPTYPE_487	(0x11)
#define  CPTYPE_587	(0x12)

#define  CPTYPE_3167	(0x20)	 // Weitek coprocessors for 80x86 processors
#define  CPTYPE_4167	(0x21)
#define  CPTYPE_5167	(0x22)

#define  CPTYPE_68881	(0x30)	 // Motorola mathco's
#define  CPTYPE_68882	(0x31)

#define  CPTYPE_34081	(0x40)	 // Floating point coprocessors for TI 34000
#define  CPTYPE_34082	(0x41)	 // family

/*
 * boardType codes
 */

#define  BTYPE_PROCESSOR	    (0x01)
#define  BTYPE_MEMORY		    (0x02)
#define  BTYPE_DISK_CONTROLLER	    (0x03)
#define  BTYPE_LAN_CONTROLLER	    (0x04)
#define  BTYPE_GRAPHICS_CONTROLLER  (0x05)
#define  BTYPE_DSP_CONTROLLER	    (0x06)


/*
 * ProcessorGraph mode values
 */

#define  HISTO_MODE	0     // Histogram mode
#define  STATUS_MODE	1
#define  OVERRIDE_MODE	2


/*
 *  Define data type for a 64-bit linear physical address.
 */

typedef struct _physAddr { /*physAddr */
   ulong_t low;
   ulong_t high;
} physAddr;

/*
 * Define cache mode values
 */

#define      ENABLE_CACHE	 (0)
#define      DISABLE_CACHE	 (4)
#define      AUTO_WRITE_THRU	 (0)
#define      FORCE_WRITE_THRU	 (2)
#define      AUTO_READ_ONLY	 (0)
#define      FORCE_READ_ONLY	 (1)
#define      DEFAULT_CACHE_MODE  (0)


/*
 *  cache region control ushort_t values
 */

#define      ENABLE_REGION_CACHING    (1)
#define      DISABLE_REGION_CACHING   (0)


/*
 * The Cache control information structure; returned GetCacheControlInfo().
 */

typedef struct cacheControlInfo {  // cacheControlInfo
  ulong_t  flags;		   // See table 9.
  ulong_t  controlGranularity;	   // In bytes.
  ulong_t  RESERVED;
} cacheControlInfo;


/*
 * memoryBlockInfo definition
 */

typedef struct memoryBlockInfo { // memoryBlockInfo
   physAddr blockStartAddr;	 // Start address of this memory block
   ulong_t    blockSize;	 // Size of this block
   ulong_t    blockAttributes;	 // Attributes of this block
} memoryBlockInfo;


/*
 * Module attribute bit definitions and macros.  Also used on
 * GetMemBankInfoPacket (See astoem.h).
 */

#define     RAM_WIDTH_MASK	 (0x0f)
//XLATOFF
#define     extractRAMWidth(n)	 ((n) & RAM_WIDTH_MASK )
//XLATON
#define     RAM_PRESENT 	 (0x10)
#define     ECC_PRESENT 	 (0x100)
#define     INTERLEAVED 	 (0x200)
#define     BIT_MODE_MASK	 (0xfc00)
#define     BIT_MODE_64 	 (0)
#define     BIT_MODE_128	 (0x400)
//XLATOFF
#define     extractBitMode(n)	 ((n) & BIT_MODE_MASK)
//XLATON


/*
 * memoryErrorInfo definition
 */

typedef struct memoryErrorInfo { // memoryErrorInfo
   physAddr location;		 // Location of block containing error
   ulong_t length;		 // Length of block containing errors in bytes
   ulong_t count;		 // Number of errors in this block
   ulong_t memErrFlags; 	 // Additional info; see definitions below and Table 20
   ulong_t slotNumber;		 // Physical slot number of board experiencing error
   ulong_t moduleNumber;	 // Module on board experiencing error
} memoryErrorInfo;


/*
 * memErrFlags bits definitions
 */

#define  MEM_ERR_TYPE_MASK 0x0f
//XLATOFF
#define  GETMEMERRTYPE(n)  ((n) & MEM_ERR_TYPE_MASK)
//XLATON

#define  MEM_NO_ERROR		 (0)
#define  MEM_ERR_PARITY 	 (1)
#define  MEM_ERR_SINGLEBIT_ECC	 (2)
#define  MEM_ERR_MULTIBIT_ECC	 (3)

#define   SLOT_NUM_INDETERMINATE  (-1)
#define   MOD_NUM_INDETERMINATE   (-1)


/*
 * Front panel UPS light color codes
 */

#define UPS_COLOR_DARK	(0)
#define UPS_COLOR_GREEN (2)
#define UPS_COLOR_AMBER (3)
#define UPS_COLOR_RED	(1)


/*
 * Font panel key position codes
 */

#define  KEY_POS_LOCKED    0
#define  KEY_POS_SERVICE   1
#define  KEY_POS_UNLOCKED  2
#define  KEY_POS_OFF	   3


/*
 * The EBI II revision code structure
 */

typedef struct revisionCode { // revisionCode
   uchar_t major;	      // EBI II revision major number (the XX in XX.YY)
   uchar_t minor;	      // EBI II revision minor number (the YY in XX.YY)
   uchar_t RESERVED;
} revisionCode;


/*
 * Define data type describing the in ROM offset table.
 */

//XLATOFF
typedef ulong_t offsetTable[128];     // Unresolved BIOS offset table
//XLATON
/* ASM
offsetTable struc
   dd 128 dup (?)
offsetTable ends
*/


/*
 * IOInfoTable structure.  The address of such a table must be
 * provided during virtually any EBI II call.
 */

typedef struct _IOInfoTable { // IOInfoTable
   physAddr address;	      // Physical address of this slot's I/O area
   ulong_t length;	      // Length of area, or 0 if no I/O area
   ulong_t flags;	      // Allocation type flags IOInfoTable;
} IOInfoTable;

#define  ALLOCATE_RAM	   (1)	 // Only one bit used so far


/*
 * NMI and SPI Source constants
 */

#define  NMI_NONE_FOUND 	 (0)
//	 RESERVED		 (1)
#define  NMI_SW_GEN_NMI 	 (2)
#define  NMI_MEMORY_ERROR	 (3)
#define  NMI_PROC_ERROR 	 (4)
//	 RESERVED		 (5)
#define  NMI_BUS_PARITY 	 (6)
#define  NMI_BUS_TIMEOUT	 (7)
#define  NMI_FP_SHUTDOWN	 (8)
#define  NMI_FP_ATTENTION	 (9)
#define  NMI_POWERFAIL		 (10)
#define  NMI_EISA_FAILSAFE_TIMER (11)
#define  NMI_EISA_BUS_TIMEOUT	 (12)
#define  NMI_EISA_IO_CHECK	 (13)
#define  NMI_EISA_SW_GEN_NMI	 (14)
#define  NMI_SYS_IO_ERROR	 (15)

#define  OEM_NMI_BASE		 (0x10000000L)
#define  OEM_NMI_GAP		 (0x01000000L)
//XLATOFF
#define  OEM_NMI_NUM(OEM,NMI_NUM) (			    \
				    OEM_NMI_BASE +	    \
				    (OEM_NMI_GAP * OEM) +   \
				    NMI_NUM		    \
				  )
//XLATON


#define  SPI_NONE_FOUND 	 (0)
//	 RESERVED		 (1)
//	 RESERVED		 (2)
#define  SPI_MEMORY_ERROR	 (3)
#define  SPI_PROC_ERROR 	 (4)
//	 RESERVED		 (5)
#define  SPI_BUS_PARITY 	 (6)
#define  SPI_BUS_TIMEOUT	 (7)
#define  SPI_FP_SHUTDOWN	 (8)
#define  SPI_FP_ATTENTION	 (9)
#define  SPI_POWERFAIL		 (10)
#define  SPI_EISA_FAILSAFE_TIMER (11)
#define  SPI_EISA_BUS_TIMEOUT	 (12)
#define  SPI_EISA_IO_CHECK	 (13)
#define  SPI_EISA_SW_GEN_NMI	 (14)
#define  SPI_SYS_IO_ERROR	 (15)

#define  OEM_SPI_BASE		 (0x10000000L)
#define  OEM_SPI_GAP		 (0x01000000L)
//XLATOFF
#define  OEM_SPI_NUM(OEM,SPI_NUM) (			    \
				    OEM_SPI_BASE +	    \
				    (OEM_SPI_GAP * OEM) +   \
				    SPI_NUM		    \
				  )
//XLATON


/*
 *  Front panel OFF switch mode constants
 */

#define  OFF_SWITCH_NMI 	  (0)
#define  OFF_SWITCH_HW_SHUTDOWN   (1)


/*
 * Interrupt subsystem typecodes
 */

#define  EBI_INT_SUBSYS_EISA	  (0)
#define  EBI_INT_SUBSYS_ISA	  (1)
#define  EBI_INT_SUBSYS_ADI	  (2)
#define  EBI_INT_SUBSYS_MPIC	  (3)


/*
 * IDT Vectors
 */

#define  EBI_IPI_VECTOR (32L)


/*
 * IRQ numbers.
 */

#define  EBI_IRQ0	(0L)	 // PIC #1 (Master)
#define  EBI_IRQ1	(1L)	 // PIC #1 (Master)
#define  EBI_IRQ2	(2L)	 // Inaccessable in cascaded PIC system
#define  EBI_IRQ3	(3L)	 // PIC #1 (Master)
#define  EBI_IRQ4	(4L)	 // PIC #1 (Master)
#define  EBI_IRQ5	(5L)	 // PIC #1 (Master)
#define  EBI_IRQ6	(6L)	 // PIC #1 (Master)
#define  EBI_IRQ7	(7L)	 // PIC #1 (Master)
#define  EBI_IRQ8	(8L)	 // PIC #2 (1st slave)
#define  EBI_IRQ9	(9L)	 // PIC #2 (1st slave)
#define  EBI_IRQ10	(10L)	 // PIC #2 (1st slave)
#define  EBI_IRQ11	(11L)	 // PIC #2 (1st slave)
#define  EBI_IRQ12	(12L)	 // PIC #2 (1st slave)
#define  EBI_IRQ13	(13L)	 // PIC #2 (1st slave)
#define  EBI_IRQ14	(14L)	 // PIC #2 (1st slave)
#define  EBI_IRQ15	(15L)	 // PIC #2 (1st slave)
#define  EBI_IRQ16	(16L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ17	(17L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ18	(18L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ19	(19L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ20	(20L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ21	(21L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ22	(22L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ23	(23L)	 // PIC #3 (2nd slave)
#define  EBI_IRQ24	(24L)	 // SPI (See below)
#define  EBI_IRQ25	(25L)	 // LSI (See below)
#define  EBI_IRQ26	(26L)	 // IPI (See below)
#define  EBI_IRQ27	(27L)	 // Reserved
#define  EBI_IRQ28	(28L)	 // Reserved
#define  EBI_IRQ29	(29L)	 // Reserved
#define  EBI_IRQ30	(30L)	 // Reserved
#define  EBI_IRQ31	(31L)	 // Reserved

#define  EBI_SPI_IRQ	(EBI_IRQ24)
#define  EBI_LSI_IRQ	(EBI_IRQ25)
#define  EBI_IPI_IRQ	(EBI_IRQ26)

#define  EBI_IRQBIT0	   (0x1L)	 // PIC #1 (Master)
#define  EBI_IRQBIT1	   (0x2L)	 // PIC #1 (Master)
#define  EBI_IRQBIT2	   (0x4L)	 // Inaccessable in cascaded PIC system
#define  EBI_IRQBIT3	   (0x8L)	 // PIC #1 (Master)
#define  EBI_IRQBIT4	   (0x10L)	 // PIC #1 (Master)
#define  EBI_IRQBIT5	   (0x20L)	 // PIC #1 (Master)
#define  EBI_IRQBIT6	   (0x40L)	 // PIC #1 (Master)
#define  EBI_IRQBIT7	   (0x80L)	 // PIC #1 (Master)
#define  EBI_IRQBIT8	   (0x100L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT9	   (0x200L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT10	   (0x400L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT11	   (0x800L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT12	   (0x1000L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT13	   (0x2000L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT14	   (0x4000L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT15	   (0x8000L)	 // PIC #2 (1st slave)
#define  EBI_IRQBIT16	   (0x10000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT17	   (0x20000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT18	   (0x40000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT19	   (0x80000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT20	   (0x100000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT21	   (0x200000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT22	   (0x400000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT23	   (0x800000L)	 // PIC #3 (2nd slave)
#define  EBI_IRQBIT24	   (0x1000000L)  // SPI (See below)
#define  EBI_IRQBIT25	   (0x2000000L)  // LSI (See below)
#define  EBI_IRQBIT26	   (0x4000000L)  // IPI (See below)
#define  EBI_IRQBIT27	   (0x8000000L)  // Reserved
#define  EBI_IRQBIT28	   (0x10000000L) // Reserved
#define  EBI_IRQBIT29	   (0x20000000L) // Reserved
#define  EBI_IRQBIT30	   (0x40000000L) // Reserved
#define  EBI_IRQBIT31	   (0x80000000L) // Reserved

#define  EBI_SPI_IRQBIT    (EBI_IRQBIT24)
#define  EBI_LSI_IRQBIT    (EBI_IRQBIT25)
#define  EBI_IPI_IRQBIT    (EBI_IRQBIT26)


/*
 * Constants used in powerSupplyInfo.present and onLine (See Below)
 */

#define  POWER_SUPPLY_PRESENT (1)
#define  POWER_SUPPLY_ABSENT  (0)
#define  POWER_SUPPLY_ONLINE  (1)
#define  POWER_SUPPLY_OFFLINE (0)


/*
 * Power supply information structure.
 */

typedef struct _powerSupplyInfo { // poweSupplyInfo
   ulong_t present;		  // 1 - Supply installed, 0 - absent
   ulong_t onLine;		  // 1 - Supply providing nominal power, 0 - no power provided
   ulong_t RESERVED[8]; 	  // Unused at this time, reserved by AST
} powerSupplyInfo;


/*
 * Front panel switch visibility values
 */

#define  PANEL_SWITCHES_INVISIBLE   (0)
#define  PANEL_SWITCHES_VISIBLE     (1)


/*
 * 32-bit protected mode EBI II call structure.  This structure is built
 * based on the ROM offset table.
 * Calls are made thusly:
 *
 *    EBI2  callTab;
 *    void *MMIOTable;
 *    ulong_t numProcs;
 *
 *    retStat = (callTab.GetNumProcs)( MMIOTable, &numProcsPtr );
 */

//XLATOFF
typedef struct EBI2 {
   ulong_t (*GetNumProcs)( void *MMIOTable, ulong_t *numProcs );	  // 1
   ulong_t (*GetProcConf)( void *MMIOTable,
			  ulong_t processorID,
			  procConfigData *configData ); 		  // 2
   ulong_t (*StartProc)( void *MMIOTable, ulong_t processorID );	  // 3
   ulong_t (*StopProc)( void *MMIOTable, ulong_t processorID ); 	  // 4
   ulong_t (*GetProcID)( void *MMIOTable, ulong_t *processorID );	  // 5
   ulong_t (*EnableRAMCache)( void *MMIOTable );			  // 6
   ulong_t (*DisableRAMCache)( void *MMIOTable );			  // 7
   ulong_t (*FlushRAMCache)( void *MMIOTable, ulong_t flushType );	  // 8
   ulong_t (*ControlCacheRegion)( void *MMIOTable,
				 ulong_t control,
				 physAddr start,
				 ulong_t length );			  // 9
   ulong_t (*GetCacheControlInfo)( void *MMIOTable,
				  cacheControlInfo *info );		  // 10
   ulong_t (*SetPanelUPS)( void *MMIOTable, ulong_t LEDColor ); 	  // 11
   ulong_t (*GetPanelUPS)( void *MMIOTable, ulong_t *LEDColor );	  // 12
   ulong_t (*SetPanelProcGraphMode)( void *MMIOTable,
				    ulong_t displayMode );		  // 13
   ulong_t (*GetPanelProcGraphMode)( void *MMIOTable,
				    ulong_t *displayMode );		  // 14
   ulong_t (*SetPanelProcGraphValue)( void *MMIOTable, ulong_t value );   // 15
   ulong_t (*GetPanelProcGraphValue)( void *MMIOTable, ulong_t *value );  // 16
   ulong_t (*LogProcIdle)( void *MMIOTable );				  // 17
   ulong_t (*LogProcBusy)( void *MMIOTable );				  // 18
   ulong_t (*GetPanelAttnSwitchLatch)( void *MMIOTable, ulong_t *latch ); // 19
   ulong_t (*GetPanelOffSwitchLatch)( void *MMIOTable, ulong_t *latch );  // 20
   ulong_t (*GetPanelKeyPos)( void *MMIOTable, ulong_t *keyPos );	  // 21
   ulong_t (*GetPanelAlphaNumInfo)( void *MMIOTable,
				   ulong_t *displayType,
				   ulong_t *width );			  // 22
   ulong_t (*GetPanelAlphaNum)( void *MMIOTable, uchar_t *contents );	  // 23
   ulong_t (*SetPanelAlphaNum)( void *MMIOTable, uchar_t *string );	  // 24
   ulong_t (*SetPanelOffSwitchMode)( void *MMIOTable, ulong_t mode );	  // 25
   ulong_t (*GetPanelOffSwitchMode)( void *MMIOTable, ulong_t *mode );	  // 26
   ulong_t (*GetIntSubsysType)( void *MMIOTable, ulong_t *subsystemType );// 27
   ulong_t (*SetGlobalIntMask)( void *MMIOTable, ulong_t mask );	  // 28
   ulong_t (*GetGlobalIntMask)( void *MMIOTable, ulong_t *mask );	  // 29
   ulong_t (*SetLocalIntMask)( void *MMIOTable,
			      ulong_t mask,
			      ulong_t processorID );			  // 30
   ulong_t (*GetLocalIntMask)( void *MMIOTable,
			      ulong_t *mask,
			      ulong_t processorID );			  // 31
   ulong_t (*SetAdvIntMode)( void *MMIOTable ); 			  // 32
   ulong_t (*SetIRQVectorAssign)( void *MMIOTable,
				 ulong_t IRQNum,
				 ulong_t vectorNum );			  // 33
   ulong_t (*GetIRQVectorAssign)( void *MMIOTable,
				 ulong_t IRQNum,
				 ulong_t *vectorNum );			  // 34
   ulong_t (*GetNumPowerSupplies)( void *MMIOTable,
				  ulong_t numSupplies );		  // 35
   ulong_t (*GetPowerSupplyInfo)( void *MMIOTable,
				 ulong_t supplyNum,
				 powerSupplyInfo *info );		  // 36
   ulong_t (*DeInitEBI)( void *MMIOTable );				  // 37
   ulong_t (*SetLSIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t vector );				  // 38
   ulong_t (*GetLSIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t *vector );				  // 39
   ulong_t (*SetSPIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t vector );				  // 40
   ulong_t (*GetSPIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t *vector );				  // 41
   ulong_t (*SetIPIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t vector );				  // 42
   ulong_t (*GetIPIVector)( void *MMIOTable,
			   ulong_t processorID,
			   ulong_t *vector );				  // 43
   ulong_t (*SetIPIID)( void *MMIOTable, ulong_t processorID, ulong_t ID );// 44
   ulong_t (*GetIPIID)( void *MMIOTable, ulong_t processorID, ulong_t *ID );// 45
   ulong_t (*GenIPI)( void *MMIOTable, ulong_t ID );			  // 46
   ulong_t (*GenLSI)( void *MMIOTable );				  // 47
   ulong_t (*GetNMISource)( void *MMIOTable, ulong_t *NMISource );	  // 48
   ulong_t (*GetSPISource)( void *MMIOTable, ulong_t *SPISource );	  // 49
   ulong_t (*GetLocalIRQStatus)( void *MMIOTable,
				ulong_t processorID,
				ulong_t *inService,
				ulong_t *requested );			  // 50
   ulong_t (*MaskableIntEOI)( void *MMIOTable, ulong_t intNum );	  // 51
   ulong_t (*NonMaskableIntEOI)( void *MMIOTable );			  // 52
   ulong_t (*CancelInterrupt)( void *MMIOTable,
			      ulong_t mask,
			      ulong_t processorID );			  // 53
   ulong_t (*GetSysTimer)( void *MMIOTable, ulong_t *timerValue );	  // 54
   ulong_t (*GetSysTimerFreq)( void *MMIOTable, ulong_t *frequency );	  // 55
   ulong_t (*GetNumMemBlocks)( void *MMIOTable, ulong_t *numBlocks );	  // 56
   ulong_t  GetNumMemBlocks16;	// Not accessable in protected mode	  // 57
   ulong_t (*GetMemBlockInfo)( void *MMIOTable,
			      memoryBlockInfo *blockInfo,
			      ulong_t blockNum );			  // 58
   ulong_t  GetMemBlockInfo16; // Not accessable in protected mode	  // 59
   ulong_t (*GetMemErrorInfo)( void *MMIOTable, memoryErrorInfo *info );  // 60
   ulong_t (*GetRevision)( void *MMIOTable, revisionCode *rev );	  // 61
   ulong_t (*GetNumSlots)( ulong_t *numSlots ); 			  // 62
   ulong_t (*GetMMIOTable)( IOInfoTable *infoTable );			  // 63
   ulong_t (*InitEBI)( void *MMIOTable );				  // 64
   ulong_t (*GetThermalState)( void *MMIOTable, ulong_t *temperature );   // 65
   ulong_t (*ShutdownPowerSupply)( void *MMIOTable );			  // 66
   ulong_t (*SimulatePowerFail)( void *MMIOTable,
				ulong_t processorID );			  // 67
   ulong_t (*SetPanelSwitchVisibility)( void *MMIOTable, ulong_t mode );  // 68
   ulong_t (*GetPanelSwitchVisibility)( void *MMIOTable, ulong_t *mode ); // 69
   ulong_t (*GetGlobalIRQStatus)( void *MMIOTable,
				 ulong_t *inService,
				 ulong_t *requested );			  // 70
   ulong_t (*FastSetLocalIntMask)( ulong_t handle, ulong_t mask );	  // 71
   ulong_t (*GetProcIntHandle)( void *MMIOTable,
			       ulong_t processorID,
			       ulong_t *handle );			  // 72
   void   (*RegSetLocalIntMask)( void );				  // 73
   ulong_t (*ASTx[23])( void *MMIOTable, ... ); 		       // 74..96
   ulong_t (*OEM[32])( void *MMIOTable, ... );			       // 97..128
} EBI2;
//XLATON
/* ASM
EBI2 struc
   GetNumProcs	dd  ?
   GetProcConf	dd  ?
   StartProc  dd  ?
   StopProc  dd  ?
   GetProcID  dd  ?
   EnableRAMCache  dd  ?
   DisableRAMCache  dd	?
   FlushRAMCache  dd  ?
   ControlCacheRegion  dd  ?
   GetCacheControlInfo	dd  ?
   SetPanelUPS	dd  ?
   GetPanelUPS	dd  ?
   SetPanelProcGraphMode  dd  ?
   GetPanelProcGraphMode  dd  ?
   SetPanelProcGraphValue  dd ,?
   GetPanelProcGraphValue  dd  ?
   LogProcIdle	dd  ?
   LogProcBusy	dd  ?
   GetPanelAttnSwitchLatch  dd	?
   GetPanelOffSwitchLatch  dd  ?
   GetPanelKeyPos  dd  ?
   GetPanelAlphaNumInfo  dd  ?
   GetPanelAlphaNum  dd  ?
   SetPanelAlphaNum  dd  ?
   SetPanelOffSwitchMode  dd  ?
   GetPanelOffSwitchMode  dd  ?
   GetIntSubsysType  dd  ?
   SetGlobalIntMask  dd  ?
   GetGlobalIntMask  dd  ?
   SetLocalIntMask  dd	?
   GetLocalIntMask  dd	?
   SetAdvIntMode  dd  ?
   SetIRQVectorAssign  dd  ?
   GetIRQVectorAssign  dd  ?
   GetNumPowerSupplies	dd  ?
   GetPowerSupplyInfo  dd  ?
   DeInitEBI  dd  ?
   SetLSIVector  dd  ?
   GetLSIVector  dd  ?
   SetSPIVector  dd  ?
   GetSPIVector  dd  ?
   SetIPIVector  dd  ?
  %GetIPIVector  dd  ?
   SetIPIID  dd  ?
   GetIPIID  dd  ?
   GenIPI  dd  ?
   GenLSI  dd  ?
   GetNMISource  dd  ?
   GetSPISource  dd  ?
   GetLocalIRQStatus  dd  ?
   MaskableIntEOI  dd  ?
   NonMaskableIntEOI  dd  ?
   CancelInterrupt  dd	?
   GetSysTimer	dd  ?
   GetSysTimerFreq  dd	?
   GetNumMemBlocks  dd	?
   GetNumMemBlocks16  dd ?
   GetMemBlockInfo  dd	?
   GetMemBlockInfo16  dd ?
   GetMemErrorInfo  dd	?
   GetRevision	dd  ?
   GetNumSlots	dd  ?
   GetMMIOTable  dd  ?
   InitEBI  dd	?
   GetThermalState  dd	?
   ShutdownPowerSupply	dd  ?
   SimulatePowerFail  dd  ?
   SetPanelSwitchVisibility  dd  ?
   GetPanelSwitchVisibility  dd  ?
   GetGlobalIRQStatus  dd  ?
   FastSetLocalIntMask	dd  ?
   GetProcIntHandle  dd  ?
   RegSetLocalIntMask  dd  ?
   ASTx  dd  23 dup(?)
   OEM	dd  32 dup(?)
EBI2 ends
*/

