Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
syssgi.h
Go to the documentation of this file.
00001 
00002 /*
00003 
00004   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00005 
00006   This program is free software; you can redistribute it and/or modify it
00007   under the terms of version 2 of the GNU General Public License as
00008   published by the Free Software Foundation.
00009 
00010   This program is distributed in the hope that it would be useful, but
00011   WITHOUT ANY WARRANTY; without even the implied warranty of
00012   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00013 
00014   Further, this software is distributed without any warranty that it is
00015   free of the rightful claim of any third person regarding infringement 
00016   or the like.  Any license provided herein, whether implied or 
00017   otherwise, applies only to this software file.  Patent licenses, if 
00018   any, provided herein do not apply to combinations of this program with 
00019   other software, or any other product whatsoever.  
00020 
00021   You should have received a copy of the GNU General Public License along
00022   with this program; if not, write the Free Software Foundation, Inc., 59
00023   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00024 
00025   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00026   Mountain View, CA 94043, or:
00027 
00028   http://www.sgi.com
00029 
00030   For further information regarding this notice, see:
00031 
00032   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00033 
00034 */
00035 
00036 #ifndef __SYSSGI_H__
00037 #define __SYSSGI_H__
00038 
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042 
00043 
00044 #include <sys/types.h>
00045 
00046 /*
00047 ** syssgi() system call commands.
00048 */
00049 
00050 #define SGI_SYSID               1       /* get the system ID */
00051 #define SGI_BUFINFO             2       /* detailed buffer cache info */
00052 #define SGI_TUNE_SET            3       /* change tune values --
00053                                                 see sys/tuneable.h */
00054 #define SGI_TUNE                SGI_TUNE_SET
00055 #define SGI_IDBG                4       /* access to internal debugger */
00056 #define SGI_INVENT              5       /* hardware inventory */
00057 #define SGI_RDNAME              6       /* get name of process given pid */
00058 #define SGI_SETLED              7       /* set cpu board led state(s) */
00059 #define SGI_SETNVRAM            8       /* set nvram */
00060 #define SGI_GETNVRAM            9       /* get nvram */
00061 #define SGI_SETKOPT             10      /* call kopt_set */
00062 #define SGI_QUERY_FTIMER        12
00063 #define SGI_QUERY_CYCLECNTR     13
00064 
00065 /* Other POSIX system calls */
00066 #define SGI_SETSID              20
00067 #define SGI_SETPGID             21
00068 #define SGI_SYSCONF             22
00069 #define SGI_PATHCONF            24
00070 
00071 
00072 #define SGI_TITIMER             29      /* set [get] curthread itimer */
00073 
00074 /* Block read & Block write system calls: to allow access to > 2 gig
00075  * of space on a disk or logical volume for large filesystems.
00076  */
00077 #define SGI_READB       30
00078 #define SGI_WRITEB      31
00079 
00080 /* setgroups() and getgroups() system calls */
00081 #define SGI_SETGROUPS   40
00082 #define SGI_GETGROUPS   41
00083 
00084 #define SGI_SETTIMEOFDAY        52      /* set time including microseconds */
00085 #define SGI_SETTIMETRIM         53      /* change crystal trimmer */
00086 #define SGI_GETTIMETRIM         54
00087 #define SGI_SPROFIL             55      /* sprofil(2) entry point */
00088 #define SGI_RUSAGE              56      /* Berkeley's getrusage(2) */
00089 #define SGI_SIGSTACK            57      /* Berkeley's sigstack(2) */
00090 #define SGI_NETPROC             59      /* start network process */
00091 #define SGI_SIGALTSTACK         60      /* SVR4 sigaltstack(2) */
00092 #define SGI_BDFLUSHCNT          61      /* schedule next bdflush run */
00093 #define SGI_SSYNC               62      /* synchronous sync */
00094 #define SGI_NFSCNVT             63      /* convert file handle to descriptor */
00095 #define SGI_GETPGID             64      /* SVR4 getpgid */
00096 #define SGI_GETSID              65      /* SVR4 getsid */
00097 #define SGI_IOPROBE             66      /* I/O probing */
00098 #define SGI_CONFIG              67      /* get configuration data */
00099 #define SGI_ELFMAP              68      /* atomically mmap in an elf dso */
00100 #define SGI_MCONFIG             69      /* loadable module configuration */
00101 
00102 /*
00103  * Trusted IRIX system calls
00104  */
00105 /* mandatory access (MAC) */
00106 #define SGI_GETPLABEL           70      /* Get process label */
00107 #define SGI_SETPLABEL           71      /* Set process label */
00108 #define SGI_GETLABEL            72      /* Get file label -- SGI_MAC_GET */
00109 #define SGI_SETLABEL            73      /* Set file label -- SGI_MAC_SET */
00110 /* audit (SAT) */
00111 #define SGI_SATREAD             74      /* Read audit rec from the kernel */
00112 #define SGI_SATWRITE            75      /* Write audit rec to the kernel */
00113 #define SGI_SATCTL              76      /* Control/query the audit stream */
00114 /* extended attribute handling */
00115 #define SGI_LOADATTR            77      /* Load attributes database */
00116 #define SGI_UNLOADATTR          78      /* Unload attributes database */
00117 /* trusted sockets */
00118 #define SGI_RECVLUMSG           79      /* recvmsg() with label and uid */
00119 /* more extended attribute handling */
00120 #define SGI_PLANGMOUNT          80      /* mount() with PlanG info */
00121 /* trusted sockets with DAC */
00122 #define SGI_GETPSOACL           81      /* Get process socket ACL. */
00123 #define SGI_SETPSOACL           82      /* Set process socket ACL.  */
00124 /* still more extended attribute handling */
00125 #define SGI_CAP_GET             83      /* Get capability set from file */
00126 #define SGI_CAP_SET             84      /* Set capability set on file */
00127 #define SGI_PROC_ATTR_GET       85      /* Get the named process attribute */
00128 #define SGI_EAG_GETPROCATTR     SGI_PROC_ATTR_GET       /* Old Name */
00129 #define SGI_PROC_ATTR_SET       86      /* Set the named process attributes */
00130 #define SGI_EAG_SETPROCATTR     SGI_PROC_ATTR_SET       /* Old Name */
00131 #define SGI_REVOKE              87      /* Revoke access to a device */
00132 #define SGI_FREVOKE             SGI_REVOKE              /* Old Name */
00133 #define SGI_ACL_GET             88      /* Get Access Control List(s) */
00134 #define SGI_ACL_SET             89      /* Set Access Control List(s) */
00135 #define SGI_MAC_GET             90      /* Get MAC Label */
00136 #define SGI_MAC_SET             91      /* Set MAC Label */
00137 #define SGI_RXEV_GET            92
00138 /*
00139  * End of Trusted IRIX system calls
00140  */
00141 #define SGI_SBE_GET_INFO        98      /* get SBE count on a mc3 board*/
00142 #define SGI_SBE_CLR_INFO        99      /* clear SBE count on a mc3 board */
00143 #define SGI_GET_EVCONF          102     /* Get the "evconfig" structure
00144                                          * built by the IP19 prom. */
00145 
00146 #define SGI_MPCWAROFF           103     /* turn off libmpc WAR handling */
00147 #define SGI_SET_AUTOPWRON       104     /* set auto power on time */
00148 #define SGI_SPIPE               105     /* set stream pipe */
00149 #define SGI_SYMTAB              106     /* get runtime symtab info */
00150 #define SGI_SET_FP_PRECISE      107     /* set/clear precise FP exception mode*/
00151 #define SGI_TOSSTSAVE           108     /* toss any saved pregions */
00152 #define SGI_FDHI                109     /* return highest valid fd */
00153 #define SGI_SET_CONFIG_SMM      110     /* set/clear sequential memory mode */
00154 #define SGI_SET_FP_PRESERVE     111     /* preserve p_fpflags across exec */
00155 #define SGI_MINRSS              112     /* minrss */
00156 #define SGI_GRIO                113     /* guaranteed rate I/O */
00157 #define SGI_XLV_SET_TAB         114     /* set incore logical volume config */
00158 #define SGI_XLV_GET_TAB         115     /* get incore logical volume config */
00159 #define SGI_GET_FP_PRECISE      116     /* get precise FP exception mode */
00160 #define SGI_GET_CONFIG_SMM      117     /* get sequential memory mode */
00161 #define SGI_FP_IMPRECISE_SUPP   118     /* does hw support imprecise mode? */
00162 #define SGI_CONFIG_NSMM_SUPP    119     /* does hw support non-seq mem mode? */
00163                                         /* 120 and 121 are available */
00164 
00165 /* Frame Scheduler Timestamping Control */
00166                                                 
00167 #define SGI_RT_TSTAMP_CREATE    122 /* create timestamping buffer for specific cpu */
00168 #define SGI_RT_TSTAMP_DELETE    123 /* delete timestamping buffer */
00169 #define SGI_RT_TSTAMP_START     124 /* start logging timestamps */
00170 #define SGI_RT_TSTAMP_STOP      125 /* stop logging timestamps */
00171 #define SGI_RT_TSTAMP_ADDR      126 /* get physical addr for timestamp buffer */
00172 #define SGI_RT_TSTAMP_MASK      127 /* set tstamp mask */
00173 #define SGI_RT_TSTAMP_EOB_MODE  128 /* set end-of-buffer action */
00174                                         
00175 #define SGI_USE_FP_BCOPY        129     /* should bcopy/bzero use fp? */
00176 
00177 #define SGI_GET_UST             130     /* get unadjusted system time value */
00178 
00179 #define SGI_SPECULATIVE_EXEC    131     /* turn speculative execution on/off */
00180 
00181 #define SGI_XLV_NEXT_RQST       132     /* wait for next xlv configuration
00182                                            request. */
00183 #define SGI_XLV_ATTR_CURSOR     133     /* get cursor for xlv attributes */
00184 #define SGI_XLV_ATTR_GET        134     /* get xlv attribute value */
00185 #define SGI_XLV_ATTR_SET        135     /* set xlv attribute */
00186 
00187 /* btool - code coverage - only used when compiled with -DBTOOL */
00188 #define SGI_BTOOLSIZE           136
00189 #define SGI_BTOOLGET            137
00190 #define SGI_BTOOLREINIT         138
00191 
00192 #define SGI_CREATE_UUID         139     /* create a DCE-defined UUID */
00193 
00194 /* disable CSR_EXCEPT while in GL address space */
00195 #define SGI_NOFPE               140     /* disable CSR_EXCEPT */
00196 
00197 #define SGI_OLD_SOFTFP          141     /* use old (asm) softfp code */
00198 #define SGI_FS_INUMBERS         142     /* xfs get inode number table */
00199 #define SGI_FS_BULKSTAT         143     /* xfs get stat64 info in bulk */
00200 
00201 /* more Frame Scheduler calls */
00202 #define SGI_RT_TSTAMP_WAIT      144     /* wait for tstamp buffer to reach 2/3 watermark */
00203 #define SGI_RT_TSTAMP_UPDATE    145     /* update fifo buffer head index */
00204 
00205 /* things needed by xFS dump and xFS-based DMIG interfaces */
00206 #define SGI_PATH_TO_HANDLE      146     /* get a file's file handle        */
00207 #define SGI_PATH_TO_FSHANDLE    147     /* get a file's file system handle */
00208 #define SGI_FD_TO_HANDLE        148     /* get an open file's file handle  */
00209 #define SGI_OPEN_BY_HANDLE      149     /* open a file given a file handle */
00210 #define SGI_READLINK_BY_HANDLE  150     /* read a link using a file handle */
00211 
00212 #define SGI_READ_DANGID         151     /* Probe for Dang existance */
00213 
00214 /* Sizing constants used by kmem readers */
00215 #define SGI_CONST               152     /* System sizing constants */
00216 #define SGI_XFS_FSOPERATIONS    153     /* entry of xfs extended operations */
00217 
00218 
00219 /* Extended accounting functions */
00220 #define SGI_SETASH              154     /* set array session handle */
00221 #define SGI_GETASH              155     /* get array session handle */
00222 #define SGI_SETPRID             156     /* set project ID */
00223 #define SGI_GETPRID             157     /* get project ID */
00224 #define SGI_SETSPINFO           158     /* set service provider info */
00225 #define SGI_GETSPINFO           159     /* get service provider info */
00226 #define SGI_SHAREII             160     /* ShareII product syscall */
00227 #define SGI_NEWARRAYSESS        161     /* start new array session */
00228 #define SGI_GETDFLTPRID         162     /* get system default project ID */
00229 #define SGI_SET_DISMISSED_EXC_CNT 163   /* set dismissed exception count */
00230 #define SGI_GET_DISMISSED_EXC_CNT 164   /* get dismissed exception count */
00231 /* More cycle counter support */
00232 #define SGI_CYCLECNTR_SIZE      165     /* Size user needs to use to read CC */
00233 #define SGI_QUERY_FASTTIMER     166     /* period of fast itimers in ns */
00234 #define SGI_PIDSINASH           167     /* List PIDs in given array session */
00235 #define SGI_ULI                 168
00236 
00237 #define SGI_CACHEFS_SYS         171             /* CacheFS system call */
00238 #define SGI_NFSNOTIFY           172             /* lockd client/server failure */
00239 #define SGI_LOCKDSYS            173             /* set lockd options & client name */
00240 
00241 /*
00242  * Performance monitoring calls
00243  */
00244 #define SGI_EVENTCTR            174
00245 #define SGI_GETPRUSAGE          175
00246 
00247 #define SGI_PROCMASK_LOCATION   176
00248 
00249 #define SGI_CKPT_SYS            178     /* checkpoint/restart system call */
00250 #define SGI_GETGRPPID           179     /* return a list of pids for a given group */
00251 #define SGI_GETSESPID           180     /* return a list of pids for a given session */
00252 
00253 #define SGI_ENUMASHS            181     /* return a list of all active ASHs */
00254 #define SGI_SETASMACHID         182     /* set array machine ID */
00255 #define SGI_GETASMACHID         183     /* get array machine ID */
00256 #define SGI_GETARSESS           184     /* retrieve arsess info */
00257 #define SGI_JOINARRAYSESS       185     /* join existing array session */
00258 
00259 #define SGI_DBA_CONFIG          187     /* DBA: get/set database accelerator */
00260                                         /* features */
00261 
00262 
00263 /* similar to uname() system call, but returns "official name" for hardware
00264  * specific releases from the base release.  Takes a count and pointer
00265  * to a buffer in which to place the name.  name will be no more than 256
00266  * characters.
00267 */
00268 #define SGI_RELEASE_NAME        188
00269 
00270 /* return handler to synchronize icache with dcache */
00271 #define SGI_SYNCH_CACHE_HANDLER 189
00272 #define SGI_SWASH_INIT          190     /* SoftWindows Address Space Helper */
00273 
00274 
00275 /*
00276  * These calls are to support multiple serial numbers for systems built from
00277  *  SN0/SN0 modules.
00278 */
00279 
00280 #define SGI_NUM_MODULES         191
00281 #define SGI_MODULE_INFO         192
00282 
00283 /*
00284  * Return information about an execution context (uproc, uthread, sthread,
00285  * ithread, etc.).  These are currently for internal use only.  They may be
00286  * replaced by a completely new context information facility.
00287  */
00288 #define SGI_GET_CONTEXT_NAME    193     /* return name */
00289 #define SGI_GET_CONTEXT_INFO    194     /* reserved */
00290 
00291 /*
00292  * Partition management.
00293  */
00294 #define SGI_PART_OPERATIONS     195     /* Partition management support */
00295 
00296 /*
00297  * Swap control
00298  */
00299 #define SGI_EARLY_ADD_SWAP      197     /* Used to add swap early in boot */
00300 
00301 /*
00302  * Numa Memory Management
00303  */
00304 
00305 #define SGI_NUMA_MIGR_PAGE      200     /* migrate a page */
00306 #define SGI_NUMA_MIGR_PAGE_ALT  201     /* migrate a page of other processes */
00307 
00308 #define SGI_KAIO_USERINIT       202     /* DBA: kernel asyncio process initialization */
00309 #define SGI_KAIO_READ           203     /* DBA: kernel asyncio read request */
00310 #define SGI_KAIO_WRITE          204     /* DBA: kernel asyncio write request */
00311 #define SGI_KAIO_SUSPEND        205     /* DBA: kernel asyncio nap till N I/Os complete */
00312 /*#define SGI_KAIO_STATS        206*/   /* use (SGI_DBA_GETSTATS,dba_stat_t *buf,sz,-1) */
00313 #define SGI_DBA_GETSTATS        206     /* database accelerator stats (see 232)*/
00314 
00315 /*
00316  * syscall to get the auxlliary info for a device
00317  */
00318 #define SGI_IO_SHOW_AUX_INFO    207
00319 
00320 #define SGI_PMOCTL              208     /* policy control */
00321 
00322 #define SGI_ALLOCSHARENA        209     /* allocate shared arena & pin pages */
00323 #define SGI_SETVPID             210     /* set vpid in proc structure        */
00324 #define SGI_GETVPID             211     /* get vpid in proc structure        */
00325 
00326 /*
00327  * Tune NUMA migration related parameters
00328  */
00329 #define SGI_NUMA_TUNE           212
00330 
00331 #define SGI_ERROR_FORCE         214     /* Error injection for kernel testing*/
00332 
00333 /* numa statictics */
00334 #define SGI_NUMA_STATS_GET      218
00335 
00336 /*
00337  * syscall for data pipe file system pipe end 
00338  */
00339 #define SGI_DPIPE_FSPE_BIND     219     /* bind a scatter gather list with
00340                                            a (pipe_id, transfer_id) pair. */
00341 
00342 #define SGI_DYIELD              220     /* Yield processor to specified process */
00343 #define SGI_TUNE_GET            221     /* Get tuneable value */
00344 #define SGI_CHPROJ              222     /* chproj - project id of an inode */
00345 #define SGI_LCHPROJ             223     /* lchproj */
00346 #define SGI_FCHPROJ             224     /* fchproj */
00347 
00348 #define SGI_ARSESS_CTL          225     /* Global array session controls */
00349 #define SGI_ARSESS_OP           226     /* Array session operation */
00350 
00351 /* setup fault handler to make a vaddr range fetchopable */
00352 #define SGI_FETCHOP_SETUP       227
00353 
00354 #define SGI_FS_BULKSTAT_SINGLE  228     /* xfs get stat64 info for 1 inode */
00355 
00356 #define SGI_WRITE_IP32_FLASH    230     /* write IP32 prom image */
00357 
00358 #define SGI_ROUTERSTATS_ENABLED 231     /* access to state of 
00359                                            gather_craylink_routerstats */
00360 
00361 #define SGI_DBA_CLRSTATS        232     /* database accelerator stats (see 206)*/
00362 #define SGI_IPC_AUTORMID_SHM    233     /* is IPC_AUTORMID for shm present? */
00363 
00364 #define SGI_IS_DEBUG_KERNEL     300     /* is this a debug kernel? */
00365 #define SGI_IS_TRAPLOG_DEBUG_KERNEL 301 /* is this a TRAPLOG debug kernel? */
00366 
00367 #define SGI_POKE                320     /* kernel mode poke DEBUG only */
00368 #define SGI_PEEK                321     /* kernel mode peek DEBUG only */
00369 
00370 #define SGI_XLV_INDUCE_IO_ERROR         350  /* insert an I/O error at random 
00371                                                 into XLV. This is used in XFS
00372                                                 error handling testing. */
00373 #define SGI_XLV_UNINDUCE_IO_ERROR       351
00374 #define SGI_DKSC_INDUCE_IO_ERROR        352
00375 #define SGI_DKSC_UNINDUCE_IO_ERROR      353
00376 
00377 /*
00378  * enable/disable up to XFS_NUM_INJECT_ERROR (10) tests in the kernel
00379  * that will be failed the next time they're hit.  The first two take
00380  * one extra parameter, the tag of the error to be enabled/disabled and
00381  * return 1 if successful and 0 if not.
00382  * The third (clearall) takes no extra parameters and returns nothing.
00383  */
00384 #define SGI_XFS_INJECT_ERROR    360
00385 #define SGI_XFS_CLEAR_ERROR     361
00386 #define SGI_XFS_CLEARALL_ERROR  362
00387 
00388 #define SGI_XFS_MAKE_SHARED_RO  363     /* mark an XFS filesystem as */
00389                                         /* a shared read-only filesystem */
00390                                         /* on the next unmount */
00391 #define SGI_XFS_CLEAR_SHARED_RO 364     /* will undo above operation if */
00392                                         /* called *before* the filesystem */
00393                                         /* is unmounted */
00394 
00395 #define SGI_FO_DUMP             400
00396 #define SGI_FO_SWITCH           401
00397 #define SGI_NOHANG              402     /* don't hang on NFS servers */
00398 #define SGI_UNFS                403     /* unwedge NFS at exit */
00399 
00400 
00401 #define SGI_ATTR_LIST_BY_HANDLE 404     /* attr_list syscall using file handle */
00402 #define SGI_ATTR_MULTI_BY_HANDLE 405    /* attr_multi syscall using a file handle */
00403 #define SGI_FSSETDM_BY_HANDLE   406     /* set DMAPI attributes by handle */
00404 
00405 #define SGI_PHYSP               1011    /* get phys pgno for vaddr */
00406 
00407 /*
00408  * kernel threads temporary
00409  */
00410 #define SGI_KTHREAD             1012
00411 
00412 /*
00413  * Special (sgi use only) diagnostic interfaces
00414  */
00415 #define SGI_FLUSH_ICACHE        1015    /* (sgi use only) flush icache for diagnostics */
00416 
00417 /*reserved                      1020*/
00418 
00419 /*
00420  * Allocate a large page.
00421  */
00422 #define SGI_DEBUGLPAGE          1030
00423 
00424 /*
00425  * Map the address space of a process to a different page size.
00426  */
00427 #define SGI_MAPLPAGE            1031
00428 
00429 
00430 #ifdef DEBUG
00431 #define SGI_MUTEX_TEST           1040
00432 #define SGI_MUTEX_TEST_INIT      1041
00433 #define SGI_MUTEX_TESTER_INIT    1042
00434 #endif
00435 
00436 /*
00437  * Miser test syssgi calls.
00438  */
00439 #define SGI_CREATE_MISER_POOL   1043
00440 #define SGI_CREATE_MISER_JOB    1044
00441 #define SGI_MISER_CRITICAL      1045
00442 
00443 /*
00444  * Context switch testing
00445  */
00446 #define SGI_CONTEXT_SWITCH       1046
00447 #define SGI_MRLOCK_TEST_INIT    1047
00448 #define SGI_MRLOCK_TEST_RLOCK   1048
00449 
00450 /*
00451  * Kmem zone perf. test call and other shaked test hooks.
00452  */
00453 #define SGI_KMEM_TEST           1051
00454 #define SGI_SHAKE_ZONES         1052    /* Shake a zone */
00455 
00456 /*
00457  * CA UniCenter entry point.
00458  */
00459 #define SGI_UNICENTER           1053
00460 
00461 
00462 /*
00463  * Cell entry point.
00464  */
00465 #define SGI_CELL                1060
00466 
00467 /* SGI_CELL suboptions */
00468 enum {
00469         SGI_IS_OS_CELLULAR ,     /* OS cellular or not */
00470         SGI_CELL_PID_TO_CELLID, /* cell a proc is running on */
00471         SGI_CELL_OBJ_EVICT,     /* evict an object */
00472         SGI_LEAVE_MEMBERSHIP,   /* Cell leaves a membership */  
00473         SGI_SEND_TEST_MESG,     /* Send a test message to a given cell*/
00474         SGI_FAIL_CELL,          /* Cell commits suicdie */      
00475         SGI_MEMBERSHIP_STATS ,  /* cell membership statistics */
00476         SGI_MESG_STATS         /* inter cell message statistice */
00477 };
00478 
00479 /* suboptions for SGI_MESG_STATS */
00480 enum {
00481         SGI_RESET_COUNT , /* Reset message statistice */
00482         SGI_REPORT_MESSAGE_COUNT, /* Report message count */
00483         SGI_REPORT_MESSAGE_STATS, /* Report message statistics */
00484         SGI_REPORT_MESSAGESIZE_COUNT , /*Reports message size counts */
00485         SGI_REPORT_MESSAGESIZE_STATS /*Report message size statistice */
00486 };
00487 
00488 
00489 /* 
00490  * 1100 - 1110 are reserved for NUMA Memory Management tests
00491  */
00492 
00493 /* testing hooks for NUMA simulation on Everest */
00494 #define SGI_NUMA_MIGR_INT_VADDR  1100
00495 #define SGI_NUMA_MIGR_INT_PFN    1101
00496 #define SGI_NUMA_PAGEMIGR_TEST   1102
00497 #define SGI_NUMA_TESTS           1103
00498 #define SGI_NUMA_RESERVED        1104
00499 
00500 #define SGI_MEMPROF_START        1105
00501 #define SGI_MEMPROF_GET          1106
00502 #define SGI_MEMPROF_CLEARALL     1107
00503 #define SGI_MEMPROF_STOP         1108
00504 
00505 #define SGI_HW_CPU_CONFREG       1200
00506 #define SGI_UPANIC_SET           1201
00507 #define SGI_UPANIC               1202
00508 
00509 /* Flags needed for SGI_NUMA_PAGEMIGR_TEST syscall */
00510 #define VA_PROC 0
00511 #define VA_INTR 1
00512 #define PA_PROC 2
00513 #define PA_INTR 3
00514 
00515 /*
00516  * kernel pathconf() must know whether called by fpathconf or 
00517  * pathconf--i.e how to interpret the 1st parameter.  (It is not
00518  * currently used at all, but may be in the future.)
00519  */
00520 #define PATHCONF        1
00521 #define FPATHCONF       2
00522 
00523 
00524 #define GET_SYSID       SGI_SYSID       /* compatability */
00525 #define MAXSYSIDSIZE    64      /* maximum size in bytes of the system id   */
00526 
00527 /* hardware inventory options */
00528 #define SGI_INV_SIZEOF  1       /* get sizeof inventory struct */
00529 #define SGI_INV_READ    2       /* read inventory table */
00530 
00531 /* configuration data options */
00532 #define ADAP_READ       1
00533 #define ADD_NODE        2
00534 #define DELETE_NODE     3
00535 #define GET_NODE        4
00536 
00537 /* IO probe directions */
00538 #define IOPROBE_READ    0
00539 #define IOPROBE_WRITE   1
00540 
00541 /* nvram options */
00542 #define SGI_NVSTRSIZE   4096    /* Fru output buf 3K, need at least this*/
00543 
00544 /* SGI_MINRSS options */
00545 #define MINRSS_ADDPNAME         1
00546 #define MINRSS_DELPNAME         2
00547 #define MINRSS_LISTPNAME        3
00548 #define MINRSS_ADDVNODE         4
00549 #define MINRSS_DELVNODE         5
00550 #define MINRSS_LISTVNODE        6
00551 /* struct for LISTPNAME */
00552 #define MINRSS_PNAMESZ          20
00553 
00554 typedef long pgno_t; /* added for rehosting - sunchan */
00555 
00556 struct getpname {
00557         char g_name[MINRSS_PNAMESZ];
00558         pgno_t g_minrss;
00559 };
00560 /* struct for LISTVNODE */
00561 struct getvnode {
00562         dev_t g_fsid;
00563         ino_t g_nodeid;
00564         pgno_t g_minrss;
00565 };
00566 
00567 #ifdef _KERNEL
00568 struct irix5_getvnode {
00569         __int32_t g_fsid;
00570         __uint32_t g_nodeid;
00571         __int32_t g_minrss;
00572 };
00573 #endif
00574 
00575 /* EXTENDED MEMORY operations (though sgifastpath syscall)
00576  * Intended to be used by the HIPPI controller to provide a fastpath for
00577  * low latency memory operations.  Device driver will specify a range of
00578  * addresses which the user can read/write using the following syssgi calls.
00579  */
00580 #define SGIFAST_PIOMEM_BREAD32  0       /* extended memory block read */
00581 #define SGIFAST_PIOMEM_BWRITE32 1       /* extended memory block write */
00582 #define SGIFAST_PIOMEM_NULL     2       /* extended memory NOP */
00583 
00584 /*
00585  * SGI_CONST parameters
00586  */
00587 #define SGICONST_MBUF           1       /* Mbuf */
00588 #define SGICONST_PTE            2       /* Pte */
00589 #define SGICONST_PAGESZ         3       /* _PAGESZ */
00590 #define SGICONST_PARAM          4       /* Param */
00591 
00592 /* SGI_ULI options */
00593 enum {
00594     /* These options are used from the top half of a process, i.e. they
00595      * are ordinary system calls
00596      */
00597 
00598     ULI_SLEEP,
00599     ULI_DEBUG,
00600     ULI_SET_DEBUG_SIG,
00601 
00602     /* These options are used from the bottom half of the process, i.e.
00603      * they are interrupt mode calls
00604      */
00605 
00606     ULI_RETURN,
00607     ULI_CPUID,
00608     ULI_WAKEUP,
00609     ULI_CONWRITE,
00610 
00611     ULI_MAXCALL
00612 };
00613 
00614 /*
00615  * SGI_PROCMASK_LOCATION options
00616  */
00617 #define USER_LEVEL      1
00618 #define KERNEL_LEVEL    2
00619 
00620 #if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)
00621 #ifndef _KERNEL
00622 #include <stddef.h>
00623 extern ptrdiff_t syssgi(int, ...);
00624 #endif /* !_KERNEL */
00625 #endif
00626 
00627 #if _KERNEL
00628 #include <sys/systm.h>
00629 
00630 struct syssgia {
00631         sysarg_t cmd;
00632         sysarg_t arg1, arg2, arg3, arg4, arg5, arg6, arg7;
00633 };
00634 
00635 extern int syssgi(struct syssgia *, rval_t *);
00636 
00637 /* procscan parameters for findash */
00638 struct findashinfo {
00639         ash_t   ash;
00640         pid_t   *useraddr;
00641         int     usermax;
00642         int     count;
00643         int     current;
00644         int     errno;
00645 };
00646 #endif  /* _KERNEL */
00647 
00648 #ifdef __cplusplus
00649 }
00650 #endif
00651 #endif /* __SYSSGI_H__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines