]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/mach/i386/vm_param.h
xnu-1699.22.73.tar.gz
[apple/xnu.git] / osfmk / mach / i386 / vm_param.h
index 9487ff7efec160b03f6065d7bca8a8975fa77518..fb2ca164fb272e99f6cd0d2d0a8aea9c1c87ff2b 100644 (file)
 
 #if defined(__i386__)
 
-#define VM_MIN_KERNEL_ADDRESS  ((vm_offset_t) 0x00001000U)
-#define VM_MIN_KERNEL_AND_KEXT_ADDRESS VM_MIN_KERNEL_ADDRESS
-
-#define VM_MAX_KERNEL_ADDRESS  ((vm_offset_t) 0xFE7FFFFFU)
-#define KERNEL_STACK_SIZE              (I386_PGBYTES*4)
+#define KERNEL_IMAGE_TO_PHYS(x) (x)
+#define VM_MIN_KERNEL_ADDRESS          ((vm_offset_t) 0x00001000U)
+#define VM_MIN_KERNEL_AND_KEXT_ADDRESS VM_MIN_KERNEL_ADDRESS
+#define VM_MAX_KERNEL_ADDRESS          ((vm_offset_t) 0xFE7FFFFFU)
 
 #elif defined(__x86_64__)
 
-#define VM_MIN_KERNEL_ADDRESS  ((vm_offset_t) 0xFFFFFF8000000000UL)
-#define VM_MIN_KERNEL_AND_KEXT_ADDRESS (VM_MIN_KERNEL_ADDRESS - 0x80000000ULL)
-
-#define VM_MAX_KERNEL_ADDRESS  ((vm_offset_t) 0xFFFFFFFFFFFFEFFFUL)
-#define KERNEL_STACK_SIZE              (I386_PGBYTES*4)
+#define KERNEL_IMAGE_TO_PHYS(x) (x)
+#define VM_MIN_KERNEL_ADDRESS          ((vm_offset_t) 0xFFFFFF8000000000UL)
+#define VM_MIN_KERNEL_PAGE             ((ppnum_t)0)
+#define VM_MIN_KERNEL_AND_KEXT_ADDRESS (VM_MIN_KERNEL_ADDRESS - 0x80000000ULL)
+#define VM_MAX_KERNEL_ADDRESS          ((vm_offset_t) 0xFFFFFFFFFFFFEFFFUL)
+#define VM_MAX_KERNEL_ADDRESS_EFI32    ((vm_offset_t) 0xFFFFFF80FFFFEFFFUL)
+#define KEXT_ALLOC_MAX_OFFSET (2 * 1024 * 1024 * 1024UL)
+#define KEXT_ALLOC_BASE(x)  ((x) - KEXT_ALLOC_MAX_OFFSET)
+#define KEXT_ALLOC_SIZE(x)  (KEXT_ALLOC_MAX_OFFSET - (x))
 
 #else
 #error unsupported architecture
 #endif
 
+#define KERNEL_STACK_SIZE      (I386_PGBYTES*4)
+
 #define VM_MAP_MIN_ADDRESS     MACH_VM_MIN_ADDRESS
 #define VM_MAP_MAX_ADDRESS     MACH_VM_MAX_ADDRESS