1 #ifndef EXEC_SYSTEM_H 2 #define EXEC_SYSTEM_H 3 4 /* 5 exec system definitions (V50) 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 11 #define SYSTEMINFOTYPE_SYSTEM 0x0 12 #define SYSTEMINFOTYPE_MACHINE 0x1 13 14 15 #define SYSTEMINFOTYPE_PPC_CPUVERSION 0x2 16 #define SYSTEMINFOTYPE_PPC_CPUREVISION 0x3 17 #define SYSTEMINFOTYPE_PPC_CPUCLOCK 0x4 18 #define SYSTEMINFOTYPE_PPC_BUSCLOCK 0x5 19 20 #define SYSTEMINFOTYPE_PPC_ICACHEL1SIZE 0x10 21 #define SYSTEMINFOTYPE_PPC_ICACHEL1LINES 0x11 22 #define SYSTEMINFOTYPE_PPC_ICACHEL1LINESIZE 0x12 23 #define SYSTEMINFOTYPE_PPC_DCACHEL1SIZE 0x13 24 #define SYSTEMINFOTYPE_PPC_DCACHEL1LINES 0x14 25 #define SYSTEMINFOTYPE_PPC_DCACHEL1LINESIZE 0x15 26 #define SYSTEMINFOTYPE_PPC_CACHEL1TYPE 0x16 27 #define SYSTEMINFOTYPE_PPC_CACHEL1FLAGS 0x17 28 29 #define SYSTEMINFOTYPE_PPC_ICACHEL2SIZE 0x20 30 #define SYSTEMINFOTYPE_PPC_ICACHEL2LINES 0x21 31 #define SYSTEMINFOTYPE_PPC_ICACHEL2LINESIZE 0x22 32 #define SYSTEMINFOTYPE_PPC_DCACHEL2SIZE 0x23 33 #define SYSTEMINFOTYPE_PPC_DCACHEL2LINES 0x24 34 #define SYSTEMINFOTYPE_PPC_DCACHEL2LINESIZE 0x25 35 #define SYSTEMINFOTYPE_PPC_CACHEL2TYPE 0x26 36 #define SYSTEMINFOTYPE_PPC_CACHEL2FLAGS 0x27 37 38 #define SYSTEMINFOTYPE_PPC_ICACHEL3SIZE 0x30 39 #define SYSTEMINFOTYPE_PPC_ICACHEL3LINES 0x31 40 #define SYSTEMINFOTYPE_PPC_ICACHEL3LINESIZE 0x32 41 #define SYSTEMINFOTYPE_PPC_DCACHEL3SIZE 0x33 42 #define SYSTEMINFOTYPE_PPC_DCACHEL3LINES 0x34 43 #define SYSTEMINFOTYPE_PPC_DCACHEL3LINESIZE 0x35 44 #define SYSTEMINFOTYPE_PPC_CACHEL3TYPE 0x36 45 #define SYSTEMINFOTYPE_PPC_CACHEL3FLAGS 0x37 46 47 #define SYSTEMINFOTYPE_PPC_TLBENTRIES 0x40 48 #define SYSTEMINFOTYPE_PPC_TLBSETS 0x41 49 50 /* 51 * PowerPC has a FPU 52 */ 53 #define SYSTEMINFOTYPE_PPC_FPU 0x50 54 /* 55 * PowerPC has an Altivec unit 56 */ 57 #define SYSTEMINFOTYPE_PPC_ALTIVEC 0x51 58 /* 59 * PowerPC has performance measurement cpu extension 60 */ 61 #define SYSTEMINFOTYPE_PPC_PERFMONITOR 0x52 62 /* 63 * PowerPC has datastream cpu extension. 64 */ 65 #define SYSTEMINFOTYPE_PPC_DATASTREAM 0x53 66 /* 67 * Reservation Size 68 */ 69 #define SYSTEMINFOTYPE_PPC_RESERVATIONSIZE 0x60 70 /* 71 * Bus Timer Ticks 72 */ 73 #define SYSTEMINFOTYPE_PPC_BUSTICKS 0x61 74 /* 75 * CPU Temperature in 8.24 fixedpoint, degrees celcius 76 */ 77 #define SYSTEMINFOTYPE_PPC_CPUTEMP 0x62 78 /* 79 * PowerPC has Data Address Breakpoint Register (DABR) 80 */ 81 #define SYSTEMINFOTYPE_PPC_DABR 0x63 82 83 /* 84 * MMU Page Size 85 */ 86 #define SYSTEMINFOTYPE_PAGESIZE 0x100 87 /* 88 * Number of CPUs, doesn't mean they are all supported by exec 89 */ 90 #define SYSTEMINFOTYPE_CPUCOUNT 0x101 91 92 /* 93 * Global Scheduler statistics (exec 50.42) 94 */ 95 #define SYSTEMINFOTYPE_TBCLOCKFREQUENCY 0x200 96 #define SYSTEMINFOTYPE_UPTIMETICKS 0x201 97 #define SYSTEMINFOTYPE_LASTSECTICKS 0x202 98 #define SYSTEMINFOTYPE_RECENTTICKS 0x203 99 #define SYSTEMINFOTYPE_CPUTIME 0x204 100 #define SYSTEMINFOTYPE_LASTSECCPUTIME 0x205 101 #define SYSTEMINFOTYPE_RECENTCPUTIME 0x206 102 #define SYSTEMINFOTYPE_VOLUNTARYCSW 0x207 103 #define SYSTEMINFOTYPE_INVOLUNTARYCSW 0x208 104 #define SYSTEMINFOTYPE_LASTSECVOLUNTARYCSW 0x209 105 #define SYSTEMINFOTYPE_LASTSECINVOLUNTARYCSW 0x20a 106 #define SYSTEMINFOTYPE_LOADAVG1 0x20b 107 #define SYSTEMINFOTYPE_LOADAVG2 0x20c 108 #define SYSTEMINFOTYPE_LOADAVG3 0x20d 109 /* Added in exec 50.45 */ 110 #define SYSTEMINFOTYPE_TASKSCREATED 0x20e 111 #define SYSTEMINFOTYPE_TASKSFINISHED 0x20f 112 #define SYSTEMINFOTYPE_LAUNCHTIMETICKS 0x210 113 #define SYSTEMINFOTYPE_LAUNCHTIMETICKS1978 0x211 114 #define SYSTEMINFOTYPE_TASKSRUNNING 0x212 115 #define SYSTEMINFOTYPE_TASKSSLEEPING 0x213 116 117 /* Added in exec 50.54 */ 118 /* 119 * read only 120 */ 121 #define SYSTEMINFOTYPE_EMULHANDLESIZE 0x217 122 /* 123 * The system's global native exception handler's msgport. 124 * Is overruled by task's native exception handler msgports. 125 */ 126 #define SYSTEMINFOTYPE_EXCEPTIONMSGPORT 0x218 127 /* 128 * The system's global task exit code. 129 * Is overruled by a custom exitcode in task generation. 130 */ 131 #define SYSTEMINFOTYPE_TASKEXITCODE 0x219 132 /* 133 * The system's global 68k task exit code. 134 * Is overruled by a custom exitcode in task generation. 135 */ 136 #define SYSTEMINFOTYPE_TASKEXITCODE_M68K 0x21a 137 138 /* Added in exec 50.58 */ 139 /* 140 * emulation area start 141 * read only 142 */ 143 #define SYSTEMINFOTYPE_EMULATION_START 0x230 144 /* 145 * emulation area size 146 * read only 147 */ 148 #define SYSTEMINFOTYPE_EMULATION_SIZE 0x231 149 /* 150 * module area address 151 * read only 152 */ 153 #define SYSTEMINFOTYPE_MODULE_START 0x232 154 /* 155 * module area size 156 * read only 157 */ 158 #define SYSTEMINFOTYPE_MODULE_SIZE 0x233 159 160 /* Added in exec 50.67 */ 161 /* 162 * The system's global 68k exception handler's msgport. 163 * Is overruled by task's native exception 68k handler msgports 164 * and that's overruled by the task's 68k traphandler 165 */ 166 #define SYSTEMINFOTYPE_EXCEPTIONMSGPORT_68K 0x234 167 /* 168 * The system's global alert handler's msgport. 169 */ 170 #define SYSTEMINFOTYPE_ALERTMSGPORT 0x235 171 172 /* Added in exec 50.68 */ 173 /* 174 * The system vendor string 175 */ 176 #define SYSTEMINFOTYPE_VENDOR 0x236 177 /* 178 * The system revision string 179 */ 180 #define SYSTEMINFOTYPE_REVISION 0x237 181 182 /* Added in exec 50.73 */ 183 /* 184 * Magic fields in execbase 185 */ 186 #define SYSTEMINFOTYPE_MAGIC1 0x238 187 #define SYSTEMINFOTYPE_MAGIC2 0x239 188 /* Added in exec 51.3 */ 189 #define SYSTEMINFOTYPE_MAXHITCOUNT 0x23a 190 /* Added in exec 51.13 */ 191 #define SYSTEMINFOTYPE_MAXALERTCOUNT 0x23b 192 /* Added in exec 51.25 */ 193 #define SYSTEMINFOTYPE_REGUSER 0x23c 194 195 /* 196 * Fills 'struct FreeBlocksData' structure, with each struct MemEntry 197 * representing single free block. Normally all free blocks in all memory 198 * headers are scanned, but SYSTEMINFOTAG_MEMHEADER can be used to limit 199 * the scanning to a single memory header. If successfull, 200 * NewGetSystemAttrs return TRUE, and then fbd_NumBlocks contains the 201 * number of struct MemEntry entries filled. 202 * 203 * You can also use SYSTEMINFOTAG_HOOK to have your custom hook called 204 * rather than having array being filled. The hook is called within 205 * Forbid() and the forbid must NOT be broken. The hook is called with: 206 * A0 - struct Hook * 207 * A1 - struct MemEntry * 208 * A2 - struct MemHeader * 209 * The hook must return success/failure indicator, returning FALSE causes 210 * the NewGetSystemAttrs call to abort instantly and return FALSE. 211 */ 212 /* Added in exec 51.32 */ 213 #define SYSTEMINFOTYPE_FREEBLOCKS 0x23d 214 215 /* Added in exec 51.38 */ 216 /* 217 * CPU name as a string 218 * e.g. "603E", "7448", "970FX", "Unknown" 219 * read only 220 */ 221 #define SYSTEMINFOTYPE_CPUNAME 0x23e 222 /* 223 * CPU family name as a string 224 * e.g. "G1", "G2", "G4", "G5", "Unknown" 225 * read only 226 */ 227 #define SYSTEMINFOTYPE_CPUFAMILYNAME 0x23f 228 229 #define SYSTEMINFOTAG_DUMMY (TAG_USER + 0x112000) 230 #define SYSTEMINFOTAG_CPUINDEX (SYSTEMINFOTAG_DUMMY + 0x0) 231 #define SYSTEMINFOTAG_MEMHEADER (SYSTEMINFOTAG_DUMMY + 0x1) 232 #define SYSTEMINFOTAG_HOOK (SYSTEMINFOTAG_DUMMY + 0x2) 233 234 /* 235 * Return LONG nonzero value if system implements a new fairer 236 * task scheduler. 237 */ 238 #define SYSTEMINFOTYPE_NEWSCHEDULER 0x242 239 240 #ifdef SYSTEM_PRIVATE 241 #define SYSTEMINFOTYPE_DEVICE_TREE_SIZE 0x243 242 #define SYSTEMINFOTYPE_DEVICE_TREE 0x244 243 #endif 244 #endif