Hi,

Following patch fix panic on i386 for drivers using such functions.

Those two functions take 64-bit variable(s) for their arguments.
On i386 that takes additional 32-bit variable per argument.
This is required so that windrv_wrap() can correctly wrap function that
miniport driver calls with stdcall convention.
Similar explanation is provided in subr_ndis.c for other functions.
On amd64 we do not use these numbers.

diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index f169de5..0335561 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -4212,8 +4212,8 @@ image_patch_table ntoskrnl_functbl[] = {
        IMPORT_FFUNC(ExInterlockedAddLargeStatistic, 2),
        IMPORT_SFUNC(IoAllocateMdl, 5),
        IMPORT_SFUNC(IoFreeMdl, 1),
-       IMPORT_SFUNC(MmAllocateContiguousMemory, 2),
-       IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5),
+       IMPORT_SFUNC(MmAllocateContiguousMemory, 2 + 1),
+       IMPORT_SFUNC(MmAllocateContiguousMemorySpecifyCache, 5 + 3),
        IMPORT_SFUNC(MmFreeContiguousMemory, 1),
        IMPORT_SFUNC(MmFreeContiguousMemorySpecifyCache, 3),
        IMPORT_SFUNC_MAP(MmGetPhysicalAddress, pmap_kextract, 1),
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to