[2] | 1 | /* $Id: kCpus.h 29 2009-07-01 20:30:29Z bird $ */
|
---|
| 2 | /** @file
|
---|
| 3 | * kCpus - CPU Identifiers.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | /*
|
---|
[29] | 7 | * Copyright (c) 2006-2007 Knut St. Osmundsen <bird-kStuff-spamix@anduin.net>
|
---|
[2] | 8 | *
|
---|
[29] | 9 | * Permission is hereby granted, free of charge, to any person
|
---|
| 10 | * obtaining a copy of this software and associated documentation
|
---|
| 11 | * files (the "Software"), to deal in the Software without
|
---|
| 12 | * restriction, including without limitation the rights to use,
|
---|
| 13 | * copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
| 14 | * copies of the Software, and to permit persons to whom the
|
---|
| 15 | * Software is furnished to do so, subject to the following
|
---|
| 16 | * conditions:
|
---|
[2] | 17 | *
|
---|
[29] | 18 | * The above copyright notice and this permission notice shall be
|
---|
| 19 | * included in all copies or substantial portions of the Software.
|
---|
[2] | 20 | *
|
---|
[29] | 21 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
| 22 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
---|
| 23 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
| 24 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
---|
| 25 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
| 26 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
| 27 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
| 28 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
[2] | 29 | */
|
---|
| 30 |
|
---|
| 31 | #ifndef ___k_kCpus_h___
|
---|
| 32 | #define ___k_kCpus_h___
|
---|
| 33 |
|
---|
| 34 | /** @defgroup grp_kCpus kCpus - CPU Identifiers
|
---|
| 35 | * @see the kCpu API for functions operating on the CPU type.
|
---|
| 36 | * @{
|
---|
| 37 | */
|
---|
| 38 |
|
---|
| 39 | /**
|
---|
| 40 | * CPU Architectures.
|
---|
| 41 | *
|
---|
| 42 | * The constants used by this enum has the same values as
|
---|
| 43 | * the K_ARCH_* #defines defined by k/kDefs.h.
|
---|
| 44 | */
|
---|
| 45 | typedef enum KCPUARCH
|
---|
| 46 | {
|
---|
| 47 | /** @copydoc K_ARCH_UNKNOWN */
|
---|
| 48 | KCPUARCH_UNKNOWN = K_ARCH_UNKNOWN,
|
---|
| 49 | /** @copydoc K_ARCH_X86_16 */
|
---|
| 50 | KCPUARCH_X86_16 = K_ARCH_X86_16,
|
---|
| 51 | /** @copydoc K_ARCH_X86_32 */
|
---|
| 52 | KCPUARCH_X86_32 = K_ARCH_X86_32,
|
---|
| 53 | /** @copydoc K_ARCH_AMD64 */
|
---|
| 54 | KCPUARCH_AMD64 = K_ARCH_AMD64,
|
---|
| 55 | /** @copydoc K_ARCH_IA64 */
|
---|
| 56 | KCPUARCH_IA64 = K_ARCH_IA64,
|
---|
| 57 | /** @copydoc K_ARCH_ALPHA */
|
---|
| 58 | KCPUARCH_ALPHA = K_ARCH_ALPHA,
|
---|
| 59 | /** @copydoc K_ARCH_ALPHA_32 */
|
---|
| 60 | KCPUARCH_ALPHA_32 = K_ARCH_ALPHA_32,
|
---|
| 61 | /** @copydoc K_ARCH_ARM_32 */
|
---|
| 62 | KCPUARCH_ARM_32 = K_ARCH_ARM_32,
|
---|
| 63 | /** @copydoc K_ARCH_ARM_64 */
|
---|
| 64 | KCPUARCH_ARM_64 = K_ARCH_ARM_64,
|
---|
| 65 | /** @copydoc K_ARCH_MIPS_32 */
|
---|
| 66 | KCPUARCH_MIPS_32 = K_ARCH_MIPS_32,
|
---|
| 67 | /** @copydoc K_ARCH_MIPS_64 */
|
---|
| 68 | KCPUARCH_MIPS_64 = K_ARCH_MIPS_64,
|
---|
| 69 | /** @copydoc K_ARCH_POWERPC_32 */
|
---|
| 70 | KCPUARCH_POWERPC_32 = K_ARCH_POWERPC_32,
|
---|
| 71 | /** @copydoc K_ARCH_POWERPC_64 */
|
---|
| 72 | KCPUARCH_POWERPC_64 = K_ARCH_POWERPC_64,
|
---|
| 73 | /** @copydoc K_ARCH_SPARC_32 */
|
---|
| 74 | KCPUARCH_SPARC_32 = K_ARCH_SPARC_32,
|
---|
| 75 | /** @copydoc K_ARCH_SPARC_64 */
|
---|
| 76 | KCPUARCH_SPARC_64 = K_ARCH_SPARC_64,
|
---|
| 77 |
|
---|
| 78 | /** Hack to blow the type up to 32-bit. */
|
---|
| 79 | KCPUARCH_32BIT_HACK = 0x7fffffff
|
---|
| 80 | } KCPUARCH;
|
---|
| 81 |
|
---|
| 82 | /** Pointer to a CPU architecture type. */
|
---|
| 83 | typedef KCPUARCH *PKCPUARCH;
|
---|
| 84 | /** Pointer to a const CPU architecture type. */
|
---|
| 85 | typedef const KCPUARCH *PCKCPUARCH;
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 | /**
|
---|
| 89 | * CPU models.
|
---|
| 90 | */
|
---|
| 91 | typedef enum KCPU
|
---|
| 92 | {
|
---|
| 93 | /** The usual invalid cpu. */
|
---|
| 94 | KCPU_INVALID = 0,
|
---|
| 95 |
|
---|
| 96 | /** @name K_ARCH_X86_16
|
---|
| 97 | * @{ */
|
---|
| 98 | KCPU_I8086,
|
---|
| 99 | KCPU_I8088,
|
---|
| 100 | KCPU_I80186,
|
---|
| 101 | KCPU_I80286,
|
---|
| 102 | KCPU_I386_16,
|
---|
| 103 | KCPU_I486_16,
|
---|
| 104 | KCPU_I486SX_16,
|
---|
| 105 | KCPU_I586_16,
|
---|
| 106 | KCPU_I686_16,
|
---|
| 107 | KCPU_P4_16,
|
---|
| 108 | KCPU_CORE2_16,
|
---|
| 109 | KCPU_K6_16,
|
---|
| 110 | KCPU_K7_16,
|
---|
| 111 | KCPU_K8_16,
|
---|
| 112 | KCPU_FIRST_X86_16 = KCPU_I8086,
|
---|
| 113 | KCPU_LAST_X86_16 = KCPU_K8_16,
|
---|
| 114 | /** @} */
|
---|
| 115 |
|
---|
| 116 | /** @name K_ARCH_X86_32
|
---|
| 117 | * @{ */
|
---|
| 118 | KCPU_X86_32_BLEND,
|
---|
| 119 | KCPU_I386,
|
---|
| 120 | KCPU_I486,
|
---|
| 121 | KCPU_I486SX,
|
---|
| 122 | KCPU_I586,
|
---|
| 123 | KCPU_I686,
|
---|
| 124 | KCPU_P4,
|
---|
| 125 | KCPU_CORE2_32,
|
---|
| 126 | KCPU_K6,
|
---|
| 127 | KCPU_K7,
|
---|
| 128 | KCPU_K8_32,
|
---|
| 129 | KCPU_FIRST_X86_32 = KCPU_I386,
|
---|
| 130 | KCPU_LAST_X86_32 = KCPU_K8_32,
|
---|
| 131 | /** @} */
|
---|
| 132 |
|
---|
| 133 | /** @name K_ARCH_AMD64
|
---|
| 134 | * @{ */
|
---|
| 135 | KCPU_AMD64_BLEND,
|
---|
| 136 | KCPU_K8,
|
---|
| 137 | KCPU_P4_64,
|
---|
| 138 | KCPU_CORE2,
|
---|
| 139 | KCPU_FIRST_AMD64 = KCPU_K8,
|
---|
| 140 | KCPU_LAST_AMD64 = KCPU_CORE2,
|
---|
| 141 | /** @} */
|
---|
| 142 |
|
---|
| 143 | /** The end of the valid cpu values (exclusive). */
|
---|
| 144 | KCPU_END,
|
---|
| 145 | /** Hack to blow the type up to 32-bit. */
|
---|
| 146 | KCPU_32BIT_HACK = 0x7fffffff
|
---|
| 147 | } KCPU;
|
---|
| 148 |
|
---|
| 149 | /** Pointer to a CPU type. */
|
---|
| 150 | typedef KCPU *PKCPU;
|
---|
| 151 | /** Pointer to a const CPU type. */
|
---|
| 152 | typedef const KCPU *PCKCPU;
|
---|
| 153 |
|
---|
| 154 | /** @} */
|
---|
| 155 |
|
---|
| 156 | #endif
|
---|
| 157 |
|
---|