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