PLOGICAL_ADAPTER Adapter = (PLOGICAL_ADAPTER)DeviceObject->DeviceExtension;
PIO_STACK_LOCATION Stack = IoGetCurrentIrpStackLocation(Irp);
NDIS_STATUS Status = STATUS_NOT_SUPPORTED;
+ ULONG Written;
Irp->IoStatus.Information = 0;
*(PNDIS_OID)Irp->AssociatedIrp.SystemBuffer,
Stack->Parameters.DeviceIoControl.OutputBufferLength,
MmGetSystemAddressForMdl(Irp->MdlAddress),
- &Irp->IoStatus.Information);
+ &Written);
+ Irp->IoStatus.Information = Written;
break;
default:
* NDIS 5.0
*/
{
- return ExInterlockedPopEntrySList ( ListHead, Lock );
+ return (PSINGLE_LIST_ENTRY)ExInterlockedPopEntrySList ( ListHead, Lock );
}
* NDIS 5.0
*/
{
- return ExInterlockedPushEntrySList ( ListHead, ListEntry, Lock );
+ return (PSINGLE_LIST_ENTRY)ExInterlockedPushEntrySList ( ListHead, (PSLIST_ENTRY)ListEntry, Lock );
}
if (Adapter->MTU < Size) {
/* This is NOT a pointer. MSDN explicitly says so. */
NDIS_PER_PACKET_INFO_FROM_PACKET(NdisPacket,
- TcpLargeSendPacketInfo) = (PVOID)((ULONG)Adapter->MTU);
+ TcpLargeSendPacketInfo) = (PVOID)((ULONG_PTR)Adapter->MTU);
}
TcpipAcquireSpinLock( &Adapter->Lock, &OldIrql );
<file>pointer.c</file>
<file>screen.c</file>
<file>framebuf_new.rc</file>
- <group compilerset="gcc">
- <compilerflag>-mrtd</compilerflag>
- <compilerflag>-fno-builtin</compilerflag>
- <compilerflag>-Wno-unused-variable</compilerflag>
- </group>
+ <if property="ARCH" value="i386">
+ <group compilerset="gcc">
+ <compilerflag>-mrtd</compilerflag>
+ <compilerflag>-fno-builtin</compilerflag>
+ <compilerflag>-Wno-unused-variable</compilerflag>
+ </group>
+ </if>
<pch>driver.h</pch>
</module>
{
PBMFD_FILE pfile = (PBMFD_FILE)iFile;
PBMFD_FACE pface;
- ULONG i, j, cjOffset, cjSize, cGlyphs, cRuns;
+ ULONG i, j, cjSize, cGlyphs, cRuns;
CHAR ch, chFirst, ach[256];
WCHAR wc, awc[256];
PFD_GLYPHSET pGlyphSet;
pwcrun[0].wcLow = awc[0];
pwcrun[0].cGlyphs = 1;
pwcrun[0].phg = phglyphs;
- phglyphs[0] = (HGLYPH)pface->pCharTable;
+ phglyphs[0] = 0;
/* Walk through all supported chars */
for (i = 1, j = 0; i < cGlyphs; i++)
{
- /* Use pointer to glyph entry as hglyph */
- cjOffset = (ach[i] - chFirst) * pface->cjEntrySize;
- phglyphs[i] = (HGLYPH)(pface->pCharTable + cjOffset);
+ /* Use offset to glyph entry as hglyph */
+ phglyphs[i] = (ach[i] - chFirst) * pface->cjEntrySize;
/* Check whether we can append the wchar to a run */
if (awc[i] == awc[i - 1] + 1)
ULONG cjSize)
{
PBMFD_FACE pface = pfont->pface;
- PGLYPHENTRY pge = (PGLYPHENTRY)hg;
+ PGLYPHENTRY pge = (PGLYPHENTRY)(pface->pCharTable + hg);
ULONG xSrc, ySrc, cxSrc, cySrc;
ULONG xDst, yDst, cxDst, cyDst;
ULONG xScale, yScale;
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);
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);
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);
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);
/* PRIVATE FUNCTIONS **********************************************************/
+#if defined(_M_IX86)
VP_STATUS NTAPI
IntInt10AllocateBuffer(
IN PVOID Context,
if (NT_SUCCESS(Status)) return NO_ERROR;
return ERROR_INVALID_PARAMETER;
}
+#endif
/* PUBLIC FUNCTIONS ***********************************************************/
IN PVOID HwDeviceExtension,
IN PVIDEO_X86_BIOS_ARGUMENTS BiosArguments)
{
+#if defined(_M_IX86)
CONTEXT BiosContext;
NTSTATUS Status;
PKPROCESS CallingProcess = (PKPROCESS)PsGetCurrentProcess();
IntDetachFromCSRSS(&CallingProcess, &ApcState);
if (NT_SUCCESS(Status)) return NO_ERROR;
return ERROR_INVALID_PARAMETER;
+#else
+ /* Not implemented for anything else than X86*/
+ DPRINT1("Int10 not available on non-x86!\n");
+ return ERROR_INVALID_FUNCTION;
+#endif
}
NTAPI
VideoPortEnableInterrupt(IN PVOID HwDeviceExtension)
{
+#ifndef _M_AMD64
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
BOOLEAN InterruptValid;
/* Return to caller */
return NO_ERROR;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalEnableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_ACCESS;
+#endif
}
/*
NTAPI
VideoPortDisableInterrupt(IN PVOID HwDeviceExtension)
{
+#ifndef _M_AMD64
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
/* Get the device extension */
HalDisableSystemInterrupt(DeviceExtension->InterruptVector,
0);
return NO_ERROR;
+#else
+ /* FIXME: Function still present? If so what to use instead of HalDisableSystemInterrupt? */
+ UNIMPLEMENTED;
+ return ERROR_INVALID_ACCESS;
+#endif
}
if (Status)
*Status = NO_ERROR;
- return (PVOID)TranslatedAddress.u.LowPart;
+ return (PVOID)(ULONG_PTR)TranslatedAddress.u.LowPart;
}
/* user space */
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);
}
}
switch (ServicesType)
{
+#if defined(_M_IX86)
case VideoPortServicesInt10:
if (Interface->Version >= VIDEO_PORT_INT10_INTERFACE_VERSION_1 ||
Interface->Size >= sizeof(VIDEO_PORT_INT10_INTERFACE))
return NO_ERROR;
}
break;
-
+#endif
case VideoPortServicesAGP:
if ((Interface->Version == VIDEO_PORT_AGP_INTERFACE_VERSION_2 &&
Interface->Size >= sizeof(VIDEO_PORT_AGP_INTERFACE_2)) ||
{
WCHAR DeviceVideoBuffer[20];
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- ULONG Size;
+ SIZE_T Size;
NTSTATUS Status;
VIDEO_PORT_CONFIG_INFO ConfigInfo;
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
{
KSSTREAM_HEADER Header;
SOUND_DEVICE_TYPE DeviceType;
- ULONG DeviceIndex;
+ ULONG_PTR DeviceIndex;
HANDLE hDevice;
ULONG DeviceCount;