/*
- * Copyright (c) 2008-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2008-2016 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
return OSKext::loadKextWithIdentifier(bundle_id);
}
+uint32_t OSKextGetLoadTagForIdentifier(const char * kextIdentifier);
/*********************************************************************
*********************************************************************/
uint32_t
/*********************************************************************
* Gets the vm_map for the current kext
*********************************************************************/
-extern vm_offset_t segPRELINKB;
-extern unsigned long segSizePRELINK;
+extern vm_offset_t segPRELINKTEXTB;
+extern unsigned long segSizePRELINKTEXT;
extern int kth_started;
extern vm_map_t g_kext_map;
vm_map_t kext_map = NULL;
/* Set the vm map */
- if ((info->address >= segPRELINKB) &&
- (info->address < (segPRELINKB + segSizePRELINK)))
+ if ((info->address >= segPRELINKTEXTB) &&
+ (info->address < (segPRELINKTEXTB + segSizePRELINKTEXT)))
{
kext_map = kernel_map;
} else {
void
kmod_panic_dump(vm_offset_t * addr, unsigned int cnt)
{
- extern int kdb_printf(const char *format, ...) __printflike(1,2);
+ extern int paniclog_append_noflush(const char *format, ...) __printflike(1,2);
+
+ OSKext::printKextsInBacktrace(addr, cnt, &paniclog_append_noflush, 0);
- OSKext::printKextsInBacktrace(addr, cnt, &kdb_printf,
- /* takeLock? */ false);
return;
}
/********************************************************************/
-void kmod_dump_log(vm_offset_t *addr, unsigned int cnt);
+void kmod_dump_log(vm_offset_t *addr, unsigned int cnt, boolean_t doUnslide);
void
kmod_dump_log(
vm_offset_t * addr,
- unsigned int cnt)
+ unsigned int cnt,
+ boolean_t doUnslide)
{
- OSKext::printKextsInBacktrace(addr, cnt, &printf, /* lock? */ true);
+ uint32_t flags = OSKext::kPrintKextsLock;
+ if (doUnslide) flags |= OSKext::kPrintKextsUnslide;
+ OSKext::printKextsInBacktrace(addr, cnt, &printf, flags);
}
+void *
+OSKextKextForAddress(const void *addr)
+{
+ return OSKext::kextForAddress(addr);
+}
+
+
/*********************************************************************
* Compatibility implementation for kmod_get_info() host_priv routine.
* Only supported on old 32-bit architectures.