2 #include <psdk/ntverp.h>
4 /* DDK/IFS/NDK Headers */
22 P1Home
= 1 * sizeof(PVOID
),
23 P2Home
= 2 * sizeof(PVOID
),
24 P3Home
= 3 * sizeof(PVOID
),
25 P4Home
= 4 * sizeof(PVOID
),
29 // FIXME: where to put this?
30 typedef struct _FIBER
/* Field offsets: */
32 /* this must be the first field */
33 PVOID Parameter
; /* 0x00 0x00 */
34 struct _EXCEPTION_REGISTRATION_RECORD
* ExceptionList
; /* 0x04 0x08 */
35 PVOID StackBase
; /* 0x08 0x10 */
36 PVOID StackLimit
; /* 0x0C 0x18 */
37 PVOID DeallocationStack
; /* 0x10 0x20 */
38 CONTEXT Context
; /* 0x14 0x28 */
39 ULONG GuaranteedStackBytes
; /* 0x2E0 */
40 PVOID FlsData
; /* 0x2E4 */
41 PVOID ActivationContextStack
; /* 0x2E8 */
53 #define TYPE_CONSTANT 2
56 #define RAW(x) {TYPE_RAW, x, 0}
57 #define CONSTANT(name) {TYPE_CONSTANT, #name, (ULONG)name}
58 #define CONSTANT64(name) {TYPE_CONSTANT, #name, (ULONGLONG)name}
59 #define CONSTANTPTR(name) {TYPE_CONSTANT, #name, (ULONG_PTR)name}
60 #define CONSTANTX(name, value) {TYPE_CONSTANT, #name, value}
61 #define OFFSET(name, struct, member) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member)}
62 #define RELOFFSET(name, struct, member, to) {TYPE_CONSTANT, #name, FIELD_OFFSET(struct, member) - FIELD_OFFSET(struct, to)}
63 #define SIZE(name, struct) {TYPE_CONSTANT, #name, sizeof(struct)}
64 #define HEADER(x) {TYPE_HEADER, x, 0}
67 #pragma section(".asmdef")
68 __declspec(allocate(".asmdef"))
69 #elif defined(__GNUC__)
70 __attribute__ ((section(".asmdef")))
72 #error Your compiler is not supported.
78 /* PORTABLE CONSTANTS ********************************************************/
79 #include "ksx.template.h"
81 /* ARCHITECTURE SPECIFIC CONTSTANTS ******************************************/
83 #include "ks386.template.h"
84 #elif defined(_M_AMD64)
85 #include "ksamd64.template.h"