sm64

A Super Mario 64 decompilation
Log | Files | Refs | README | LICENSE

os_exception.h (3085B)


      1 
      2 /*====================================================================
      3  * os_exception.h
      4  *
      5  * Copyright 1995, Silicon Graphics, Inc.
      6  * All Rights Reserved.
      7  *
      8  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,
      9  * Inc.; the contents of this file may not be disclosed to third
     10  * parties, copied or duplicated in any form, in whole or in part,
     11  * without the prior written permission of Silicon Graphics, Inc.
     12  *
     13  * RESTRICTED RIGHTS LEGEND:
     14  * Use, duplication or disclosure by the Government is subject to
     15  * restrictions as set forth in subdivision (c)(1)(ii) of the Rights
     16  * in Technical Data and Computer Software clause at DFARS
     17  * 252.227-7013, and/or in similar or successor clauses in the FAR,
     18  * DOD or NASA FAR Supplement. Unpublished - rights reserved under the
     19  * Copyright Laws of the United States.
     20  *====================================================================*/
     21 
     22 /*---------------------------------------------------------------------*
     23         Copyright (C) 1998 Nintendo. (Originated by SGI)
     24         
     25         $RCSfile: os_exception.h,v $
     26         $Revision: 1.1 $
     27         $Date: 1998/10/09 08:01:07 $
     28  *---------------------------------------------------------------------*/
     29 
     30 #ifndef _OS_EXCEPTION_H_
     31 #define	_OS_EXCEPTION_H_
     32 
     33 #ifdef _LANGUAGE_C_PLUS_PLUS
     34 extern "C" {
     35 #endif
     36 
     37 #include <PR/ultratypes.h>
     38 
     39 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
     40 
     41 /**************************************************************************
     42  *
     43  * Type definitions
     44  *
     45  */
     46 
     47 typedef u32 OSIntMask;
     48 typedef u32 OSHWIntr;
     49 
     50 #endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
     51 
     52 /**************************************************************************
     53  *
     54  * Global definitions
     55  *
     56  */
     57 
     58 /* Flags for debugging purpose */
     59 
     60 #define	OS_FLAG_CPU_BREAK	1	/* Break exception has occurred */
     61 #define	OS_FLAG_FAULT		2	/* CPU fault has occurred */
     62 
     63 /* Interrupt masks */
     64 
     65 #define	OS_IM_NONE	0x00000001
     66 #define	OS_IM_SW1	0x00000501
     67 #define	OS_IM_SW2	0x00000601
     68 #define	OS_IM_CART	0x00000c01
     69 #define	OS_IM_PRENMI	0x00001401
     70 #define OS_IM_RDBWRITE	0x00002401
     71 #define OS_IM_RDBREAD	0x00004401
     72 #define	OS_IM_COUNTER	0x00008401
     73 #define	OS_IM_CPU	0x0000ff01
     74 #define	OS_IM_SP	0x00010401
     75 #define	OS_IM_SI	0x00020401
     76 #define	OS_IM_AI	0x00040401
     77 #define	OS_IM_VI	0x00080401
     78 #define	OS_IM_PI	0x00100401
     79 #define	OS_IM_DP	0x00200401
     80 #define	OS_IM_ALL	0x003fff01
     81 #define	RCP_IMASK	0x003f0000
     82 #define	RCP_IMASKSHIFT	16
     83 
     84 
     85 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
     86 
     87 /**************************************************************************
     88  *
     89  * Macro definitions
     90  *
     91  */
     92 
     93 
     94 /**************************************************************************
     95  *
     96  * Extern variables
     97  *
     98  */
     99 
    100 
    101 /**************************************************************************
    102  *
    103  * Function prototypes
    104  *
    105  */
    106 
    107 /* Interrupt operations */
    108 
    109 extern OSIntMask	osGetIntMask(void);
    110 extern OSIntMask	osSetIntMask(OSIntMask);
    111 
    112 
    113 #endif  /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */
    114 
    115 #ifdef _LANGUAGE_C_PLUS_PLUS
    116 }
    117 #endif
    118 
    119 #endif /* !_OS_EXCEPTION_H_ */