Annotation of OSKit-Mach/include/mach/machine.h, revision 1.1.1.1

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  * 
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  * 
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  * 
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  * 
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  * 
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*     File:   machine.h
                     27:  *     Author: Avadis Tevanian, Jr.
                     28:  *     Date:   1986
                     29:  *
                     30:  *     Machine independent machine abstraction.
                     31:  */
                     32: 
                     33: #ifndef        _MACH_MACHINE_H_
                     34: #define _MACH_MACHINE_H_
                     35: 
                     36: #ifdef MACH_KERNEL
                     37: #include <cpus.h>
                     38: #endif /* MACH_KERNEL */
                     39: 
                     40: #include <mach/machine/vm_types.h>
                     41: #include <mach/boolean.h>
                     42: 
                     43: /*
                     44:  *     For each host, there is a maximum possible number of
                     45:  *     cpus that may be available in the system.  This is the
                     46:  *     compile-time constant NCPUS, which is defined in cpus.h.
                     47:  *
                     48:  *     In addition, there is a machine_slot specifier for each
                     49:  *     possible cpu in the system.
                     50:  */
                     51: 
                     52: struct machine_info {
                     53:        integer_t       major_version;  /* kernel major version id */
                     54:        integer_t       minor_version;  /* kernel minor version id */
                     55:        integer_t       max_cpus;       /* max number of cpus compiled */
                     56:        integer_t       avail_cpus;     /* number actually available */
                     57:        vm_size_t       memory_size;    /* size of memory in bytes */
                     58: };
                     59: 
                     60: typedef struct machine_info    *machine_info_t;
                     61: typedef struct machine_info    machine_info_data_t;    /* bogus */
                     62: 
                     63: typedef integer_t      cpu_type_t;
                     64: typedef integer_t      cpu_subtype_t;
                     65: 
                     66: #define CPU_STATE_MAX          3
                     67: 
                     68: #define CPU_STATE_USER         0
                     69: #define CPU_STATE_SYSTEM       1
                     70: #define CPU_STATE_IDLE         2
                     71: 
                     72: struct machine_slot {
                     73: /*boolean_t*/integer_t is_cpu;         /* is there a cpu in this slot? */
                     74:        cpu_type_t      cpu_type;       /* type of cpu */
                     75:        cpu_subtype_t   cpu_subtype;    /* subtype of cpu */
                     76: /*boolean_t*/integer_t running;        /* is cpu running */
                     77:        integer_t       cpu_ticks[CPU_STATE_MAX];
                     78:        integer_t       clock_freq;     /* clock interrupt frequency */
                     79: };
                     80: 
                     81: typedef struct machine_slot    *machine_slot_t;
                     82: typedef struct machine_slot    machine_slot_data_t;    /* bogus */
                     83: 
                     84: #ifdef MACH_KERNEL
                     85: extern struct machine_info     machine_info;
                     86: extern struct machine_slot     machine_slot[NCPUS];
                     87: #endif /* MACH_KERNEL */
                     88: 
                     89: /*
                     90:  *     Machine types known by all.
                     91:  *
                     92:  *     When adding new types & subtypes, please also update slot_name.c
                     93:  *     in the libmach sources.
                     94:  */
                     95: 
                     96: #define CPU_TYPE_VAX           ((cpu_type_t) 1)
                     97: #define CPU_TYPE_ROMP          ((cpu_type_t) 2)
                     98: #define CPU_TYPE_MC68020       ((cpu_type_t) 3)
                     99: #define CPU_TYPE_NS32032       ((cpu_type_t) 4)
                    100: #define CPU_TYPE_NS32332        ((cpu_type_t) 5)
                    101: #define CPU_TYPE_NS32532        ((cpu_type_t) 6)
                    102: #define CPU_TYPE_I386          ((cpu_type_t) 7)
                    103: #define CPU_TYPE_MIPS          ((cpu_type_t) 8)
                    104: #define        CPU_TYPE_MC68030        ((cpu_type_t) 9)
                    105: #define CPU_TYPE_MC68040       ((cpu_type_t) 10)
                    106: #define CPU_TYPE_HPPA           ((cpu_type_t) 11)
                    107: #define CPU_TYPE_ARM           ((cpu_type_t) 12)
                    108: #define CPU_TYPE_MC88000       ((cpu_type_t) 13)
                    109: #define CPU_TYPE_SPARC         ((cpu_type_t) 14)
                    110: #define CPU_TYPE_I860          ((cpu_type_t) 15)
                    111: #define        CPU_TYPE_ALPHA          ((cpu_type_t) 16)
                    112: #define CPU_TYPE_I486          ((cpu_type_t) 17)
                    113: #define CPU_TYPE_PENTIUM       ((cpu_type_t) 18)
                    114: #define CPU_TYPE_PENTIUMPRO    ((cpu_type_t) 19)
                    115: #define CPU_TYPE_POWERPC       ((cpu_type_t) 20)
                    116: 
                    117: /*
                    118:  *     Machine subtypes (these are defined here, instead of in a machine
                    119:  *     dependent directory, so that any program can get all definitions
                    120:  *     regardless of where is it compiled).
                    121:  */
                    122: 
                    123: /*
                    124:  *     VAX subtypes (these do *not* necessarily conform to the actual cpu
                    125:  *     ID assigned by DEC available via the SID register).
                    126:  */
                    127: 
                    128: #define CPU_SUBTYPE_VAX780     ((cpu_subtype_t) 1)
                    129: #define CPU_SUBTYPE_VAX785     ((cpu_subtype_t) 2)
                    130: #define CPU_SUBTYPE_VAX750     ((cpu_subtype_t) 3)
                    131: #define CPU_SUBTYPE_VAX730     ((cpu_subtype_t) 4)
                    132: #define CPU_SUBTYPE_UVAXI      ((cpu_subtype_t) 5)
                    133: #define CPU_SUBTYPE_UVAXII     ((cpu_subtype_t) 6)
                    134: #define CPU_SUBTYPE_VAX8200    ((cpu_subtype_t) 7)
                    135: #define CPU_SUBTYPE_VAX8500    ((cpu_subtype_t) 8)
                    136: #define CPU_SUBTYPE_VAX8600    ((cpu_subtype_t) 9)
                    137: #define CPU_SUBTYPE_VAX8650    ((cpu_subtype_t) 10)
                    138: #define CPU_SUBTYPE_VAX8800    ((cpu_subtype_t) 11)
                    139: #define CPU_SUBTYPE_UVAXIII    ((cpu_subtype_t) 12)
                    140: 
                    141: /*
                    142:  *     ROMP subtypes.
                    143:  */
                    144: 
                    145: #define CPU_SUBTYPE_RT_PC      ((cpu_subtype_t) 1)
                    146: #define CPU_SUBTYPE_RT_APC     ((cpu_subtype_t) 2)
                    147: #define CPU_SUBTYPE_RT_135     ((cpu_subtype_t) 3)
                    148: 
                    149: /*
                    150:  *     68020 subtypes.
                    151:  */
                    152: 
                    153: #define CPU_SUBTYPE_SUN3_50    ((cpu_subtype_t) 1)
                    154: #define CPU_SUBTYPE_SUN3_160   ((cpu_subtype_t) 2)
                    155: #define CPU_SUBTYPE_SUN3_260   ((cpu_subtype_t) 3)
                    156: #define CPU_SUBTYPE_SUN3_110   ((cpu_subtype_t) 4)
                    157: #define CPU_SUBTYPE_SUN3_60    ((cpu_subtype_t) 5)
                    158: 
                    159: #define CPU_SUBTYPE_HP_320     ((cpu_subtype_t) 6)
                    160:        /* 16.67 Mhz HP 300 series, custom MMU [HP 320] */
                    161: #define CPU_SUBTYPE_HP_330     ((cpu_subtype_t) 7)
                    162:        /* 16.67 Mhz HP 300 series, MC68851 MMU [HP 318,319,330,349] */
                    163: #define CPU_SUBTYPE_HP_350     ((cpu_subtype_t) 8)
                    164:        /* 25.00 Mhz HP 300 series, custom MMU [HP 350] */
                    165: 
                    166: /*
                    167:  *     32032/32332/32532 subtypes.
                    168:  */
                    169: 
                    170: #define CPU_SUBTYPE_MMAX_DPC       ((cpu_subtype_t) 1) /* 032 CPU */
                    171: #define CPU_SUBTYPE_SQT                    ((cpu_subtype_t) 2)
                    172: #define CPU_SUBTYPE_MMAX_APC_FPU    ((cpu_subtype_t) 3)        /* 32081 FPU */
                    173: #define CPU_SUBTYPE_MMAX_APC_FPA    ((cpu_subtype_t) 4)        /* Weitek FPA */
                    174: #define CPU_SUBTYPE_MMAX_XPC       ((cpu_subtype_t) 5) /* 532 CPU */
                    175: #define CPU_SUBTYPE_PC532           ((cpu_subtype_t) 6) /* pc532 board */
                    176: 
                    177: /*
                    178:  *     80386/80486 subtypes.
                    179:  */
                    180: 
                    181: #define CPU_SUBTYPE_AT386      ((cpu_subtype_t) 1)
                    182: #define CPU_SUBTYPE_EXL                ((cpu_subtype_t) 2)
                    183: #define CPU_SUBTYPE_iPSC386    ((cpu_subtype_t) 3)
                    184: #define        CPU_SUBTYPE_SYMMETRY    ((cpu_subtype_t) 4)
                    185: #define CPU_SUBTYPE_PS2         ((cpu_subtype_t) 5)    /* PS/2 w/ MCA */
                    186: 
                    187: /*
                    188:  *     Mips subtypes.
                    189:  */
                    190: 
                    191: #define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1)
                    192: #define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2)
                    193: #define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3)
                    194: #define CPU_SUBTYPE_MIPS_R2000a        ((cpu_subtype_t) 4)     /* pmax */
                    195: #define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5)
                    196: #define CPU_SUBTYPE_MIPS_R3000a        ((cpu_subtype_t) 6)     /* 3max */
                    197: #define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7)
                    198: 
                    199: /*
                    200:  *     MC68030 subtypes.
                    201:  */
                    202: 
                    203: #define CPU_SUBTYPE_NeXT       ((cpu_subtype_t) 1) 
                    204:        /* NeXt thinks MC68030 is 6 rather than 9 */
                    205: #define CPU_SUBTYPE_HP_340     ((cpu_subtype_t) 2) 
                    206:        /* 16.67 Mhz HP 300 series [HP 332,340] */
                    207: #define CPU_SUBTYPE_HP_360     ((cpu_subtype_t) 3) 
                    208:        /* 25.00 Mhz HP 300 series [HP 360] */
                    209: #define CPU_SUBTYPE_HP_370     ((cpu_subtype_t) 4) 
                    210:        /* 33.33 Mhz HP 300 series [HP 370] */
                    211: 
                    212: /*
                    213:  *     HPPA subtypes.
                    214:  */
                    215: 
                    216: #define CPU_SUBTYPE_HPPA_825   ((cpu_subtype_t) 1)
                    217: #define CPU_SUBTYPE_HPPA_835   ((cpu_subtype_t) 2)
                    218: #define CPU_SUBTYPE_HPPA_840   ((cpu_subtype_t) 3)
                    219: #define CPU_SUBTYPE_HPPA_850   ((cpu_subtype_t) 4)
                    220: #define CPU_SUBTYPE_HPPA_855   ((cpu_subtype_t) 5)
                    221: 
                    222: /* 
                    223:  *     ARM subtypes.
                    224:  */
                    225: 
                    226: #define CPU_SUBTYPE_ARM_A500_ARCH      ((cpu_subtype_t) 1)
                    227: #define CPU_SUBTYPE_ARM_A500           ((cpu_subtype_t) 2)
                    228: #define CPU_SUBTYPE_ARM_A440           ((cpu_subtype_t) 3)
                    229: #define CPU_SUBTYPE_ARM_M4             ((cpu_subtype_t) 4)
                    230: #define CPU_SUBTYPE_ARM_A680           ((cpu_subtype_t) 5)
                    231: 
                    232: /*
                    233:  *     MC88000 subtypes.
                    234:  */
                    235: 
                    236: #define CPU_SUBTYPE_MMAX_JPC           ((cpu_subtype_t) 1)
                    237: #define CPU_SUBTYPE_LUNA88K             ((cpu_subtype_t) 2)
                    238: 
                    239: /*
                    240:  *     Sparc subtypes.
                    241:  */
                    242: 
                    243: #define CPU_SUBTYPE_SUN4_260           ((cpu_subtype_t) 1)
                    244: #define CPU_SUBTYPE_SUN4_110           ((cpu_subtype_t) 2)
                    245: #define CPU_SUBTYPE_SUN4_330           ((cpu_subtype_t) 3)
                    246: #define CPU_SUBTYPE_SUN4C_60           ((cpu_subtype_t) 4)
                    247: #define CPU_SUBTYPE_SUN4C_65           ((cpu_subtype_t) 5)
                    248: #define CPU_SUBTYPE_SUN4C_20           ((cpu_subtype_t) 6)
                    249: #define CPU_SUBTYPE_SUN4C_30           ((cpu_subtype_t) 7)
                    250: #define CPU_SUBTYPE_SUN4C_40           ((cpu_subtype_t) 8)
                    251: #define CPU_SUBTYPE_SUN4C_50           ((cpu_subtype_t) 9)
                    252: #define CPU_SUBTYPE_SUN4C_75           ((cpu_subtype_t) 10)
                    253: 
                    254: /*
                    255:  *     i860 subtypes.
                    256:  */
                    257: 
                    258: #define CPU_SUBTYPE_iPSC860            ((cpu_subtype_t) 1)
                    259: #define CPU_SUBTYPE_OKI860             ((cpu_subtype_t) 2)
                    260: 
                    261: /*
                    262:  *     Alpha subtypes.
                    263:  */
                    264: 
                    265: #define CPU_SUBTYPE_ALPHA_EV3          ((cpu_subtype_t) 1)
                    266: #define CPU_SUBTYPE_ALPHA_EV4          ((cpu_subtype_t) 2)
                    267: #define CPU_SUBTYPE_ALPHA_ISP          ((cpu_subtype_t) 3)
                    268: #define CPU_SUBTYPE_ALPHA_21064                ((cpu_subtype_t) 4)
                    269: 
                    270: 
                    271: #endif /* _MACH_MACHINE_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.