summaryrefslogtreecommitdiffstats
path: root/sys/compat/ndis/subr_ntoskrnl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ndis/subr_ntoskrnl.c')
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index c523f8b..17016e0 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -2589,6 +2589,17 @@ MmGetPhysicalAddress(void *base)
return (pmap_extract(kernel_map->pmap, (vm_offset_t)base));
}
+void *
+MmGetSystemRoutineAddress(ustr)
+ unicode_string *ustr;
+{
+ ansi_string astr;
+
+ if (RtlUnicodeStringToAnsiString(&astr, ustr, TRUE))
+ return (NULL);
+ return (ndis_get_routine_address(ntoskrnl_functbl, astr.as_buf));
+}
+
uint8_t
MmIsAddressValid(vaddr)
void *vaddr;
@@ -4382,6 +4393,7 @@ image_patch_table ntoskrnl_functbl[] = {
IMPORT_SFUNC(MmUnmapLockedPages, 2),
IMPORT_SFUNC(MmBuildMdlForNonPagedPool, 1),
IMPORT_SFUNC(MmGetPhysicalAddress, 1),
+ IMPORT_SFUNC(MmGetSystemRoutineAddress, 1),
IMPORT_SFUNC(MmIsAddressValid, 1),
IMPORT_SFUNC(MmMapIoSpace, 3 + 1),
IMPORT_SFUNC(MmUnmapIoSpace, 2),
OpenPOWER on IntegriCloud