| 1 | /* $Id: kKLkernel.h,v 1.3 2002-12-16 02:25:06 bird Exp $
|
|---|
| 2 | *
|
|---|
| 3 | * OS2 Kernel Info.
|
|---|
| 4 | *
|
|---|
| 5 | * Copyright (c) 2002 knut st. osmundsen <bird@anduin.net>
|
|---|
| 6 | *
|
|---|
| 7 | *
|
|---|
| 8 | * This file is part of kKrnlLib.
|
|---|
| 9 | *
|
|---|
| 10 | * kKrnlLib is free software; you can redistribute it and/or modify
|
|---|
| 11 | * it under the terms of the GNU General Public License as published by
|
|---|
| 12 | * the Free Software Foundation; either version 2 of the License, or
|
|---|
| 13 | * (at your option) any later version.
|
|---|
| 14 | *
|
|---|
| 15 | * kKrnlLib is distributed in the hope that it will be useful,
|
|---|
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 18 | * GNU General Public License for more details.
|
|---|
| 19 | *
|
|---|
| 20 | * You should have received a copy of the GNU General Public License
|
|---|
| 21 | * along with kKrnlLib; if not, write to the Free Software
|
|---|
| 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 23 | *
|
|---|
| 24 | */
|
|---|
| 25 | #ifndef _kKLkernel_h_
|
|---|
| 26 | #define _kKLkernel_h_
|
|---|
| 27 |
|
|---|
| 28 | /*******************************************************************************
|
|---|
| 29 | * Defined Constants And Macros *
|
|---|
| 30 | *******************************************************************************/
|
|---|
| 31 | /* fKernel */
|
|---|
| 32 | #define KF_UNI 0x0000
|
|---|
| 33 | #define KF_SMP 0x0001
|
|---|
| 34 | #define KF_W4 0x0002
|
|---|
| 35 | #define KF_REV_MASK 0x0FF0
|
|---|
| 36 | #define KF_REV_SHIFT 4
|
|---|
| 37 | #define KF_REV_0 0x0000
|
|---|
| 38 | #define KF_REV_A 0x0010
|
|---|
| 39 | #define KF_REV_B 0x0020
|
|---|
| 40 | #define KF_REV_C 0x0030
|
|---|
| 41 | #define KF_REV_D 0x0040
|
|---|
| 42 | #define KF_REV_E 0x0050
|
|---|
| 43 | #define KF_REV_F 0x0060
|
|---|
| 44 | #define KF_REV_G 0x0070
|
|---|
| 45 | #define KF_REV_H 0x0080
|
|---|
| 46 | #define KF_REV_I 0x0090
|
|---|
| 47 | #define KF_REV_J 0x00a0
|
|---|
| 48 | #define KF_REV_K 0x00b0
|
|---|
| 49 | #define KF_REV_L 0x00c0
|
|---|
| 50 | #define KF_REV_M 0x00d0
|
|---|
| 51 | #define KF_REV_N 0x00e0
|
|---|
| 52 | #define KF_REV_O 0x00f0
|
|---|
| 53 | #define KF_REV_P 0x0100
|
|---|
| 54 | #define KF_REV_Q 0x0110
|
|---|
| 55 | #define KF_REV_R 0x0120
|
|---|
| 56 | #define KF_REV_S 0x0130
|
|---|
| 57 | #define KF_REV_T 0x0140
|
|---|
| 58 | #define KF_REV_U 0x0150
|
|---|
| 59 | #define KF_REV_V 0x0160
|
|---|
| 60 | #define KF_REV_W 0x0170
|
|---|
| 61 | #define KF_REV_X 0x0180
|
|---|
| 62 | #define KF_REV_Y 0x0190
|
|---|
| 63 | #define KF_REV_Z 0x01a0
|
|---|
| 64 | #define KF_REV_ECS 0x0900
|
|---|
| 65 | #define KF_DEBUG 0x1000
|
|---|
| 66 | #define KF_HAS_DEBUGTYPE 0x2000
|
|---|
| 67 | #define KF_ALLSTRICT 0x3000
|
|---|
| 68 | #define KF_HALFSTRICT 0x7000
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 | #define isSMPKernel() (fKernel & KF_SMP)
|
|---|
| 72 | #define isUNIKernel() (!(fKernel & KF_SMP))
|
|---|
| 73 |
|
|---|
| 74 | #define isHighMemorySupported() (ulKernelBuild >= 14000 || isSMPKernel())
|
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 | /*******************************************************************************
|
|---|
| 78 | * Global Variables *
|
|---|
| 79 | *******************************************************************************/
|
|---|
| 80 | extern unsigned long fKernel;
|
|---|
| 81 | extern unsigned long ulKernelBuild;
|
|---|
| 82 |
|
|---|
| 83 | #if defined(KKRNLLIB) && defined(RING0)
|
|---|
| 84 | #if defined(__IBMC__) || defined(__IBMCPP__)
|
|---|
| 85 | #pragma map(fKernel, "_fKernel")
|
|---|
| 86 | #pragma map(ulKernelBuild, "_ulKernelBuild")
|
|---|
| 87 | #endif
|
|---|
| 88 | #endif
|
|---|
| 89 |
|
|---|
| 90 | #endif
|
|---|
| 91 |
|
|---|