Author: hbelusca
Date: Mon Feb 22 19:07:44 2016
New Revision: 70769
URL:
http://svn.reactos.org/svn/reactos?rev=70769&view=rev
Log:
[VIDEOPRT]
- Complete the table of exported VideoPort functions (compatible Win2k3 SP2), some
functions were missing in it: see for example the last picture of
http://www.reactos.org/forum/viewtopic.php?f=4&t=14727#p120344 .
- Don't redirect the VideoPortInterlockedIncrement/Decrement/Exchange functions
directly to NTOS, because otherwise they cannot be included in the exports table.
Modified:
trunk/reactos/win32ss/drivers/videoprt/funclist.c
trunk/reactos/win32ss/drivers/videoprt/stubs.c
trunk/reactos/win32ss/drivers/videoprt/videoprt.spec
Modified: trunk/reactos/win32ss/drivers/videoprt/funclist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/f…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/funclist.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/funclist.c [iso-8859-1] Mon Feb 22 19:07:44
2016
@@ -31,46 +31,82 @@
/* GLOBAL VARIABLES ***********************************************************/
-#define VP_EXPORTED_FUNCS (sizeof(VideoPortExports) / sizeof(*VideoPortExports))
-
/* Create an array of entries with pfn, psz, for IntVideoPortGetProcAddress */
#define MAKE_ENTRY(FUNCTIONNAME) { FUNCTIONNAME, #FUNCTIONNAME }
const VIDEO_PORT_FUNCTION_TABLE VideoPortExports[] = {
+ MAKE_ENTRY(VideoPortDDCMonitorHelper),
+ MAKE_ENTRY(VideoPortDoDma),
+ MAKE_ENTRY(VideoPortGetCommonBuffer),
+ MAKE_ENTRY(VideoPortGetMdl),
+ MAKE_ENTRY(VideoPortLockPages),
+ MAKE_ENTRY(VideoPortSignalDmaComplete),
+ MAKE_ENTRY(VideoPortUnlockPages),
+ MAKE_ENTRY(VideoPortAssociateEventsWithDmaHandle),
+ MAKE_ENTRY(VideoPortGetBytesUsed),
+ MAKE_ENTRY(VideoPortSetBytesUsed),
+ MAKE_ENTRY(VideoPortGetDmaContext),
+ MAKE_ENTRY(VideoPortSetDmaContext),
+ MAKE_ENTRY(VideoPortMapDmaMemory),
+ MAKE_ENTRY(VideoPortUnmapDmaMemory),
+ MAKE_ENTRY(VideoPortGetAgpServices),
+ MAKE_ENTRY(VideoPortAllocateContiguousMemory),
+ MAKE_ENTRY(VideoPortGetRomImage),
+ MAKE_ENTRY(VideoPortGetAssociatedDeviceExtension),
+ MAKE_ENTRY(VideoPortGetAssociatedDeviceID),
+ MAKE_ENTRY(VideoPortAcquireDeviceLock),
+ MAKE_ENTRY(VideoPortReleaseDeviceLock),
+ MAKE_ENTRY(VideoPortAllocateBuffer),
+ MAKE_ENTRY(VideoPortFreeCommonBuffer),
+ MAKE_ENTRY(VideoPortReleaseBuffer),
+ MAKE_ENTRY(VideoPortInterlockedIncrement),
+ MAKE_ENTRY(VideoPortInterlockedDecrement),
+ MAKE_ENTRY(VideoPortInterlockedExchange),
+ MAKE_ENTRY(VideoPortGetVgaStatus),
MAKE_ENTRY(VideoPortQueueDpc),
- MAKE_ENTRY(VideoPortAllocatePool),
- MAKE_ENTRY(VideoPortFreePool),
+ MAKE_ENTRY(VideoPortEnumerateChildren),
+ MAKE_ENTRY(VideoPortQueryServices),
+ MAKE_ENTRY(VideoPortGetDmaAdapter),
+ MAKE_ENTRY(VideoPortPutDmaAdapter),
+ MAKE_ENTRY(VideoPortAllocateCommonBuffer),
MAKE_ENTRY(VideoPortReleaseCommonBuffer),
- MAKE_ENTRY(VideoPortAllocateCommonBuffer),
- MAKE_ENTRY(VideoPortCreateSecondaryDisplay),
- MAKE_ENTRY(VideoPortGetDmaAdapter),
- MAKE_ENTRY(VideoPortGetVersion),
MAKE_ENTRY(VideoPortLockBuffer),
MAKE_ENTRY(VideoPortUnlockBuffer),
+ MAKE_ENTRY(VideoPortStartDma),
+ MAKE_ENTRY(VideoPortCompleteDma),
+ MAKE_ENTRY(VideoPortCreateEvent),
+ MAKE_ENTRY(VideoPortDeleteEvent),
MAKE_ENTRY(VideoPortSetEvent),
MAKE_ENTRY(VideoPortClearEvent),
MAKE_ENTRY(VideoPortReadStateEvent),
- MAKE_ENTRY(VideoPortRegisterBugcheckCallback),
- MAKE_ENTRY(VideoPortCreateEvent),
- MAKE_ENTRY(VideoPortDeleteEvent),
MAKE_ENTRY(VideoPortWaitForSingleObject),
+ MAKE_ENTRY(VideoPortAllocatePool),
+ MAKE_ENTRY(VideoPortFreePool),
+ MAKE_ENTRY(VideoPortCreateSpinLock),
+ MAKE_ENTRY(VideoPortDeleteSpinLock),
+ MAKE_ENTRY(VideoPortAcquireSpinLock),
+ MAKE_ENTRY(VideoPortAcquireSpinLockAtDpcLevel),
+ MAKE_ENTRY(VideoPortReleaseSpinLock),
+ MAKE_ENTRY(VideoPortReleaseSpinLockFromDpcLevel),
MAKE_ENTRY(VideoPortCheckForDeviceExistence),
+ MAKE_ENTRY(VideoPortCreateSecondaryDisplay),
MAKE_ENTRY(VideoPortFlushRegistry),
MAKE_ENTRY(VideoPortQueryPerformanceCounter),
+ MAKE_ENTRY(VideoPortGetVersion),
+ MAKE_ENTRY(VideoPortRegisterBugcheckCallback),
};
#undef MAKE_ENTRY
PVOID NTAPI
IntVideoPortGetProcAddress(
- IN PVOID HwDeviceExtension,
- IN PUCHAR FunctionName)
+ IN PVOID HwDeviceExtension,
+ IN PUCHAR FunctionName)
{
- ULONG i = 0;
+ ULONG i;
TRACE_(VIDEOPRT, "VideoPortGetProcAddress(%s)\n", FunctionName);
/* Search by name */
-
- for (i = 0; i < VP_EXPORTED_FUNCS; i++)
+ for (i = 0; i < ARRAYSIZE(VideoPortExports); i++)
{
if (!strcmp((PCHAR)FunctionName, VideoPortExports[i].Name))
{
@@ -78,7 +114,7 @@
}
}
- ERR_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n",
FunctionName);
+ ERR_(VIDEOPRT, "VideoPortGetProcAddress: Can't resolve symbol %s\n",
FunctionName);
- return NULL;
+ return NULL;
}
Modified: trunk/reactos/win32ss/drivers/videoprt/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/s…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/stubs.c [iso-8859-1] Mon Feb 22 19:07:44 2016
@@ -105,229 +105,6 @@
UNIMPLEMENTED;
}
-#ifdef _M_AMD64
-UCHAR
-NTAPI
-VideoPortReadPortUchar(
- PUCHAR Port)
-{
- return READ_PORT_UCHAR(Port);
-}
-
-USHORT
-NTAPI
-VideoPortReadPortUshort(
- PUSHORT Port)
-{
- return READ_PORT_USHORT(Port);
-}
-
-ULONG
-NTAPI
-VideoPortReadPortUlong(
- PULONG Port)
-{
- return READ_PORT_ULONG(Port);
-}
-
-VOID
-NTAPI
-VideoPortReadPortBufferUchar(
- PUCHAR Port,
- PUCHAR Buffer,
- ULONG Count)
-{
- READ_PORT_BUFFER_UCHAR(Port, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortReadPortBufferUshort(
- PUSHORT Port,
- PUSHORT Buffer,
- ULONG Count)
-{
- READ_PORT_BUFFER_USHORT(Port, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortReadPortBufferUlong(
- PULONG Port,
- PULONG Buffer,
- ULONG Count)
-{
- READ_PORT_BUFFER_ULONG(Port, Buffer, Count);
-}
-
-UCHAR
-NTAPI
-VideoPortReadRegisterUchar(
- PUCHAR Register)
-{
- return READ_REGISTER_UCHAR(Register);
-}
-
-USHORT
-NTAPI
-VideoPortReadRegisterUshort(
- PUSHORT Register)
-{
- return READ_REGISTER_USHORT(Register);
-}
-
-ULONG
-NTAPI
-VideoPortReadRegisterUlong(
- PULONG Register)
-{
- return READ_REGISTER_ULONG(Register);
-}
-
-VOID
-NTAPI
-VideoPortReadRegisterBufferUchar(
- PUCHAR Register,
- PUCHAR Buffer,
- ULONG Count)
-{
- READ_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortReadRegisterBufferUshort(
- PUSHORT Register,
- PUSHORT Buffer,
- ULONG Count)
-{
- READ_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortReadRegisterBufferUlong(
- PULONG Register,
- PULONG Buffer,
- ULONG Count)
-{
- READ_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWritePortUchar(
- PUCHAR Port,
- UCHAR Value)
-{
- WRITE_PORT_UCHAR(Port, Value);
-}
-
-VOID
-NTAPI
-VideoPortWritePortUshort(
- PUSHORT Port,
- USHORT Value)
-{
- WRITE_PORT_USHORT(Port, Value);
-}
-
-VOID
-NTAPI
-VideoPortWritePortUlong(
- PULONG Port,
- ULONG Value)
-{
- WRITE_PORT_ULONG(Port, Value);
-}
-
-VOID
-NTAPI
-VideoPortWritePortBufferUchar(
- PUCHAR Port,
- PUCHAR Buffer,
- ULONG Count)
-{
- WRITE_PORT_BUFFER_UCHAR(Port, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWritePortBufferUshort(
- PUSHORT Port,
- PUSHORT Buffer,
- ULONG Count)
-{
- WRITE_PORT_BUFFER_USHORT(Port, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWritePortBufferUlong(
- PULONG Port,
- PULONG Buffer,
- ULONG Count)
-{
- WRITE_PORT_BUFFER_ULONG(Port, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterUchar(
- PUCHAR Register,
- UCHAR Value)
-{
- WRITE_REGISTER_UCHAR(Register, Value);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterUshort(
- PUSHORT Register,
- USHORT Value)
-{
- WRITE_REGISTER_USHORT(Register, Value);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterUlong(
- PULONG Register,
- ULONG Value)
-{
- WRITE_REGISTER_ULONG(Register, Value);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterBufferUchar(
- PUCHAR Register,
- PUCHAR Buffer,
- ULONG Count)
-{
- WRITE_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterBufferUshort(
- PUSHORT Register,
- PUSHORT Buffer,
- ULONG Count)
-{
- WRITE_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
-}
-
-VOID
-NTAPI
-VideoPortWriteRegisterBufferUlong(
- PULONG Register,
- PULONG Buffer,
- ULONG Count)
-{
- WRITE_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
-}
-
LONG
FASTCALL
VideoPortInterlockedDecrement(
@@ -353,6 +130,229 @@
return InterlockedExchange(Target, Value);
}
+#ifdef _M_AMD64
+UCHAR
+NTAPI
+VideoPortReadPortUchar(
+ PUCHAR Port)
+{
+ return READ_PORT_UCHAR(Port);
+}
+
+USHORT
+NTAPI
+VideoPortReadPortUshort(
+ PUSHORT Port)
+{
+ return READ_PORT_USHORT(Port);
+}
+
+ULONG
+NTAPI
+VideoPortReadPortUlong(
+ PULONG Port)
+{
+ return READ_PORT_ULONG(Port);
+}
+
+VOID
+NTAPI
+VideoPortReadPortBufferUchar(
+ PUCHAR Port,
+ PUCHAR Buffer,
+ ULONG Count)
+{
+ READ_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortReadPortBufferUshort(
+ PUSHORT Port,
+ PUSHORT Buffer,
+ ULONG Count)
+{
+ READ_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortReadPortBufferUlong(
+ PULONG Port,
+ PULONG Buffer,
+ ULONG Count)
+{
+ READ_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+UCHAR
+NTAPI
+VideoPortReadRegisterUchar(
+ PUCHAR Register)
+{
+ return READ_REGISTER_UCHAR(Register);
+}
+
+USHORT
+NTAPI
+VideoPortReadRegisterUshort(
+ PUSHORT Register)
+{
+ return READ_REGISTER_USHORT(Register);
+}
+
+ULONG
+NTAPI
+VideoPortReadRegisterUlong(
+ PULONG Register)
+{
+ return READ_REGISTER_ULONG(Register);
+}
+
+VOID
+NTAPI
+VideoPortReadRegisterBufferUchar(
+ PUCHAR Register,
+ PUCHAR Buffer,
+ ULONG Count)
+{
+ READ_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortReadRegisterBufferUshort(
+ PUSHORT Register,
+ PUSHORT Buffer,
+ ULONG Count)
+{
+ READ_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortReadRegisterBufferUlong(
+ PULONG Register,
+ PULONG Buffer,
+ ULONG Count)
+{
+ READ_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWritePortUchar(
+ PUCHAR Port,
+ UCHAR Value)
+{
+ WRITE_PORT_UCHAR(Port, Value);
+}
+
+VOID
+NTAPI
+VideoPortWritePortUshort(
+ PUSHORT Port,
+ USHORT Value)
+{
+ WRITE_PORT_USHORT(Port, Value);
+}
+
+VOID
+NTAPI
+VideoPortWritePortUlong(
+ PULONG Port,
+ ULONG Value)
+{
+ WRITE_PORT_ULONG(Port, Value);
+}
+
+VOID
+NTAPI
+VideoPortWritePortBufferUchar(
+ PUCHAR Port,
+ PUCHAR Buffer,
+ ULONG Count)
+{
+ WRITE_PORT_BUFFER_UCHAR(Port, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWritePortBufferUshort(
+ PUSHORT Port,
+ PUSHORT Buffer,
+ ULONG Count)
+{
+ WRITE_PORT_BUFFER_USHORT(Port, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWritePortBufferUlong(
+ PULONG Port,
+ PULONG Buffer,
+ ULONG Count)
+{
+ WRITE_PORT_BUFFER_ULONG(Port, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterUchar(
+ PUCHAR Register,
+ UCHAR Value)
+{
+ WRITE_REGISTER_UCHAR(Register, Value);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterUshort(
+ PUSHORT Register,
+ USHORT Value)
+{
+ WRITE_REGISTER_USHORT(Register, Value);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterUlong(
+ PULONG Register,
+ ULONG Value)
+{
+ WRITE_REGISTER_ULONG(Register, Value);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterBufferUchar(
+ PUCHAR Register,
+ PUCHAR Buffer,
+ ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_UCHAR(Register, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterBufferUshort(
+ PUSHORT Register,
+ PUSHORT Buffer,
+ ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_USHORT(Register, Buffer, Count);
+}
+
+VOID
+NTAPI
+VideoPortWriteRegisterBufferUlong(
+ PULONG Register,
+ PULONG Buffer,
+ ULONG Count)
+{
+ WRITE_REGISTER_BUFFER_ULONG(Register, Buffer, Count);
+}
+
VOID
NTAPI
VideoPortQuerySystemTime(
Modified: trunk/reactos/win32ss/drivers/videoprt/videoprt.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/v…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/videoprt.spec [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/videoprt.spec [iso-8859-1] Mon Feb 22 19:07:44
2016
@@ -44,12 +44,15 @@
@ stdcall VideoPortGetVgaStatus(ptr ptr)
@ stdcall VideoPortInitialize(ptr ptr ptr ptr)
@ stdcall VideoPortInt10(ptr ptr)
-@ fastcall -arch=i386,arm VideoPortInterlockedDecrement(ptr)
NTOSKRNL.InterlockedDecrement
-@ fastcall -arch=x86_64 VideoPortInterlockedDecrement(ptr)
-@ fastcall -arch=i386,arm VideoPortInterlockedExchange(ptr long)
NTOSKRNL.InterlockedExchange
-@ fastcall -arch=x86_64 VideoPortInterlockedExchange(ptr long)
-@ fastcall -arch=i386,arm VideoPortInterlockedIncrement(ptr)
NTOSKRNL.InterlockedIncrement
-@ fastcall -arch=x86_64 VideoPortInterlockedIncrement(ptr)
+;;@ fastcall -arch=i386,arm VideoPortInterlockedDecrement(ptr)
NTOSKRNL.InterlockedDecrement
+;;@ fastcall -arch=x86_64 VideoPortInterlockedDecrement(ptr)
+@ fastcall VideoPortInterlockedDecrement(ptr)
+;;@ fastcall -arch=i386,arm VideoPortInterlockedExchange(ptr long)
NTOSKRNL.InterlockedExchange
+;;@ fastcall -arch=x86_64 VideoPortInterlockedExchange(ptr long)
+@ fastcall VideoPortInterlockedExchange(ptr long)
+;;@ fastcall -arch=i386,arm VideoPortInterlockedIncrement(ptr)
NTOSKRNL.InterlockedIncrement
+;;@ fastcall -arch=x86_64 VideoPortInterlockedIncrement(ptr)
+@ fastcall VideoPortInterlockedIncrement(ptr)
@ stdcall VideoPortIsNoVesa()
@ stdcall VideoPortLockBuffer(ptr ptr long long)
@ stdcall VideoPortLockPages(ptr ptr ptr ptr long)