Home | History | Annotate | Line # | Download | only in arcbios
arcbios.h revision 1.2.2.1
      1  1.2.2.1  thorpej /*	$NetBSD: arcbios.h,v 1.2.2.1 2002/01/10 19:53:38 thorpej Exp $	*/
      2      1.1  thorpej 
      3      1.1  thorpej /*-
      4      1.1  thorpej  * Copyright (c) 2001 The NetBSD Foundation, Inc.
      5      1.1  thorpej  * All rights reserved.
      6      1.1  thorpej  *
      7      1.1  thorpej  * This code is derived from software contributed to The NetBSD Foundation
      8      1.1  thorpej  * by Jason R. Thorpe.
      9      1.1  thorpej  *
     10      1.1  thorpej  * Redistribution and use in source and binary forms, with or without
     11      1.1  thorpej  * modification, are permitted provided that the following conditions
     12      1.1  thorpej  * are met:
     13      1.1  thorpej  * 1. Redistributions of source code must retain the above copyright
     14      1.1  thorpej  *    notice, this list of conditions and the following disclaimer.
     15      1.1  thorpej  * 2. Redistributions in binary form must reproduce the above copyright
     16      1.1  thorpej  *    notice, this list of conditions and the following disclaimer in the
     17      1.1  thorpej  *    documentation and/or other materials provided with the distribution.
     18      1.1  thorpej  * 3. All advertising materials mentioning features or use of this software
     19      1.1  thorpej  *    must display the following acknowledgement:
     20      1.1  thorpej  *	This product includes software developed by the NetBSD
     21      1.1  thorpej  *	Foundation, Inc. and its contributors.
     22      1.1  thorpej  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23      1.1  thorpej  *    contributors may be used to endorse or promote products derived
     24      1.1  thorpej  *    from this software without specific prior written permission.
     25      1.1  thorpej  *
     26      1.1  thorpej  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27      1.1  thorpej  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28      1.1  thorpej  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29      1.1  thorpej  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30      1.1  thorpej  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31      1.1  thorpej  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32      1.1  thorpej  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33      1.1  thorpej  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34      1.1  thorpej  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35      1.1  thorpej  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36      1.1  thorpej  * POSSIBILITY OF SUCH DAMAGE.
     37      1.1  thorpej  */
     38      1.1  thorpej 
     39      1.1  thorpej /*
     40      1.1  thorpej  * The ARC BIOS (which is similar, but not 100% compatible with SGI ARCS)
     41      1.1  thorpej  * specification can be found at:
     42      1.1  thorpej  *
     43      1.1  thorpej  *	http://www.microsoft.com/hwdev/download/respec/riscspec.zip
     44      1.1  thorpej  */
     45      1.1  thorpej 
     46      1.1  thorpej #define	ARCBIOS_STDIN		0
     47      1.1  thorpej #define	ARCBIOS_STDOUT		1
     48      1.1  thorpej 
     49      1.1  thorpej #define	ARCBIOS_PAGESIZE	4096
     50      1.1  thorpej 
     51      1.1  thorpej /* ARC BIOS status codes. */
     52      1.1  thorpej #define	ARCBIOS_ESUCCESS	0	/* Success */
     53      1.1  thorpej #define	ARCBIOS_E2BIG		1	/* argument list too long */
     54      1.1  thorpej #define	ARCBIOS_EACCES		2	/* permission denied */
     55      1.1  thorpej #define	ARCBIOS_EAGAIN		3	/* resource temporarily unavailable */
     56      1.1  thorpej #define	ARCBIOS_EBADF		4	/* bad file number */
     57      1.1  thorpej #define	ARCBIOS_EBUSY		5	/* device or resource busy */
     58      1.1  thorpej #define	ARCBIOS_EFAULT		6	/* bad address */
     59      1.1  thorpej #define	ARCBIOS_EINVAL		7	/* invalid argument */
     60      1.1  thorpej #define	ARCBIOS_EIO		8	/* I/O error */
     61      1.1  thorpej #define	ARCBIOS_EISDIR		9	/* is a directory */
     62      1.1  thorpej #define	ARCBIOS_EMFILE		10	/* too many open files */
     63      1.1  thorpej #define	ARCBIOS_EMLINK		11	/* too many links */
     64      1.1  thorpej #define	ARCBIOS_ENAMETOOLONG	12	/* file name too long */
     65      1.1  thorpej #define	ARCBIOS_ENODEV		13	/* no such device */
     66      1.1  thorpej #define	ARCBIOS_ENOENT		14	/* no such file or directory */
     67      1.1  thorpej #define	ARCBIOS_ENOEXEC		15	/* exec format error */
     68      1.1  thorpej #define	ARCBIOS_ENOMEM		16	/* out of memory */
     69      1.1  thorpej #define	ARCBIOS_ENOSPC		17	/* no space left on device */
     70      1.1  thorpej #define	ARCBIOS_ENOTDIR		18	/* not a directory */
     71      1.1  thorpej #define	ARCBIOS_ENOTTY		19	/* not a typewriter */
     72      1.1  thorpej #define	ARCBIOS_ENXIO		20	/* media not loaded */
     73      1.1  thorpej #define	ARCBIOS_EROFS		21	/* read-only file system */
     74      1.1  thorpej #if defined(sgimips)
     75      1.1  thorpej #define	ARCBIOS_EADDRNOTAVAIL	31	/* address not available */
     76      1.1  thorpej #define	ARCBIOS_ETIMEDOUT	32	/* operation timed out */
     77      1.1  thorpej #define	ARCBIOS_ECONNABORTED	33	/* connection aborted */
     78      1.1  thorpej #define	ARCBIOS_ENOCONNECT	34	/* not connected */
     79      1.1  thorpej #endif /* sgimips */
     80      1.1  thorpej 
     81      1.1  thorpej /*
     82      1.1  thorpej  * 4.2.2: System Parameter Block
     83      1.1  thorpej  */
     84      1.1  thorpej struct arcbios_spb {
     85      1.1  thorpej 	uint32_t	SPBSignature;
     86      1.1  thorpej 	uint32_t	SPBLength;
     87      1.1  thorpej 	uint16_t	Version;
     88      1.1  thorpej 	uint16_t	Revision;
     89      1.1  thorpej 	void		*RestartBlock;
     90      1.1  thorpej 	void		*DebugBlock;
     91      1.1  thorpej 	void		*GEVector;
     92      1.1  thorpej 	void		*UTLBMissVector;
     93      1.1  thorpej 	uint32_t	FirmwareVectorLength;
     94      1.1  thorpej 	void		*FirmwareVector;
     95      1.1  thorpej 	uint32_t	PrivateVectorLength;
     96      1.1  thorpej 	void		*PrivateVector;
     97      1.1  thorpej 	uint32_t	AdapterCount;
     98      1.1  thorpej 	uint32_t	AdapterType;
     99      1.1  thorpej 	uint32_t	AdapterVectorLength;
    100      1.1  thorpej 	void		*AdapterVector;
    101      1.1  thorpej };
    102      1.1  thorpej 
    103      1.1  thorpej #define	ARCBIOS_SPB_SIGNATURE	0x53435241	/* A R C S */
    104      1.1  thorpej #define	ARCBIOS_SPB_SIGNATURE_1	0x41524353	/* S C R A */
    105      1.1  thorpej 
    106      1.1  thorpej /*
    107      1.1  thorpej  * 4.2.5: System Configuration Data
    108      1.1  thorpej  */
    109      1.1  thorpej struct arcbios_component {
    110      1.1  thorpej 	uint32_t	Class;
    111      1.1  thorpej 	uint32_t	Type;
    112      1.1  thorpej 	uint32_t	Flags;
    113      1.1  thorpej 	uint16_t	Version;
    114      1.1  thorpej 	uint16_t	Revision;
    115      1.1  thorpej 	uint32_t	Key;
    116      1.1  thorpej 	uint32_t	AffinityMask;
    117      1.1  thorpej 	uint32_t	ConfigurationDataSize;
    118      1.1  thorpej 	uint32_t	IdentifierLength;
    119      1.1  thorpej 	char		*Identifier;
    120      1.1  thorpej };
    121      1.1  thorpej 
    122  1.2.2.1  thorpej /*
    123  1.2.2.1  thorpej  * SGI ARCS likes to be `special', so it moved some of the class/type
    124  1.2.2.1  thorpej  * numbers around from the ARC standard definitions.
    125  1.2.2.1  thorpej  */
    126  1.2.2.1  thorpej #if defined(sgimips)
    127  1.2.2.1  thorpej /* Component Class */
    128  1.2.2.1  thorpej #define	COMPONENT_CLASS_SystemClass		0
    129  1.2.2.1  thorpej #define	COMPONENT_CLASS_ProcessorClass		1
    130  1.2.2.1  thorpej #define	COMPONENT_CLASS_CacheClass		2
    131  1.2.2.1  thorpej #define	COMPONENT_CLASS_MemoryClass		3
    132  1.2.2.1  thorpej #define	COMPONENT_CLASS_AdapterClass		4
    133  1.2.2.1  thorpej #define	COMPONENT_CLASS_ControllerClass		5
    134  1.2.2.1  thorpej #define	COMPONENT_CLASS_PeripheralClass		6
    135  1.2.2.1  thorpej #else
    136      1.1  thorpej /* Component Class */
    137      1.1  thorpej #define	COMPONENT_CLASS_SystemClass		0
    138      1.1  thorpej #define	COMPONENT_CLASS_ProcessorClass		1
    139      1.1  thorpej #define	COMPONENT_CLASS_CacheClass		2
    140      1.1  thorpej #define	COMPONENT_CLASS_AdapterClass		3
    141      1.1  thorpej #define	COMPONENT_CLASS_ControllerClass		4
    142      1.1  thorpej #define	COMPONENT_CLASS_PeripheralClass		5
    143      1.1  thorpej #define	COMPONENT_CLASS_MemoryClass		6
    144  1.2.2.1  thorpej #endif
    145  1.2.2.1  thorpej 
    146  1.2.2.1  thorpej /* Component Types */
    147  1.2.2.1  thorpej #if defined(sgimips)
    148  1.2.2.1  thorpej /* System Class */
    149  1.2.2.1  thorpej #define	COMPONENT_TYPE_ARC			0
    150  1.2.2.1  thorpej 
    151  1.2.2.1  thorpej /* Processor Class */
    152  1.2.2.1  thorpej #define	COMPONENT_TYPE_CPU			1
    153  1.2.2.1  thorpej #define	COMPONENT_TYPE_FPU			2
    154  1.2.2.1  thorpej 
    155  1.2.2.1  thorpej /* Cache Class */
    156  1.2.2.1  thorpej #define	COMPONENT_TYPE_PrimaryICache		3
    157  1.2.2.1  thorpej #define	COMPONENT_TYPE_PrimaryDCache		4
    158  1.2.2.1  thorpej #define	COMPONENT_TYPE_SecondaryICache		5
    159  1.2.2.1  thorpej #define	COMPONENT_TYPE_SecondaryDCache		6
    160  1.2.2.1  thorpej #define	COMPONENT_TYPE_SecondaryCache		7
    161  1.2.2.1  thorpej 
    162  1.2.2.1  thorpej /* Memory Class */
    163  1.2.2.1  thorpej #define	COMPONENT_TYPE_MemoryUnit		8
    164      1.1  thorpej 
    165  1.2.2.1  thorpej /* Adapter Class */
    166  1.2.2.1  thorpej #define	COMPONENT_TYPE_EISAAdapter		9
    167  1.2.2.1  thorpej #define	COMPONENT_TYPE_TCAdapter		10
    168  1.2.2.1  thorpej #define	COMPONENT_TYPE_SCSIAdapter		11
    169  1.2.2.1  thorpej #define	COMPONENT_TYPE_DTIAdapter		12
    170  1.2.2.1  thorpej #define	COMPONENT_TYPE_MultiFunctionAdapter	13
    171  1.2.2.1  thorpej 
    172  1.2.2.1  thorpej /* Controller Class */
    173  1.2.2.1  thorpej #define	COMPONENT_TYPE_DiskController		14
    174  1.2.2.1  thorpej #define	COMPONENT_TYPE_TapeController		15
    175  1.2.2.1  thorpej #define	COMPONENT_TYPE_CDROMController		16
    176  1.2.2.1  thorpej #define	COMPONENT_TYPE_WORMController		17
    177  1.2.2.1  thorpej #define	COMPONENT_TYPE_SerialController		18
    178  1.2.2.1  thorpej #define	COMPONENT_TYPE_NetworkController	19
    179  1.2.2.1  thorpej #define	COMPONENT_TYPE_DisplayController	20
    180  1.2.2.1  thorpej #define	COMPONENT_TYPE_ParallelController	21
    181  1.2.2.1  thorpej #define	COMPONENT_TYPE_PointerController	22
    182  1.2.2.1  thorpej #define	COMPONENT_TYPE_KeyboardController	23
    183  1.2.2.1  thorpej #define	COMPONENT_TYPE_AudioController		24
    184  1.2.2.1  thorpej #define	COMPONENT_TYPE_OtherController		25
    185  1.2.2.1  thorpej 
    186  1.2.2.1  thorpej /* Peripheral Class */
    187  1.2.2.1  thorpej #define	COMPONENT_TYPE_DiskPeripheral		26
    188  1.2.2.1  thorpej #define	COMPONENT_TYPE_FloppyDiskPeripheral	27
    189  1.2.2.1  thorpej #define	COMPONENT_TYPE_TapePeripheral		28
    190  1.2.2.1  thorpej #define	COMPONENT_TYPE_ModemPeripheral		29
    191  1.2.2.1  thorpej #define	COMPONENT_TYPE_MonitorPeripheral	30
    192  1.2.2.1  thorpej #define	COMPONENT_TYPE_PrinterPeripheral	31
    193  1.2.2.1  thorpej #define	COMPONENT_TYPE_PointerPeripheral	32
    194  1.2.2.1  thorpej #define	COMPONENT_TYPE_KeyboardPeripheral	33
    195  1.2.2.1  thorpej #define	COMPONENT_TYPE_TerminalPeripheral	34
    196  1.2.2.1  thorpej #define	COMPONENT_TYPE_LinePeripheral		35
    197  1.2.2.1  thorpej #define	COMPONENT_TYPE_NetworkPeripheral	36
    198  1.2.2.1  thorpej #define	COMPONENT_TYPE_OtherPeripheral		37
    199  1.2.2.1  thorpej #else /* not sgimips */
    200      1.1  thorpej /* System Class */
    201      1.1  thorpej #define	COMPONENT_TYPE_ARC			0
    202      1.1  thorpej 
    203      1.1  thorpej /* Processor Class */
    204      1.1  thorpej #define	COMPONENT_TYPE_CPU			1
    205      1.1  thorpej #define	COMPONENT_TYPE_FPU			2
    206      1.1  thorpej 
    207      1.1  thorpej /* Cache Class */
    208      1.1  thorpej #define	COMPONENT_TYPE_PrimaryICache		3
    209      1.1  thorpej #define	COMPONENT_TYPE_PrimaryDCache		4
    210      1.1  thorpej #define	COMPONENT_TYPE_SecondaryICache		5
    211      1.1  thorpej #define	COMPONENT_TYPE_SecondaryDCache		6
    212      1.1  thorpej #define	COMPONENT_TYPE_SecondaryCache		7
    213      1.1  thorpej 
    214      1.1  thorpej /* Adapter Class */
    215      1.1  thorpej #define	COMPONENT_TYPE_EISAAdapter		8
    216      1.1  thorpej #define	COMPONENT_TYPE_TCAdapter		9
    217      1.1  thorpej #define	COMPONENT_TYPE_SCSIAdapter		10
    218      1.1  thorpej #define	COMPONENT_TYPE_DTIAdapter		11
    219      1.1  thorpej #define	COMPONENT_TYPE_MultiFunctionAdapter	12
    220      1.1  thorpej 
    221      1.1  thorpej /* Controller Class */
    222      1.1  thorpej #define	COMPONENT_TYPE_DiskController		13
    223      1.1  thorpej #define	COMPONENT_TYPE_TapeController		14
    224      1.1  thorpej #define	COMPONENT_TYPE_CDROMController		15
    225      1.1  thorpej #define	COMPONENT_TYPE_WORMController		16
    226      1.1  thorpej #define	COMPONENT_TYPE_SerialController		17
    227      1.1  thorpej #define	COMPONENT_TYPE_NetworkController	18
    228      1.1  thorpej #define	COMPONENT_TYPE_DisplayController	19
    229      1.1  thorpej #define	COMPONENT_TYPE_ParallelController	20
    230      1.1  thorpej #define	COMPONENT_TYPE_PointerController	21
    231      1.1  thorpej #define	COMPONENT_TYPE_KeyboardController	22
    232      1.1  thorpej #define	COMPONENT_TYPE_AudioController		23
    233      1.1  thorpej #define	COMPONENT_TYPE_OtherController		24
    234      1.1  thorpej 
    235      1.1  thorpej /* Peripheral Class */
    236      1.1  thorpej #define	COMPONENT_TYPE_DiskPeripheral		25
    237      1.1  thorpej #define	COMPONENT_TYPE_FloppyDiskPeripheral	26
    238      1.1  thorpej #define	COMPONENT_TYPE_TapePeripheral		27
    239      1.1  thorpej #define	COMPONENT_TYPE_ModemPeripheral		28
    240      1.1  thorpej #define	COMPONENT_TYPE_MonitorPeripheral	29
    241      1.1  thorpej #define	COMPONENT_TYPE_PrinterPeripheral	30
    242      1.1  thorpej #define	COMPONENT_TYPE_PointerPeripheral	31
    243      1.1  thorpej #define	COMPONENT_TYPE_KeyboardPeripheral	32
    244      1.1  thorpej #define	COMPONENT_TYPE_TerminalPeripheral	33
    245      1.1  thorpej #define	COMPONENT_TYPE_OtherPeripheral		34
    246      1.1  thorpej #define	COMPONENT_TYPE_LinePeripheral		35
    247      1.1  thorpej #define	COMPONENT_TYPE_NetworkPeripheral	36
    248      1.1  thorpej 
    249      1.1  thorpej /* Memory Class */
    250      1.1  thorpej #define	COMPONENT_TYPE_MemoryUnit		37
    251  1.2.2.1  thorpej #endif
    252      1.1  thorpej 
    253      1.1  thorpej /* Component flags */
    254      1.1  thorpej #define	COMPONENT_FLAG_Failed			1
    255      1.1  thorpej #define	COMPONENT_FLAG_ReadOnly			2
    256      1.1  thorpej #define	COMPONENT_FLAG_Removable		4
    257      1.1  thorpej #define	COMPONENT_FLAG_ConsoleIn		8
    258      1.1  thorpej #define	COMPONENT_FLAG_ConsoleOut		16
    259      1.1  thorpej #define	COMPONENT_FLAG_Input			32
    260      1.1  thorpej #define	COMPONENT_FLAG_Output			64
    261      1.1  thorpej 
    262      1.1  thorpej /* Key for Cache: */
    263      1.1  thorpej #define	COMPONENT_KEY_Cache_CacheSize(x)				\
    264      1.1  thorpej 	(ARCBIOS_PAGESIZE << ((x) & 0xffff))
    265      1.1  thorpej #define	COMPONENT_KEY_Cache_LineSize(x)					\
    266      1.1  thorpej 	(1U << (((x) >> 16) & 0xff))
    267      1.1  thorpej #define	COMPONENT_KEY_Cache_RefillSize(x)				\
    268      1.1  thorpej 	(((x) >> 24) & 0xff)
    269      1.1  thorpej 
    270      1.1  thorpej /*
    271      1.1  thorpej  * ARC system ID
    272      1.1  thorpej  */
    273      1.2  thorpej #define	ARCBIOS_SYSID_FIELDLEN		8
    274      1.1  thorpej struct arcbios_sysid {
    275      1.2  thorpej 	char		VendorId[ARCBIOS_SYSID_FIELDLEN];
    276      1.2  thorpej 	char		ProductId[ARCBIOS_SYSID_FIELDLEN];
    277      1.1  thorpej };
    278      1.1  thorpej 
    279      1.1  thorpej /*
    280      1.1  thorpej  * ARC memory descriptor
    281      1.1  thorpej  */
    282      1.1  thorpej struct arcbios_mem {
    283      1.1  thorpej 	uint32_t	Type;
    284      1.1  thorpej 	uint32_t	BasePage;
    285      1.1  thorpej 	uint32_t	PageCount;
    286      1.1  thorpej };
    287      1.1  thorpej 
    288      1.1  thorpej #if defined(sgimips)
    289      1.1  thorpej #define	ARCBIOS_MEM_ExecptionBlock		0
    290      1.1  thorpej #define	ARCBIOS_MEM_SystemParameterBlock	1
    291      1.1  thorpej #define	ARCBIOS_MEM_FreeContiguous		2
    292      1.1  thorpej #define	ARCBIOS_MEM_FreeMemory			3
    293      1.1  thorpej #define	ARCBIOS_MEM_BadMemory			4
    294      1.1  thorpej #define	ARCBIOS_MEM_LoadedProgram		5
    295      1.1  thorpej #define	ARCBIOS_MEM_FirmwareTemporary		6
    296      1.1  thorpej #define	ARCBIOS_MEM_FirmwarePermanent		7
    297      1.1  thorpej #elif defined(arc)
    298      1.1  thorpej #define	ARCBIOS_MEM_ExceptionBlock		0
    299      1.1  thorpej #define	ARCBIOS_MEM_SystemParameterBlock	1
    300      1.1  thorpej #define	ARCBIOS_MEM_FreeMemory			2
    301      1.1  thorpej #define	ARCBIOS_MEM_BadMemory			3
    302      1.1  thorpej #define	ARCBIOS_MEM_LoadedProgram		4
    303      1.1  thorpej #define	ARCBIOS_MEM_FirmwareTemporary		5
    304      1.1  thorpej #define	ARCBIOS_MEM_FirmwarePermanent		6
    305      1.1  thorpej #define	ARCBIOS_MEM_FreeContiguous		7
    306      1.1  thorpej #endif
    307      1.1  thorpej 
    308      1.1  thorpej /*
    309      1.1  thorpej  * ARC display status
    310      1.1  thorpej  */
    311      1.1  thorpej struct arcbios_dsp_stat {
    312      1.1  thorpej 	uint16_t	CursorXPosition;
    313      1.1  thorpej 	uint16_t	CursorYPosition;
    314      1.1  thorpej 	uint16_t	CursorMaxXPosition;
    315      1.1  thorpej 	uint16_t	CursorMaxYPosition;
    316      1.1  thorpej 	uint8_t		ForegroundColor;
    317      1.1  thorpej 	uint8_t		BackgroundColor;
    318      1.1  thorpej 	uint8_t		HighIntensity;
    319      1.1  thorpej 	uint8_t		Underscored;
    320      1.1  thorpej 	uint8_t		ReverseVideo;
    321      1.1  thorpej };
    322      1.1  thorpej 
    323      1.1  thorpej /*
    324      1.1  thorpej  * ARC firmware vector
    325      1.1  thorpej  */
    326      1.1  thorpej struct arcbios_fv {
    327      1.1  thorpej 	uint32_t	(*Load)(
    328      1.1  thorpej 			    char *,		/* image to load */
    329      1.1  thorpej 			    uint32_t,		/* top address */
    330      1.1  thorpej 			    uint32_t,		/* entry address */
    331      1.1  thorpej 			    uint32_t *);	/* low address */
    332      1.1  thorpej 
    333      1.1  thorpej 	uint32_t	(*Invoke)(
    334      1.1  thorpej 			    uint32_t,		/* entry address */
    335      1.1  thorpej 			    uint32_t,		/* stack address */
    336      1.1  thorpej 			    uint32_t,		/* argc */
    337      1.1  thorpej 			    char **,		/* argv */
    338      1.1  thorpej 			    char **);		/* envp */
    339      1.1  thorpej 
    340      1.1  thorpej 	uint32_t	(*Execute)(
    341      1.1  thorpej 			    char *,		/* image path */
    342      1.1  thorpej 			    uint32_t,		/* argc */
    343      1.1  thorpej 			    char **,		/* argv */
    344      1.1  thorpej 			    char **);		/* envp */
    345      1.1  thorpej 
    346      1.1  thorpej 	void		(*Halt)(void)
    347      1.1  thorpej 			    __attribute__((__noreturn__));
    348      1.1  thorpej 
    349      1.1  thorpej 	void		(*PowerDown)(void)
    350      1.1  thorpej 			    __attribute__((__noreturn__));
    351      1.1  thorpej 
    352      1.1  thorpej 	void		(*Restart)(void)
    353      1.1  thorpej 			    __attribute__((__noreturn__));
    354      1.1  thorpej 
    355      1.1  thorpej 	void		(*Reboot)(void)
    356      1.1  thorpej 			    __attribute__((__noreturn__));
    357      1.1  thorpej 
    358      1.1  thorpej 	void		(*EnterInteractiveMode)(void)
    359      1.1  thorpej 			    __attribute__((__noreturn__));
    360      1.1  thorpej #if defined(sgimips)
    361      1.1  thorpej 	void		*reserved0;
    362      1.1  thorpej #else
    363      1.1  thorpej 	void		(*ReturnFromMain)(void)
    364      1.1  thorpej 			    __attribute__((__noreturn__));
    365      1.1  thorpej #endif
    366      1.1  thorpej 	void		*(*GetPeer)(
    367      1.1  thorpej 			    void *);		/* component */
    368      1.1  thorpej 
    369      1.1  thorpej 	void		*(*GetChild)(
    370      1.1  thorpej 			    void *);		/* component */
    371      1.1  thorpej 
    372      1.1  thorpej 	void		*(*GetParent)(
    373      1.1  thorpej 			    void *);		/* component */
    374      1.1  thorpej 
    375      1.1  thorpej 	uint32_t	(*GetConfigurationData)(
    376      1.1  thorpej 			    void *,		/* configuration data */
    377      1.1  thorpej 			    void *);		/* component */
    378      1.1  thorpej 
    379      1.1  thorpej 	void		*(*AddChild)(
    380      1.1  thorpej 			    void *,		/* component */
    381      1.1  thorpej 			    void *);		/* new component */
    382      1.1  thorpej 
    383      1.1  thorpej 	uint32_t	(*DeleteComponent)(
    384      1.1  thorpej 			    void *);		/* component */
    385      1.1  thorpej 
    386      1.1  thorpej 	uint32_t	(*GetComponent)(
    387      1.1  thorpej 			    char *);		/* path */
    388      1.1  thorpej 
    389      1.1  thorpej 	uint32_t	(*SaveConfiguration)(void);
    390      1.1  thorpej 
    391      1.1  thorpej 	void		*(*GetSystemId)(void);
    392      1.1  thorpej 
    393      1.1  thorpej 	void		*(*GetMemoryDescriptor)(
    394      1.1  thorpej 			    void *);		/* memory descriptor */
    395      1.1  thorpej #if defined(sgimips)
    396      1.1  thorpej 	void		*reserved1;
    397      1.1  thorpej #else
    398      1.1  thorpej 	void		(*Signal)(
    399      1.1  thorpej 			    uint32_t,		/* signal number */
    400      1.1  thorpej 			    void *);		/* handler */
    401      1.1  thorpej #endif
    402      1.1  thorpej 	void		*(*GetTime)(void);
    403      1.1  thorpej 
    404      1.1  thorpej 	uint32_t	(*GetRelativeTime)(void);
    405      1.1  thorpej 
    406      1.1  thorpej 	uint32_t	(*GetDirectoryEntry)(
    407      1.1  thorpej 			    uint32_t,		/* file ID */
    408      1.1  thorpej 			    void *,		/* directory entry */
    409      1.1  thorpej 			    uint32_t,		/* length */
    410      1.1  thorpej 			    uint32_t *);	/* count */
    411      1.1  thorpej 
    412      1.1  thorpej 	uint32_t	(*Open)(
    413      1.1  thorpej 			    char *,		/* path */
    414      1.1  thorpej 			    uint32_t,		/* open mode */
    415      1.1  thorpej 			    uint32_t *);	/* file ID */
    416      1.1  thorpej 
    417      1.1  thorpej 	uint32_t	(*Close)(
    418      1.1  thorpej 			    uint32_t);		/* file ID */
    419      1.1  thorpej 
    420      1.1  thorpej 	uint32_t	(*Read)(
    421      1.1  thorpej 			    uint32_t,		/* file ID */
    422      1.1  thorpej 			    void *,		/* buffer */
    423      1.1  thorpej 			    uint32_t,		/* length */
    424      1.1  thorpej 			    uint32_t *);	/* count */
    425      1.1  thorpej 
    426      1.1  thorpej 	uint32_t	(*GetReadStatus)(
    427      1.1  thorpej 			    uint32_t);		/* file ID */
    428      1.1  thorpej 
    429      1.1  thorpej 	uint32_t	(*Write)(
    430      1.1  thorpej 			    uint32_t,		/* file ID */
    431      1.1  thorpej 			    void *,		/* buffer */
    432      1.1  thorpej 			    uint32_t,		/* length */
    433      1.1  thorpej 			    uint32_t *);	/* count */
    434      1.1  thorpej 
    435      1.1  thorpej 	uint32_t	(*Seek)(
    436      1.1  thorpej 			    uint32_t,		/* file ID */
    437      1.1  thorpej 			    int64_t *,		/* offset */
    438      1.1  thorpej 			    uint32_t);		/* whence */
    439      1.1  thorpej 
    440      1.1  thorpej 	uint32_t	(*Mount)(
    441      1.1  thorpej 			    char *,		/* path */
    442      1.1  thorpej 			    uint32_t);		/* operation */
    443      1.1  thorpej 
    444      1.1  thorpej 	char		*(*GetEnvironmentVariable)(
    445      1.1  thorpej 			    char *);		/* variable */
    446      1.1  thorpej 
    447      1.1  thorpej 	uint32_t	(*SetEnvironmentVariable)(
    448      1.1  thorpej 			    char *,		/* variable */
    449      1.1  thorpej 			    char *);		/* contents */
    450      1.1  thorpej 
    451      1.1  thorpej 	uint32_t	(*GetFileInformation)(
    452      1.1  thorpej 			    uint32_t,		/* file ID */
    453      1.1  thorpej 			    void *);		/* XXX */
    454      1.1  thorpej 
    455      1.1  thorpej 	uint32_t	(*SetFileInformation)(
    456      1.1  thorpej 			    uint32_t,		/* file ID */
    457      1.1  thorpej 			    uint32_t,		/* XXX */
    458      1.1  thorpej 			    uint32_t);		/* XXX */
    459      1.1  thorpej 
    460      1.1  thorpej 	void		(*FlushAllCaches)(void);
    461      1.1  thorpej #if !defined(sgimips)
    462      1.1  thorpej 	uint32_t	(*TestUnicode)(
    463      1.1  thorpej 			    uint32_t,		/* file ID */
    464      1.1  thorpej 			    uint16_t);		/* unicode character */
    465      1.1  thorpej 
    466      1.1  thorpej 	void		*(*GetDisplayStatus)(
    467      1.1  thorpej 			    uint32_t);		/* file ID */
    468      1.1  thorpej #endif
    469      1.1  thorpej };
    470