[ros-diffs] [sginsberg] 36969: - Make videoprt compile for 64-bit - Disable Int10 support as it uses x86 specific structures (is this support still available on amd64?) - Disable VideoPortEnable/DisableInterrupt -- HalEnable/DisableSystemInterrupt are not apparently present on NT AMD64, so need to figure out what else to use (and if these routine are still present on amd64 videoprt)
sginsberg at svn.reactos.org
sginsberg at svn.reactos.org
Sun Oct 26 00:33:56 CEST 2008
Author: sginsberg
Date: Sat Oct 25 17:33:55 2008
New Revision: 36969
URL: http://svn.reactos.org/svn/reactos?rev=36969&view=rev
Log:
- Make videoprt compile for 64-bit
- Disable Int10 support as it uses x86 specific structures (is this support still available on amd64?)
- Disable VideoPortEnable/DisableInterrupt -- HalEnable/DisableSystemInterrupt are not apparently present on NT AMD64, so need to figure out what else to use (and if these routine are still present on amd64 videoprt)
Modified:
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/agp.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/int10.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/interrupt.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/resource.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/services.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/spinlock.c
branches/ros-amd64-bringup/reactos/drivers/video/videoprt/videoprt.c
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/agp.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/agp.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/agp.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/agp.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -275,7 +275,7 @@
else /* ProcessHandle != NULL */
{
/* Release some virtual memory */
- ULONG Size = Pages * PAGE_SIZE;
+ SIZE_T Size = Pages * PAGE_SIZE;
ULONG OffsetInBytes = Offset * PAGE_SIZE;
BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress +
OffsetInBytes);
@@ -349,7 +349,7 @@
else /* ProcessHandle != NULL */
{
/* Unmap the section view */
- ULONG Size = Pages * PAGE_SIZE;
+ SIZE_T Size = Pages * PAGE_SIZE;
ULONG OffsetInBytes = Offset * PAGE_SIZE;
BaseAddress = (PVOID)((ULONG_PTR)VirtualMapping->MappedAddress +
OffsetInBytes);
@@ -400,7 +400,7 @@
else /* ProcessHandle != NULL */
{
/* Release the allocated virtual memory */
- ULONG Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE;
+ SIZE_T Size = VirtualMapping->AgpMapping->NumberOfPages * PAGE_SIZE;
Status = ZwFreeVirtualMemory(VirtualMapping->ProcessHandle,
&VirtualMapping->MappedAddress,
&Size, MEM_RELEASE);
@@ -452,7 +452,7 @@
else /* ProcessHandle != NULL */
{
/* Reserve memory for usermode */
- ULONG Size = AgpMapping->NumberOfPages * PAGE_SIZE;
+ SIZE_T Size = AgpMapping->NumberOfPages * PAGE_SIZE;
MappedAddress = NULL;
Status = ZwAllocateVirtualMemory(ProcessHandle, &MappedAddress, 0, &Size,
MEM_RESERVE, PAGE_NOACCESS);
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/int10.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/int10.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/int10.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/int10.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -25,6 +25,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
+#if defined(_M_IX86)
VP_STATUS NTAPI
IntInt10AllocateBuffer(
IN PVOID Context,
@@ -190,6 +191,7 @@
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return Status;
}
+#endif
/* PUBLIC FUNCTIONS ***********************************************************/
@@ -202,6 +204,7 @@
IN PVOID HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
{
+#if defined(_M_IX86)
KV86M_REGISTERS Regs;
NTSTATUS Status;
PKPROCESS CallingProcess;
@@ -243,4 +246,9 @@
IntDetachFromCSRSS(&CallingProcess, &ApcState);
return Status;
-}
+#else
+ /* Not implemented for anything else than X86*/
+ DPRINT1("Int10 not available on non-x86!\n");
+ return ERROR_INVALID_FUNCTION;
+#endif
+}
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/interrupt.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/interrupt.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/interrupt.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -111,6 +111,7 @@
VP_STATUS NTAPI
VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
{
+#ifndef _M_AMD64
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Status;
@@ -124,6 +125,11 @@
DeviceExtension->InterruptLevel);
return Status ? NO_ERROR : ERROR_INVALID_ACCESS;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_ACCESS;
+#endif
}
/*
@@ -133,6 +139,7 @@
VP_STATUS NTAPI
VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
{
+#ifndef _M_AMD64
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN Status;
@@ -145,4 +152,9 @@
0);
return Status ? NO_ERROR : ERROR_INVALID_ACCESS;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_ACCESS;
+#endif
}
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/resource.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/resource.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/resource.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/resource.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -164,7 +164,7 @@
if (Status)
*Status = NO_ERROR;
- return (PVOID)TranslatedAddress.u.LowPart;
+ return (PVOID)(ULONG_PTR)TranslatedAddress.u.LowPart;
}
/* user space */
@@ -272,7 +272,7 @@
Status = ZwUnmapViewOfSection(NtCurrentProcess(), MappedAddress);
if (!NT_SUCCESS(Status))
{
- WARN_(VIDEOPRT, "Warning: Mapping for address 0x%x not found!\n", (ULONG)MappedAddress);
+ WARN_(VIDEOPRT, "Warning: Mapping for address 0x%p not found!\n", MappedAddress);
}
}
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/services.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/services.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/services.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/services.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -44,6 +44,7 @@
switch (ServicesType)
{
+#if defined(_M_IX86)
case VideoPortServicesInt10:
if (Interface->Version >= VIDEO_PORT_INT10_INTERFACE_VERSION_1 ||
Interface->Size >= sizeof(VIDEO_PORT_INT10_INTERFACE))
@@ -61,7 +62,7 @@
return NO_ERROR;
}
break;
-
+#endif
case VideoPortServicesAGP:
if ((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 &&
Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/spinlock.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/spinlock.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/spinlock.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/spinlock.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -77,7 +77,7 @@
IN PSPIN_LOCK SpinLock)
{
TRACE_(VIDEOPRT, "VideoPortAcquireSpinLockAtDpcLevel\n");
- KefAcquireSpinLockAtDpcLevel((PKSPIN_LOCK)SpinLock);
+ KeAcquireSpinLockAtDpcLevel((PKSPIN_LOCK)SpinLock);
}
/*
@@ -104,5 +104,5 @@
IN PSPIN_LOCK SpinLock)
{
TRACE_(VIDEOPRT, "VideoPortReleaseSpinLockFromDpcLevel\n");
- KefReleaseSpinLockFromDpcLevel((PKSPIN_LOCK)SpinLock);
+ KeReleaseSpinLockFromDpcLevel((PKSPIN_LOCK)SpinLock);
}
Modified: branches/ros-amd64-bringup/reactos/drivers/video/videoprt/videoprt.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drivers/video/videoprt/videoprt.c?rev=36969&r1=36968&r2=36969&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/drivers/video/videoprt/videoprt.c [iso-8859-1] Sat Oct 25 17:33:55 2008
@@ -332,7 +332,7 @@
{
WCHAR DeviceVideoBuffer[20];
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- ULONG Size;
+ SIZE_T Size;
NTSTATUS Status;
VIDEO_PORT_CONFIG_INFO ConfigInfo;
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
@@ -1045,12 +1045,12 @@
case VpHighPriority:
OldIrql = KeGetCurrentIrql();
if (OldIrql < SYNCH_LEVEL)
- OldIrql = KfRaiseIrql(SYNCH_LEVEL);
+ KeRaiseIrql(SYNCH_LEVEL, &OldIrql);
Ret = (*SynchronizeRoutine)(Context);
if (OldIrql < SYNCH_LEVEL)
- KfLowerIrql(OldIrql);
+ KeLowerIrql(OldIrql);
break;
default:
More information about the Ros-diffs
mailing list