]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOKitKernelInternal.h
xnu-4903.241.1.tar.gz
[apple/xnu.git] / iokit / Kernel / IOKitKernelInternal.h
index 37e6f9416936de06a4357291e08461ca3b88adb7..4b0cf6ffc951993c4398c0e3485e5dc0198d6dd3 100644 (file)
@@ -38,13 +38,14 @@ __BEGIN_DECLS
 #include <mach/memory_object_types.h>
 #include <device/device_port.h>
 #include <IOKit/IODMACommand.h>
 #include <mach/memory_object_types.h>
 #include <device/device_port.h>
 #include <IOKit/IODMACommand.h>
+#include <IOKit/IOKitServer.h>
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #if (KDEBUG_LEVEL >= KDEBUG_LEVEL_STANDARD)
 
 #define IOServiceTrace(csc, a, b, c, d) do {                           \
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #if (KDEBUG_LEVEL >= KDEBUG_LEVEL_STANDARD)
 
 #define IOServiceTrace(csc, a, b, c, d) do {                           \
-    if(kIOTraceIOService & gIOKitDebug) {                              \
+    if(kIOTraceIOService & gIOKitTrace) {                              \
        KERNEL_DEBUG_CONSTANT(IODBG_IOSERVICE(csc), a, b, c, d, 0);     \
     }                                                                  \
 } while(0)
        KERNEL_DEBUG_CONSTANT(IODBG_IOSERVICE(csc), a, b, c, d, 0);     \
     }                                                                  \
 } while(0)
@@ -89,17 +90,13 @@ IOKernelAllocateWithPhysicalRestrict(mach_vm_size_t size, mach_vm_address_t maxP
 void
 IOKernelFreePhysical(mach_vm_address_t address, mach_vm_size_t size);
 
 void
 IOKernelFreePhysical(mach_vm_address_t address, mach_vm_size_t size);
 
-extern vm_size_t debug_iomallocpageable_size;
-
-// osfmk/device/iokit_rpc.c
-extern kern_return_t IOMapPages(vm_map_t map, mach_vm_address_t va, mach_vm_address_t pa,
-                                 mach_vm_size_t length, unsigned int mapFlags);
-extern kern_return_t IOUnmapPages(vm_map_t map, mach_vm_address_t va, mach_vm_size_t length);
+#if IOTRACKING
+IOReturn
+IOMemoryMapTracking(IOTrackingUser * tracking, task_t * task,
+                   mach_vm_address_t * address, mach_vm_size_t * size);
+#endif /* IOTRACKING */
 
 
-extern kern_return_t IOProtectCacheMode(vm_map_t map, mach_vm_address_t va,
-                                       mach_vm_size_t length, unsigned int mapFlags);
-
-extern ppnum_t IOGetLastPageNumber(void);
+extern vm_size_t debug_iomallocpageable_size;
 
 extern ppnum_t gIOLastPage;
 
 
 extern ppnum_t gIOLastPage;
 
@@ -134,8 +131,11 @@ struct IODMACommandInternal
     UInt8  fPrepared;
     UInt8  fDoubleBuffer;
     UInt8  fNewMD;
     UInt8  fPrepared;
     UInt8  fDoubleBuffer;
     UInt8  fNewMD;
-    UInt8  fLocalMapper;
-       
+    UInt8  fLocalMapperAllocValid;
+    UInt8  fIOVMAddrValid;
+    UInt8  fForceDoubleBuffer;
+    UInt8  fSetActiveNoMapper;
+
     vm_page_t fCopyPageAlloc;
     vm_page_t fCopyNext;
     vm_page_t fNextRemapPage;
     vm_page_t fCopyPageAlloc;
     vm_page_t fCopyNext;
     vm_page_t fNextRemapPage;
@@ -167,6 +167,8 @@ struct IOMemoryDescriptorReserved {
     uint64_t                      preparationID;
     // for kernel IOMD subclasses... they have no expansion
     uint64_t                      kernReserved[4];
     uint64_t                      preparationID;
     // for kernel IOMD subclasses... they have no expansion
     uint64_t                      kernReserved[4];
+    vm_tag_t                      kernelTag;
+    vm_tag_t                      userTag;
 };
 
 struct iopa_t
 };
 
 struct iopa_t
@@ -204,12 +206,17 @@ extern "C" struct timeval gIOLastWakeTime;
 
 extern clock_sec_t gIOConsoleLockTime;
 
 
 extern clock_sec_t gIOConsoleLockTime;
 
+extern bool gCPUsRunning;
+
 extern OSSet * gIORemoveOnReadProperties;
 
 extern "C" void IOKitInitializeTime( void );
 
 extern "C" OSString * IOCopyLogNameForPID(int pid);
 
 extern OSSet * gIORemoveOnReadProperties;
 
 extern "C" void IOKitInitializeTime( void );
 
 extern "C" OSString * IOCopyLogNameForPID(int pid);
 
+extern "C" void IOKitKernelLogBuffer(const char * title, const void * buffer, size_t size,
+                          void (*output)(const char *format, ...));
+
 #if defined(__i386__) || defined(__x86_64__)
 #ifndef __cplusplus
 #error xx
 #if defined(__i386__) || defined(__x86_64__)
 #ifndef __cplusplus
 #error xx
@@ -217,6 +224,7 @@ extern "C" OSString * IOCopyLogNameForPID(int pid);
 
 extern const OSSymbol * gIOCreateEFIDevicePathSymbol;
 extern "C" void IOSetKeyStoreData(IOMemoryDescriptor * data);
 
 extern const OSSymbol * gIOCreateEFIDevicePathSymbol;
 extern "C" void IOSetKeyStoreData(IOMemoryDescriptor * data);
+extern "C" void IOSetAPFSKeyStoreData(IOMemoryDescriptor* data);
 #endif
 extern const  OSSymbol * gAKSGetKey;
 
 #endif
 extern const  OSSymbol * gAKSGetKey;