2004-03-06 Filip Navara <xnavara@volny.cz>

* drivers/video/videoprt/int10.c (VideoPortInt10):
	Print more debug informations.
	* drivers/video/videoprt/videoprt.c (VideoPortInitialize):
	Prevent conflicts when more miniport drivers are loaded.
	(VideoPortGetDeviceBase, VideoPortMapMemory, InternalMapMemory):
	Change way of reporting error to prevent reporting error when
	the resources were successfully mapped.
	(VideoPortDDCMonitorHelper): Add stub.
	(VidDispatchDeviceControl): Allocate memory from NonPagedPool.
	Add debug messages.
	* drivers/video/videoprt/videoprt.def (VideoPortDDCMonitorHelper):
	Add export.
	* drivers/video/videoprt/videoprt.edf (VideoPortDDCMonitorHelper):
	Ditto.
	* include/ddk/winddi.h (ENG_SYSTEM_ATTRIBUTE): Declare.
	* include/win32k/driver.h (DRIVER_FindMPDriver): Change declaration.
	* subsys/win32k/eng/surface.c (EngModifySurface): Implement.
	* subsys/win32k/misc/driver.c (DRIVER_FindMPDriver):
	Modify to open specific miniport driver depending on parameter.
	* subsys/win32k/objects/dc.c (GetRegistryPath):
	Add parameter to specify display driver number.
	(FindDriverFileNames): Ditto.
	(SetupDevMode): Ditto.
	(IntCreateDC): Correct DPRINT.
	(IntCreatePrimarySurface): Change to try more miniport drivers
	before giving up.
	* subsys/win32k/stubs/stubs.c (HeapVidMemAllocAligned, VidMemFree,
	EngDitherColor, EngQuerySystemAttribute): Add stubs.
	* subsys/win32k/win32k.edf (EngDitherColor, EngQuerySystemAttribute,
	HeapVidMemAllocAligned, VidMemFree, EngModifySurface):
	Add exports.
	* subsys/win32k/win32k.def: Ditto.

svn path=/trunk/; revision=8547
This commit is contained in:
Filip Navara 2004-03-06 01:22:04 +00:00
parent 30264d875a
commit f1d20bbf54
13 changed files with 472 additions and 233 deletions

View file

@ -18,7 +18,7 @@
* If not, write to the Free Software Foundation, * If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id: int10.c,v 1.2 2004/02/22 22:19:42 navaraf Exp $ * $Id: int10.c,v 1.3 2004/03/06 01:22:02 navaraf Exp $
*/ */
#include "videoprt.h" #include "videoprt.h"
@ -56,12 +56,19 @@ VideoPortInt10(
} }
memset(&Regs, 0, sizeof(Regs)); memset(&Regs, 0, sizeof(Regs));
DPRINT("- Input register Eax: %x\n", BiosArguments->Eax);
Regs.Eax = BiosArguments->Eax; Regs.Eax = BiosArguments->Eax;
DPRINT("- Input register Ebx: %x\n", BiosArguments->Ebx);
Regs.Ebx = BiosArguments->Ebx; Regs.Ebx = BiosArguments->Ebx;
DPRINT("- Input register Ecx: %x\n", BiosArguments->Ecx);
Regs.Ecx = BiosArguments->Ecx; Regs.Ecx = BiosArguments->Ecx;
DPRINT("- Input register Edx: %x\n", BiosArguments->Edx);
Regs.Edx = BiosArguments->Edx; Regs.Edx = BiosArguments->Edx;
DPRINT("- Input register Esi: %x\n", BiosArguments->Esi);
Regs.Esi = BiosArguments->Esi; Regs.Esi = BiosArguments->Esi;
DPRINT("- Input register Edi: %x\n", BiosArguments->Edi);
Regs.Edi = BiosArguments->Edi; Regs.Edi = BiosArguments->Edi;
DPRINT("- Input register Ebp: %x\n", BiosArguments->Ebp);
Regs.Ebp = BiosArguments->Ebp; Regs.Ebp = BiosArguments->Ebp;
Status = Ke386CallBios(0x10, &Regs); Status = Ke386CallBios(0x10, &Regs);

View file

@ -18,7 +18,7 @@
* If not, write to the Free Software Foundation, * If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id: videoprt.c,v 1.5 2004/03/04 18:51:58 navaraf Exp $ * $Id: videoprt.c,v 1.6 2004/03/06 01:22:02 navaraf Exp $
*/ */
#include "videoprt.h" #include "videoprt.h"
@ -155,7 +155,7 @@ VideoPortGetDeviceBase(IN PVOID HwDeviceExtension,
VIDEO_PORT_DEVICE_EXTENSION, VIDEO_PORT_DEVICE_EXTENSION,
MiniPortDeviceExtension); MiniPortDeviceExtension);
return InternalMapMemory(DeviceExtension, IoAddress, NumberOfUchars, InIoSpace); return InternalMapMemory(DeviceExtension, IoAddress, NumberOfUchars, InIoSpace, NULL);
} }
@ -208,8 +208,11 @@ VideoPortGetAccessRanges(IN PVOID HwDeviceExtension,
if (0 == NumRequestedResources && PCIBus == DeviceExtension->AdapterInterfaceType) if (0 == NumRequestedResources && PCIBus == DeviceExtension->AdapterInterfaceType)
{ {
DPRINT("Looking for VendorId 0x%04x DeviceId 0x%04x\n", (int)*((USHORT *) VendorId), if (DeviceId != NULL && VendorId != NULL)
(int)*((USHORT *) DeviceId)); {
DPRINT("Looking for VendorId 0x%04x DeviceId 0x%04x\n", (int)*((USHORT *) VendorId),
(int)*((USHORT *) DeviceId));
}
FoundDevice = FALSE; FoundDevice = FALSE;
PciSlotNumber.u.AsULONG = *Slot; PciSlotNumber.u.AsULONG = *Slot;
for (FunctionNumber = 0; ! FoundDevice && FunctionNumber < 8; FunctionNumber++) for (FunctionNumber = 0; ! FoundDevice && FunctionNumber < 8; FunctionNumber++)
@ -220,11 +223,15 @@ VideoPortGetAccessRanges(IN PVOID HwDeviceExtension,
PciSlotNumber.u.AsULONG,&Config, 0, PciSlotNumber.u.AsULONG,&Config, 0,
sizeof(PCI_COMMON_CONFIG))) sizeof(PCI_COMMON_CONFIG)))
{ {
DPRINT("Slot 0x%02x (Device %d Function %d) VendorId 0x%04x DeviceId 0x%04x\n", if (DeviceId != NULL && VendorId != NULL)
PciSlotNumber.u.AsULONG, PciSlotNumber.u.bits.DeviceNumber, {
PciSlotNumber.u.bits.FunctionNumber, Config.VendorID, Config.DeviceID); DPRINT("Slot 0x%02x (Device %d Function %d) VendorId 0x%04x DeviceId 0x%04x\n",
FoundDevice = (Config.VendorID == *((USHORT *) VendorId) && PciSlotNumber.u.AsULONG, PciSlotNumber.u.bits.DeviceNumber,
Config.DeviceID == *((USHORT *) DeviceId)); PciSlotNumber.u.bits.FunctionNumber, Config.VendorID, Config.DeviceID);
}
FoundDevice = (VendorId == NULL || Config.VendorID == *((USHORT *) VendorId)) &&
(DeviceId == NULL || Config.DeviceID == *((USHORT *) DeviceId));
} }
} }
if (! FoundDevice) if (! FoundDevice)
@ -451,7 +458,7 @@ VideoPortInitialize(IN PVOID Context1,
IN PVOID HwContext) IN PVOID HwContext)
{ {
PUNICODE_STRING RegistryPath; PUNICODE_STRING RegistryPath;
UCHAR Again; UCHAR Again = FALSE;
WCHAR DeviceBuffer[20]; WCHAR DeviceBuffer[20];
WCHAR SymlinkBuffer[20]; WCHAR SymlinkBuffer[20];
WCHAR DeviceVideoBuffer[20]; WCHAR DeviceVideoBuffer[20];
@ -460,7 +467,7 @@ VideoPortInitialize(IN PVOID Context1,
PDEVICE_OBJECT MPDeviceObject; PDEVICE_OBJECT MPDeviceObject;
VIDEO_PORT_CONFIG_INFO ConfigInfo; VIDEO_PORT_CONFIG_INFO ConfigInfo;
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
ULONG DeviceNumber = 0; ULONG DisplayNumber;
UNICODE_STRING DeviceName; UNICODE_STRING DeviceName;
UNICODE_STRING SymlinkName; UNICODE_STRING SymlinkName;
ULONG MaxBus; ULONG MaxBus;
@ -468,30 +475,59 @@ VideoPortInitialize(IN PVOID Context1,
KIRQL IRQL; KIRQL IRQL;
KAFFINITY Affinity; KAFFINITY Affinity;
ULONG InterruptVector; ULONG InterruptVector;
OBJECT_ATTRIBUTES Obj;
HANDLE ObjHandle;
DPRINT("VideoPortInitialize\n"); DPRINT("VideoPortInitialize\n");
RegistryPath = (PUNICODE_STRING) Context2; RegistryPath = (PUNICODE_STRING) Context2;
/* Build Dispatch table from passed data */ /* Build Dispatch table from passed data */
MPDriverObject->DriverStartIo = (PDRIVER_STARTIO) HwInitializationData->HwStartIO; MPDriverObject->DriverStartIo = (PDRIVER_STARTIO) HwInitializationData->HwStartIO;
/* Create a unicode device name */ /* Find the first free device number */
for (DisplayNumber = 0;;)
{
swprintf(SymlinkBuffer, L"\\??\\DISPLAY%lu", DisplayNumber + 1);
RtlInitUnicodeString(&SymlinkName, SymlinkBuffer);
InitializeObjectAttributes(&Obj, &SymlinkName, 0, NULL, NULL);
Status = ZwOpenSymbolicLinkObject(&ObjHandle, GENERIC_READ, &Obj);
if (NT_SUCCESS(Status))
{
ZwClose(ObjHandle);
DisplayNumber++;
continue;
}
else if (Status == STATUS_NOT_FOUND || Status == STATUS_UNSUCCESSFUL)
{
break;
}
else
{
return Status;
}
}
DPRINT("- DisplayNumber: %d\n", DisplayNumber);
Again = FALSE; Again = FALSE;
do do
{ {
swprintf(DeviceBuffer, L"\\Device\\Video%lu", DeviceNumber); /* Create a unicode device name. */
swprintf(DeviceBuffer, L"\\Device\\Video%lu", DisplayNumber);
RtlInitUnicodeString(&DeviceName, DeviceBuffer); RtlInitUnicodeString(&DeviceName, DeviceBuffer);
/* Create the device */ /* Create the device. */
Status = IoCreateDevice(MPDriverObject, Status = IoCreateDevice(
HwInitializationData->HwDeviceExtensionSize + MPDriverObject,
sizeof(VIDEO_PORT_DEVICE_EXTENSION), HwInitializationData->HwDeviceExtensionSize +
&DeviceName, sizeof(VIDEO_PORT_DEVICE_EXTENSION),
FILE_DEVICE_VIDEO, &DeviceName,
0, FILE_DEVICE_VIDEO,
TRUE, 0,
&MPDeviceObject); TRUE,
&MPDeviceObject);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
DPRINT("IoCreateDevice call failed with status 0x%08x\n", Status); DPRINT("IoCreateDevice call failed with status 0x%08x\n", Status);
@ -518,8 +554,8 @@ VideoPortInitialize(IN PVOID Context1,
DeviceExtension->RegistryPath.Buffer = ExAllocatePoolWithTag(PagedPool, DeviceExtension->RegistryPath.Buffer = ExAllocatePoolWithTag(PagedPool,
MaxLen, MaxLen,
TAG_VIDEO_PORT); TAG_VIDEO_PORT);
swprintf(DeviceExtension->RegistryPath.Buffer, L"%s\\Device%d", swprintf(DeviceExtension->RegistryPath.Buffer, L"%s\\Device0",
RegistryPath->Buffer, DeviceNumber); RegistryPath->Buffer);
DeviceExtension->RegistryPath.Length = wcslen(DeviceExtension->RegistryPath.Buffer) * DeviceExtension->RegistryPath.Length = wcslen(DeviceExtension->RegistryPath.Buffer) *
sizeof(WCHAR); sizeof(WCHAR);
@ -569,14 +605,14 @@ VideoPortInitialize(IN PVOID Context1,
DPRINT("Found adapter\n"); DPRINT("Found adapter\n");
/* create symbolic link "\??\DISPLAYx" */ /* create symbolic link "\??\DISPLAYx" */
swprintf(SymlinkBuffer, L"\\??\\DISPLAY%lu", DeviceNumber+1); swprintf(SymlinkBuffer, L"\\??\\DISPLAY%lu", DisplayNumber + 1);
RtlInitUnicodeString (&SymlinkName, RtlInitUnicodeString (&SymlinkName,
SymlinkBuffer); SymlinkBuffer);
IoCreateSymbolicLink (&SymlinkName, IoCreateSymbolicLink (&SymlinkName,
&DeviceName); &DeviceName);
/* Add entry to DEVICEMAP\VIDEO key in registry */ /* Add entry to DEVICEMAP\VIDEO key in registry */
swprintf(DeviceVideoBuffer, L"\\Device\\Video%d", DeviceNumber); swprintf(DeviceVideoBuffer, L"\\Device\\Video%d", DisplayNumber);
RtlWriteRegistryValue(RTL_REGISTRY_DEVICEMAP, RtlWriteRegistryValue(RTL_REGISTRY_DEVICEMAP,
L"VIDEO", L"VIDEO",
DeviceVideoBuffer, DeviceVideoBuffer,
@ -632,7 +668,7 @@ VideoPortInitialize(IN PVOID Context1,
return Status; return Status;
} }
} }
DeviceNumber++; DisplayNumber++;
} }
while (Again); while (Again);
@ -712,6 +748,7 @@ VideoPortMapMemory(IN PVOID HwDeviceExtension,
OUT PVOID *VirtualAddress) OUT PVOID *VirtualAddress)
{ {
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension; PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
NTSTATUS Status;
DPRINT("VideoPortMapMemory\n"); DPRINT("VideoPortMapMemory\n");
@ -719,9 +756,9 @@ VideoPortMapMemory(IN PVOID HwDeviceExtension,
VIDEO_PORT_DEVICE_EXTENSION, VIDEO_PORT_DEVICE_EXTENSION,
MiniPortDeviceExtension); MiniPortDeviceExtension);
*VirtualAddress = InternalMapMemory(DeviceExtension, PhysicalAddress, *VirtualAddress = InternalMapMemory(DeviceExtension, PhysicalAddress,
*Length, *InIoSpace); *Length, *InIoSpace, &Status);
return NULL == *VirtualAddress ? STATUS_NO_MEMORY : STATUS_SUCCESS; return Status;
} }
@ -1133,7 +1170,7 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
DeviceExtension = DeviceObject->DeviceExtension; DeviceExtension = DeviceObject->DeviceExtension;
/* Translate the IRP to a VRP */ /* Translate the IRP to a VRP */
vrp = ExAllocatePool(PagedPool, sizeof(VIDEO_REQUEST_PACKET)); vrp = ExAllocatePool(NonPagedPool, sizeof(VIDEO_REQUEST_PACKET));
if (NULL == vrp) if (NULL == vrp)
{ {
return STATUS_NO_MEMORY; return STATUS_NO_MEMORY;
@ -1141,6 +1178,8 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
vrp->StatusBlock = (PSTATUS_BLOCK) &(Irp->IoStatus); vrp->StatusBlock = (PSTATUS_BLOCK) &(Irp->IoStatus);
vrp->IoControlCode = IrpStack->Parameters.DeviceIoControl.IoControlCode; vrp->IoControlCode = IrpStack->Parameters.DeviceIoControl.IoControlCode;
DPRINT("- IoControlCode: %x\n", vrp->IoControlCode);
/* We're assuming METHOD_BUFFERED */ /* We're assuming METHOD_BUFFERED */
vrp->InputBuffer = Irp->AssociatedIrp.SystemBuffer; vrp->InputBuffer = Irp->AssociatedIrp.SystemBuffer;
vrp->InputBufferLength = IrpStack->Parameters.DeviceIoControl.InputBufferLength; vrp->InputBufferLength = IrpStack->Parameters.DeviceIoControl.InputBufferLength;
@ -1153,6 +1192,8 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject,
/* Free the VRP */ /* Free the VRP */
ExFreePool(vrp); ExFreePool(vrp);
DPRINT("- Returned status: %x\n", Irp->IoStatus.Status);
IoCompleteRequest(Irp, IO_NO_INCREMENT); IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS; return STATUS_SUCCESS;
@ -1162,7 +1203,8 @@ PVOID STDCALL
InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
IN PHYSICAL_ADDRESS IoAddress, IN PHYSICAL_ADDRESS IoAddress,
IN ULONG NumberOfUchars, IN ULONG NumberOfUchars,
IN UCHAR InIoSpace) IN UCHAR InIoSpace,
OUT NTSTATUS *Status)
{ {
PHYSICAL_ADDRESS TranslatedAddress; PHYSICAL_ADDRESS TranslatedAddress;
PVIDEO_PORT_ADDRESS_MAPPING AddressMapping; PVIDEO_PORT_ADDRESS_MAPPING AddressMapping;
@ -1187,6 +1229,10 @@ InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
NumberOfUchars <= AddressMapping->NumberOfUchars) NumberOfUchars <= AddressMapping->NumberOfUchars)
{ {
AddressMapping->MappingCount++; AddressMapping->MappingCount++;
if (Status)
{
*Status = STATUS_SUCCESS;
}
return AddressMapping->MappedAddress; return AddressMapping->MappedAddress;
} }
Entry = Entry->Flink; Entry = Entry->Flink;
@ -1199,35 +1245,62 @@ InternalMapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
IoAddress, IoAddress,
&AddressSpace, &AddressSpace,
&TranslatedAddress) == FALSE) &TranslatedAddress) == FALSE)
return NULL; {
if (Status)
{
*Status = STATUS_NO_MEMORY;
}
return NULL;
}
/* i/o space */ /* i/o space */
if (AddressSpace != 0) if (AddressSpace != 0)
{ {
assert(0 == TranslatedAddress.u.HighPart); assert(0 == TranslatedAddress.u.HighPart);
return (PVOID) TranslatedAddress.u.LowPart; if (Status)
{
*Status = STATUS_SUCCESS;
}
return (PVOID) TranslatedAddress.u.LowPart;
} }
MappedAddress = MmMapIoSpace(TranslatedAddress, MappedAddress = MmMapIoSpace(TranslatedAddress,
NumberOfUchars, NumberOfUchars,
FALSE); FALSE);
AddressMapping = ExAllocatePoolWithTag(PagedPool, if (MappedAddress)
sizeof(VIDEO_PORT_ADDRESS_MAPPING), {
TAG_VIDEO_PORT); if (Status)
if (AddressMapping == NULL) {
return MappedAddress; *Status = STATUS_SUCCESS;
}
AddressMapping->MappedAddress = MappedAddress; AddressMapping = ExAllocatePoolWithTag(PagedPool,
AddressMapping->NumberOfUchars = NumberOfUchars; sizeof(VIDEO_PORT_ADDRESS_MAPPING),
AddressMapping->IoAddress = IoAddress; TAG_VIDEO_PORT);
AddressMapping->SystemIoBusNumber = DeviceExtension->SystemIoBusNumber; if (AddressMapping == NULL)
AddressMapping->MappingCount = 1; return MappedAddress;
InsertHeadList(&DeviceExtension->AddressMappingListHead, AddressMapping->MappedAddress = MappedAddress;
&AddressMapping->List); AddressMapping->NumberOfUchars = NumberOfUchars;
AddressMapping->IoAddress = IoAddress;
AddressMapping->SystemIoBusNumber = DeviceExtension->SystemIoBusNumber;
AddressMapping->MappingCount = 1;
return MappedAddress; InsertHeadList(&DeviceExtension->AddressMappingListHead,
&AddressMapping->List);
return MappedAddress;
}
else
{
if (Status)
{
*Status = STATUS_NO_MEMORY;
}
return NULL;
}
} }
VOID STDCALL VOID STDCALL
@ -1261,3 +1334,14 @@ InternalUnmapMemory(IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
Entry = Entry->Flink; Entry = Entry->Flink;
} }
} }
BOOLEAN STDCALL
VideoPortDDCMonitorHelper(
PVOID HwDeviceExtension,
/*PI2C_FNC_TABLE*/PVOID I2CFunctions,
PUCHAR pEdidBuffer,
ULONG EdidBufferSize
)
{
return FALSE;
}

View file

@ -1,10 +1,11 @@
; $Id: videoprt.def,v 1.2 2004/02/25 02:59:55 jimtabor Exp $ ; $Id: videoprt.def,v 1.3 2004/03/06 01:22:02 navaraf Exp $
; ;
; vidport.def - export definition file for ReactOS ; vidport.def - export definition file for ReactOS
; ;
EXPORTS EXPORTS
ReturnCsrssAddress ReturnCsrssAddress
VideoPortCompareMemory@12 VideoPortCompareMemory@12
VideoPortDDCMonitorHelper@16
VideoPortDebugPrint VideoPortDebugPrint
VideoPortDisableInterrupt@4 VideoPortDisableInterrupt@4
VideoPortEnableInterrupt@4 VideoPortEnableInterrupt@4

View file

@ -1,10 +1,11 @@
; $Id: videoprt.edf,v 1.2 2004/02/25 03:05:27 jimtabor Exp $ ; $Id: videoprt.edf,v 1.3 2004/03/06 01:22:02 navaraf Exp $
; ;
; vidport.def - export definition file for ReactOS ; vidport.def - export definition file for ReactOS
; ;
EXPORTS EXPORTS
VideoPortCompareMemory=NTOSKRNL.RtlCompareMemory VideoPortCompareMemory=NTOSKRNL.RtlCompareMemory
VideoPortAllocatePool=VideoPortAllocatePool@16 VideoPortAllocatePool=VideoPortAllocatePool@16
VideoPortDDCMonitorHelper=VideoPortDDCMonitorHelper@16
VideoPortDebugPrint VideoPortDebugPrint
VideoPortDisableInterrupt=VideoPortDisableInterrupt@4 VideoPortDisableInterrupt=VideoPortDisableInterrupt@4
VideoPortEnableInterrupt=VideoPortEnableInterrupt@4 VideoPortEnableInterrupt=VideoPortEnableInterrupt@4

View file

@ -18,7 +18,7 @@
* If not, write to the Free Software Foundation, * If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* *
* $Id: videoprt.h,v 1.1 2004/01/19 15:56:53 navaraf Exp $ * $Id: videoprt.h,v 1.2 2004/03/06 01:22:02 navaraf Exp $
*/ */
#ifndef VIDEOPRT_H #ifndef VIDEOPRT_H
@ -86,9 +86,10 @@ VidDispatchDeviceControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
PVOID STDCALL PVOID STDCALL
InternalMapMemory( InternalMapMemory(
IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension, IN PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension,
IN PHYSICAL_ADDRESS IoAddress, IN PHYSICAL_ADDRESS IoAddress,
IN ULONG NumberOfUchars, IN ULONG NumberOfUchars,
IN UCHAR InIoSpace); IN UCHAR InIoSpace,
OUT NTSTATUS *Status);
VOID STDCALL VOID STDCALL
InternalUnmapMemory( InternalUnmapMemory(

View file

@ -867,6 +867,13 @@ typedef struct _ENG_TIME_FIELDS
USHORT usWeekday; USHORT usWeekday;
} ENG_TIME_FIELDS, *PENG_TIME_FIELDS; } ENG_TIME_FIELDS, *PENG_TIME_FIELDS;
typedef enum _ENG_SYSTEM_ATTRIBUTE {
EngProcessorFeature = 1,
EngNumberOfProcessors,
EngOptimumAvailableUserMemory,
EngOptimumAvailableSystemMemory,
} ENG_SYSTEM_ATTRIBUTE;
typedef struct _LINEATTRS typedef struct _LINEATTRS
{ {
FLONG fl; FLONG fl;

View file

@ -162,7 +162,7 @@ typedef struct _DRIVER_FUNCTIONS
BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver); BOOL DRIVER_RegisterDriver(LPCWSTR Name, PGD_ENABLEDRIVER EnableDriver);
PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name); PGD_ENABLEDRIVER DRIVER_FindDDIDriver(LPCWSTR Name);
PFILE_OBJECT DRIVER_FindMPDriver(LPCWSTR Name); PFILE_OBJECT DRIVER_FindMPDriver(ULONG DisplayNumber);
BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED, BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED,
PDRIVER_FUNCTIONS DF); PDRIVER_FUNCTIONS DF);
BOOL DRIVER_UnregisterDriver(LPCWSTR Name); BOOL DRIVER_UnregisterDriver(LPCWSTR Name);

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: surface.c,v 1.32 2004/02/14 22:24:54 navaraf Exp $ /* $Id: surface.c,v 1.33 2004/03/06 01:22:03 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -477,6 +477,42 @@ EngAssociateSurface(IN HSURF Surface,
return TRUE; return TRUE;
} }
/*
* @implemented
*/
BOOL STDCALL
EngModifySurface(
IN HSURF hsurf,
IN HDEV hdev,
IN FLONG flHooks,
IN FLONG flSurface,
IN DHSURF dhsurf,
OUT VOID *pvScan0,
IN LONG lDelta,
IN VOID *pvReserved)
{
SURFOBJ *pso;
pso = EngLockSurface(hsurf);
if (pso == NULL)
{
return FALSE;
}
if (!EngAssociateSurface(hsurf, hdev, flHooks))
{
return FALSE;
}
pso->dhsurf = dhsurf;
pso->lDelta = lDelta;
pso->pvScan0 = pvScan0;
EngUnlockSurface(pso);
return TRUE;
}
/* /*
* @implemented * @implemented
*/ */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: driver.c,v 1.36 2004/02/22 12:06:43 weiden Exp $ /* $Id: driver.c,v 1.37 2004/03/06 01:22:03 navaraf Exp $
* *
* GDI Driver support routines * GDI Driver support routines
* (mostly swiped from Wine) * (mostly swiped from Wine)
@ -236,16 +236,18 @@ BOOL DRIVER_BuildDDIFunctions(PDRVENABLEDATA DED,
typedef VP_STATUS (*PMP_DRIVERENTRY)(PVOID, PVOID); typedef VP_STATUS (*PMP_DRIVERENTRY)(PVOID, PVOID);
PFILE_OBJECT DRIVER_FindMPDriver(LPCWSTR Name) PFILE_OBJECT DRIVER_FindMPDriver(ULONG DisplayNumber)
{ {
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
WCHAR DeviceNameBuffer[20];
UNICODE_STRING DeviceName; UNICODE_STRING DeviceName;
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
HANDLE DisplayHandle; HANDLE DisplayHandle;
NTSTATUS Status; NTSTATUS Status;
PFILE_OBJECT VideoFileObject; PFILE_OBJECT VideoFileObject;
RtlRosInitUnicodeStringFromLiteral(&DeviceName, L"\\??\\DISPLAY1"); swprintf(DeviceNameBuffer, L"\\??\\DISPLAY%d", DisplayNumber + 1);
RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
InitializeObjectAttributes(&ObjectAttributes, InitializeObjectAttributes(&ObjectAttributes,
&DeviceName, &DeviceName,
0, 0,

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: dc.c,v 1.122 2004/03/05 09:02:42 hbirr Exp $ /* $Id: dc.c,v 1.123 2004/03/06 01:22:03 navaraf Exp $
* *
* DC.C - Device context functions * DC.C - Device context functions
* *
@ -239,15 +239,17 @@ NtGdiCreateCompatableDC(HDC hDC)
} }
static BOOL FASTCALL static BOOL FASTCALL
GetRegistryPath(PUNICODE_STRING RegistryPath) GetRegistryPath(PUNICODE_STRING RegistryPath, ULONG DisplayNumber)
{ {
RTL_QUERY_REGISTRY_TABLE QueryTable[2]; RTL_QUERY_REGISTRY_TABLE QueryTable[2];
WCHAR DeviceNameBuffer[20];
NTSTATUS Status; NTSTATUS Status;
swprintf(DeviceNameBuffer, L"\\Device\\Video%d", DisplayNumber);
RtlInitUnicodeString(RegistryPath, NULL); RtlInitUnicodeString(RegistryPath, NULL);
RtlZeroMemory(QueryTable, sizeof(QueryTable)); RtlZeroMemory(QueryTable, sizeof(QueryTable));
QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT; QueryTable[0].Flags = RTL_QUERY_REGISTRY_REQUIRED | RTL_QUERY_REGISTRY_DIRECT;
QueryTable[0].Name = L"\\Device\\Video0"; QueryTable[0].Name = DeviceNameBuffer;
QueryTable[0].EntryContext = RegistryPath; QueryTable[0].EntryContext = RegistryPath;
Status = RtlQueryRegistryValues(RTL_REGISTRY_DEVICEMAP, Status = RtlQueryRegistryValues(RTL_REGISTRY_DEVICEMAP,
@ -257,7 +259,7 @@ GetRegistryPath(PUNICODE_STRING RegistryPath)
NULL); NULL);
if (! NT_SUCCESS(Status)) if (! NT_SUCCESS(Status))
{ {
DPRINT1("No \\Device\\Video0 value in DEVICEMAP\\VIDEO found\n"); DPRINT1("No \\Device\\Video%d value in DEVICEMAP\\VIDEO found\n", DisplayNumber);
return FALSE; return FALSE;
} }
@ -267,13 +269,13 @@ GetRegistryPath(PUNICODE_STRING RegistryPath)
} }
static BOOL FASTCALL static BOOL FASTCALL
FindDriverFileNames(PUNICODE_STRING DriverFileNames) FindDriverFileNames(PUNICODE_STRING DriverFileNames, ULONG DisplayNumber)
{ {
RTL_QUERY_REGISTRY_TABLE QueryTable[2]; RTL_QUERY_REGISTRY_TABLE QueryTable[2];
UNICODE_STRING RegistryPath; UNICODE_STRING RegistryPath;
NTSTATUS Status; NTSTATUS Status;
if (! GetRegistryPath(&RegistryPath)) if (! GetRegistryPath(&RegistryPath, DisplayNumber))
{ {
DPRINT("GetRegistryPath failed\n"); DPRINT("GetRegistryPath failed\n");
return FALSE; return FALSE;
@ -350,7 +352,7 @@ DevModeCallback(IN PWSTR ValueName,
} }
static BOOL FASTCALL static BOOL FASTCALL
SetupDevMode(PDEVMODEW DevMode) SetupDevMode(PDEVMODEW DevMode, ULONG DisplayNumber)
{ {
static WCHAR RegistryMachineSystem[] = L"\\REGISTRY\\MACHINE\\SYSTEM\\"; static WCHAR RegistryMachineSystem[] = L"\\REGISTRY\\MACHINE\\SYSTEM\\";
static WCHAR CurrentControlSet[] = L"CURRENTCONTROLSET\\"; static WCHAR CurrentControlSet[] = L"CURRENTCONTROLSET\\";
@ -363,7 +365,7 @@ SetupDevMode(PDEVMODEW DevMode)
RTL_QUERY_REGISTRY_TABLE QueryTable[2]; RTL_QUERY_REGISTRY_TABLE QueryTable[2];
NTSTATUS Status; NTSTATUS Status;
if (! GetRegistryPath(&RegistryPath)) if (! GetRegistryPath(&RegistryPath, DisplayNumber))
{ {
DPRINT("GetRegistryPath failed\n"); DPRINT("GetRegistryPath failed\n");
return FALSE; return FALSE;
@ -464,187 +466,208 @@ SetupDevMode(PDEVMODEW DevMode)
BOOL FASTCALL BOOL FASTCALL
IntCreatePrimarySurface() IntCreatePrimarySurface()
{ {
PGD_ENABLEDRIVER GDEnableDriver; PGD_ENABLEDRIVER GDEnableDriver;
DRVENABLEDATA DED; DRVENABLEDATA DED;
PSURFOBJ SurfObj; PSURFOBJ SurfObj;
PSURFGDI SurfGDI; PSURFGDI SurfGDI;
UNICODE_STRING DriverFileNames; UNICODE_STRING DriverFileNames;
PWSTR CurrentName; PWSTR CurrentName;
BOOL GotDriver; BOOL GotDriver;
BOOL DoDefault; BOOL DoDefault;
ULONG DisplayNumber;
RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface)); for (DisplayNumber = 0; ; DisplayNumber++)
{
DPRINT("Trying to load display driver no. %d\n", DisplayNumber);
ExInitializeFastMutex(&PrimarySurface.DriverLock); RtlZeroMemory(&PrimarySurface, sizeof(PrimarySurface));
ExInitializeFastMutex(&PrimarySurface.DriverLock);
/* Open the miniport driver */ PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(DisplayNumber);
if ((PrimarySurface.VideoFileObject = DRIVER_FindMPDriver(L"DISPLAY")) == NULL)
{
DPRINT1("FindMPDriver failed\n");
return FALSE;
}
/* Retrieve DDI driver names from registry */ /* Open the miniport driver */
RtlInitUnicodeString(&DriverFileNames, NULL); if (PrimarySurface.VideoFileObject == NULL)
if (! FindDriverFileNames(&DriverFileNames)) {
{ DPRINT1("FindMPDriver failed\n");
DPRINT1("FindDriverFileNames failed\n"); return FALSE;
return FALSE; }
}
/* DriverFileNames may be a list of drivers in REG_SZ_MULTI format, scan all of /* Retrieve DDI driver names from registry */
them until a good one found */ RtlInitUnicodeString(&DriverFileNames, NULL);
CurrentName = DriverFileNames.Buffer; if (!FindDriverFileNames(&DriverFileNames, DisplayNumber))
GotDriver = FALSE; {
while (! GotDriver && CurrentName < DriverFileNames.Buffer + DriverFileNames.Length) DPRINT1("FindDriverFileNames failed\n");
{ /* return FALSE; */
/* Get the DDI driver's entry point */ continue;
GDEnableDriver = DRIVER_FindDDIDriver(CurrentName); }
if (NULL == GDEnableDriver)
{ /*
DPRINT("FindDDIDriver failed for %S\n", CurrentName); * DriverFileNames may be a list of drivers in REG_SZ_MULTI format,
} * scan all of them until a good one found.
*/
CurrentName = DriverFileNames.Buffer;
GotDriver = FALSE;
while (!GotDriver &&
CurrentName < DriverFileNames.Buffer + DriverFileNames.Length)
{
/* Get the DDI driver's entry point */
GDEnableDriver = DRIVER_FindDDIDriver(CurrentName);
if (NULL == GDEnableDriver)
{
DPRINT("FindDDIDriver failed for %S\n", CurrentName);
}
else
{
/* Call DDI driver's EnableDriver function */
RtlZeroMemory(&DED, sizeof(DED));
if (! GDEnableDriver(DDI_DRIVER_VERSION, sizeof(DED), &DED))
{
DPRINT("DrvEnableDriver failed for %S\n", CurrentName);
}
else
{
GotDriver = TRUE;
}
}
if (! GotDriver)
{
/* Skip to the next name but never get past the Unicode string */
while (L'\0' != *CurrentName &&
CurrentName < DriverFileNames.Buffer + DriverFileNames.Length)
{
CurrentName++;
}
if (CurrentName < DriverFileNames.Buffer + DriverFileNames.Length)
{
CurrentName++;
}
}
}
RtlFreeUnicodeString(&DriverFileNames);
if (!GotDriver)
{
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("No suitable DDI driver found\n");
/* return FALSE; */
continue;
}
DPRINT("Display driver %S loaded\n", CurrentName);
DPRINT("Building DDI Functions\n");
/* Construct DDI driver function dispatch table */
if (!DRIVER_BuildDDIFunctions(&DED, &PrimarySurface.DriverFunctions))
{
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("BuildDDIFunctions failed\n");
return FALSE;
}
/* Allocate a phyical device handle from the driver */
if (SetupDevMode(&PrimarySurface.DMW, DisplayNumber))
{
PrimarySurface.PDev = PrimarySurface.DriverFunctions.EnablePDev(
&PrimarySurface.DMW,
L"",
HS_DDI_MAX,
PrimarySurface.FillPatterns,
sizeof(PrimarySurface.GDIInfo),
(ULONG *) &PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
DoDefault = (NULL == PrimarySurface.PDev);
if (DoDefault)
{
DPRINT1("DrvEnablePDev with registry parameters failed\n");
}
}
else else
{ {
/* Call DDI driver's EnableDriver function */ DoDefault = TRUE;
RtlZeroMemory(&DED, sizeof(DED)); }
if (! GDEnableDriver(DDI_DRIVER_VERSION, sizeof(DED), &DED))
{
DPRINT("DrvEnableDriver failed for %S\n", CurrentName);
}
else
{
GotDriver = TRUE;
}
}
if (! GotDriver)
{
/* Skip to the next name but never get past the Unicode string */
while (L'\0' != *CurrentName &&
CurrentName < DriverFileNames.Buffer + DriverFileNames.Length)
{
CurrentName++;
}
if (CurrentName < DriverFileNames.Buffer + DriverFileNames.Length)
{
CurrentName++;
}
}
}
RtlFreeUnicodeString(&DriverFileNames);
if (! GotDriver)
{
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("No suitable DDI driver found\n");
return FALSE;
}
DPRINT("Display driver %S loaded\n", CurrentName);
DPRINT("Building DDI Functions\n");
/* Construct DDI driver function dispatch table */
if (! DRIVER_BuildDDIFunctions(&DED, &PrimarySurface.DriverFunctions))
{
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("BuildDDIFunctions failed\n");
return FALSE;
}
/* Allocate a phyical device handle from the driver */
if (SetupDevMode(&PrimarySurface.DMW))
{
PrimarySurface.PDev =
PrimarySurface.DriverFunctions.EnablePDev(&PrimarySurface.DMW,
L"",
HS_DDI_MAX,
PrimarySurface.FillPatterns,
sizeof(PrimarySurface.GDIInfo),
(ULONG *) &PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
DoDefault = (NULL == PrimarySurface.PDev);
if (DoDefault) if (DoDefault)
{ {
DPRINT1("DrvEnablePDev with registry parameters failed\n"); RtlZeroMemory(&(PrimarySurface.DMW), sizeof(DEVMODEW));
} PrimarySurface.PDev = PrimarySurface.DriverFunctions.EnablePDev(
} &PrimarySurface.DMW,
else L"",
{ HS_DDI_MAX,
DoDefault = TRUE; PrimarySurface.FillPatterns,
} sizeof(PrimarySurface.GDIInfo),
(ULONG *) &PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
if (DoDefault) if (NULL == PrimarySurface.PDev)
{ {
RtlZeroMemory(&(PrimarySurface.DMW), sizeof(DEVMODEW)); ObDereferenceObject(PrimarySurface.VideoFileObject);
PrimarySurface.PDev = DPRINT1("DrvEnablePDEV with default parameters failed\n");
PrimarySurface.DriverFunctions.EnablePDev(&PrimarySurface.DMW, DPRINT1("Perhaps DDI driver doesn't match miniport driver?\n");
L"", /* return FALSE; */
HS_DDI_MAX, continue;
PrimarySurface.FillPatterns, }
sizeof(PrimarySurface.GDIInfo), }
(ULONG *) &PrimarySurface.GDIInfo,
sizeof(PrimarySurface.DevInfo),
&PrimarySurface.DevInfo,
NULL,
L"",
(HANDLE) (PrimarySurface.VideoFileObject->DeviceObject));
if (NULL == PrimarySurface.PDev) if (0 == PrimarySurface.GDIInfo.ulLogPixelsX)
{ {
ObDereferenceObject(PrimarySurface.VideoFileObject); DPRINT("Adjusting GDIInfo.ulLogPixelsX\n");
DPRINT1("DrvEnablePDEV with default parameters failed\n"); PrimarySurface.GDIInfo.ulLogPixelsX = 96;
DPRINT1("Perhaps DDI driver doesn't match miniport driver?\n"); }
return FALSE; if (0 == PrimarySurface.GDIInfo.ulLogPixelsY)
} {
} DPRINT("Adjusting GDIInfo.ulLogPixelsY\n");
PrimarySurface.GDIInfo.ulLogPixelsY = 96;
}
if (0 == PrimarySurface.GDIInfo.ulLogPixelsX) DPRINT("calling completePDev\n");
{
DPRINT("Adjusting GDIInfo.ulLogPixelsX\n");
PrimarySurface.GDIInfo.ulLogPixelsX = 96;
}
if (0 == PrimarySurface.GDIInfo.ulLogPixelsY)
{
DPRINT("Adjusting GDIInfo.ulLogPixelsY\n");
PrimarySurface.GDIInfo.ulLogPixelsY = 96;
}
DPRINT("calling completePDev\n"); /* Complete initialization of the physical device */
PrimarySurface.DriverFunctions.CompletePDev(
PrimarySurface.PDev,
&PrimarySurface);
/* Complete initialization of the physical device */ DPRINT("calling DRIVER_ReferenceDriver\n");
PrimarySurface.DriverFunctions.CompletePDev(PrimarySurface.PDev,
&PrimarySurface);
DPRINT("calling DRIVER_ReferenceDriver\n"); DRIVER_ReferenceDriver(L"DISPLAY");
DRIVER_ReferenceDriver(L"DISPLAY"); DPRINT("calling EnableSurface\n");
DPRINT("calling EnableSurface\n"); /* Enable the drawing surface */
PrimarySurface.Handle =
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.PDev);
if (NULL == PrimarySurface.Handle)
{
/* PrimarySurface.DriverFunctions.AssertMode(PrimarySurface.PDev, FALSE);*/
PrimarySurface.DriverFunctions.DisablePDev(PrimarySurface.PDev);
ObDereferenceObject(PrimarySurface.VideoFileObject);
DPRINT1("DrvEnableSurface failed\n");
/* return FALSE; */
continue;
}
/* Enable the drawing surface */ SurfObj = (PSURFOBJ)AccessUserObject((ULONG) PrimarySurface.Handle);
PrimarySurface.Handle = SurfObj->dhpdev = PrimarySurface.PDev;
PrimarySurface.DriverFunctions.EnableSurface(PrimarySurface.PDev); SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle);
if (NULL == PrimarySurface.Handle) IntShowDesktop(
{ IntGetActiveDesktop(),
ObDereferenceObject(PrimarySurface.VideoFileObject); SurfGDI->SurfObj.sizlBitmap.cx,
DPRINT1("DrvEnableSurface failed\n"); SurfGDI->SurfObj.sizlBitmap.cy);
return FALSE; break;
} }
SurfObj = (PSURFOBJ)AccessUserObject((ULONG) PrimarySurface.Handle); return TRUE;
SurfObj->dhpdev = PrimarySurface.PDev;
SurfGDI = (PSURFGDI)AccessInternalObject((ULONG) PrimarySurface.Handle);
IntShowDesktop(IntGetActiveDesktop(),
SurfGDI->SurfObj.sizlBitmap.cx,
SurfGDI->SurfObj.sizlBitmap.cy);
return TRUE;
} }
VOID FASTCALL VOID FASTCALL
@ -704,7 +727,10 @@ IntGdiCreateDC(PUNICODE_STRING Driver,
return NtGdiCreateCompatableDC(hDC); return NtGdiCreateCompatableDC(hDC);
} }
DPRINT("NAME: %S\n", Driver); // FIXME: Should not crash if NULL if (Driver != NULL && Driver->Buffer != NULL)
{
DPRINT("NAME: %S\n", Driver->Buffer); // FIXME: Should not crash if NULL
}
/* Allocate a DC object */ /* Allocate a DC object */
if ((hNewDC = DC_AllocDC(Driver)) == NULL) if ((hNewDC = DC_AllocDC(Driver)) == NULL)

View file

@ -1235,3 +1235,67 @@ STUB(FLOATOBJ_AddFloatObj)
STUB(FLOATOBJ_DivFloatObj) STUB(FLOATOBJ_DivFloatObj)
STUB(FLOATOBJ_MulFloatObj) STUB(FLOATOBJ_MulFloatObj)
STUB(FLOATOBJ_SubFloatObj) STUB(FLOATOBJ_SubFloatObj)
/*
* @unimplemented
*/
ULONG STDCALL
EngDitherColor(
IN HDEV hdev,
IN ULONG iMode,
IN ULONG rgb,
OUT ULONG *pul)
{
return DCR_SOLID;
}
/*
* @unimplemented
*/
BOOL STDCALL
EngQuerySystemAttribute(
IN ENG_SYSTEM_ATTRIBUTE CapNum,
OUT PDWORD pCapability)
{
switch (CapNum)
{
case EngNumberOfProcessors:
*pCapability = 1;
return TRUE;
case EngProcessorFeature:
*pCapability = 0;
return TRUE;
default:
break;
}
return FALSE;
}
/*
* @unimplemented
*/
FLATPTR STDCALL
HeapVidMemAllocAligned(
IN VIDEOMEMORY *lpVidMem,
IN DWORD dwWidth,
IN DWORD dwHeight,
IN /*LPSURFACEALIGNMENT*/LPVOID lpAlignment,
OUT LPLONG lpNewPitch)
{
UNIMPLEMENTED;
return 0;
}
/*
* @unimplemented
*/
VOID STDCALL
VidMemFree(
IN LPVMEMHEAP pvmh,
IN FLATPTR ptr)
{
UNIMPLEMENTED;
}

View file

@ -1,4 +1,4 @@
; $Id: win32k.def,v 1.24 2004/02/11 19:26:51 weiden Exp $ ; $Id: win32k.def,v 1.25 2004/03/06 01:22:04 navaraf Exp $
; ;
; win32k.def ; win32k.def
; ;
@ -41,6 +41,7 @@ EngDeleteSemaphore@4
EngDeleteSurface@4 EngDeleteSurface@4
EngDeleteWnd@4 EngDeleteWnd@4
EngDeviceIoControl@28 EngDeviceIoControl@28
EngDitherColor@16
EngEnumForms@24 EngEnumForms@24
EngEraseSurface@12 EngEraseSurface@12
EngFillPath@28 EngFillPath@28
@ -73,6 +74,7 @@ EngMapEvent@20
EngMapFontFile@12 EngMapFontFile@12
EngMapModule@8 EngMapModule@8
EngMarkBandingSurface@4 EngMarkBandingSurface@4
EngModifySurface@32
EngMovePointer@16 EngMovePointer@16
EngMulDiv@12 EngMulDiv@12
EngMultiByteToUnicodeN@20 EngMultiByteToUnicodeN@20
@ -84,6 +86,7 @@ EngQueryLocalTime@4
EngQueryPalette@16 EngQueryPalette@16
EngQueryPerformanceCounter@4 EngQueryPerformanceCounter@4
EngQueryPerformanceFrequency@4 EngQueryPerformanceFrequency@4
EngQuerySystemAttribute@8
EngReleaseSemaphore@4 EngReleaseSemaphore@4
EngRestoreFloatingPointState@4 EngRestoreFloatingPointState@4
EngSaveFloatingPointState@8 EngSaveFloatingPointState@8
@ -142,6 +145,7 @@ FONTOBJ_pifi@4
FONTOBJ_pvTrueTypeFontFile@8 FONTOBJ_pvTrueTypeFontFile@8
FONTOBJ_pxoGetXform@4 FONTOBJ_pxoGetXform@4
FONTOBJ_vGetInfo@12 FONTOBJ_vGetInfo@12
HeapVidMemAllocAligned@20
HT_ComputeRGBGammaTable@24 HT_ComputeRGBGammaTable@24
HT_Get8BPPFormatPalette HT_Get8BPPFormatPalette
PALOBJ_cGetColors@16 PALOBJ_cGetColors@16
@ -165,6 +169,7 @@ RtlUpcaseUnicodeToMultiByteN@20
STROBJ_bEnum@12 STROBJ_bEnum@12
STROBJ_dwGetCodePage@4 STROBJ_dwGetCodePage@4
STROBJ_vEnumStart@4 STROBJ_vEnumStart@4
VidMemFree@8
Win32kInitialize@0 Win32kInitialize@0
WNDOBJ_bEnum@12 WNDOBJ_bEnum@12
WNDOBJ_cEnumStart@16 WNDOBJ_cEnumStart@16

View file

@ -1,4 +1,4 @@
; $Id: win32k.edf,v 1.20 2004/02/11 19:26:51 weiden Exp $ ; $Id: win32k.edf,v 1.21 2004/03/06 01:22:04 navaraf Exp $
; ;
; win32k.def ; win32k.def
; ;
@ -41,6 +41,7 @@ EngDeleteSemaphore=EngDeleteSemaphore@4
EngDeleteSurface=EngDeleteSurface@4 EngDeleteSurface=EngDeleteSurface@4
EngDeleteWnd=EngDeleteWnd@4 EngDeleteWnd=EngDeleteWnd@4
EngDeviceIoControl=EngDeviceIoControl@28 EngDeviceIoControl=EngDeviceIoControl@28
EngDitherColor=EngDitherColor@16
EngEnumForms=EngEnumForms@24 EngEnumForms=EngEnumForms@24
EngEraseSurface=EngEraseSurface@12 EngEraseSurface=EngEraseSurface@12
EngFillPath=EngFillPath@28 EngFillPath=EngFillPath@28
@ -73,6 +74,7 @@ EngMapEvent=EngMapEvent@20
EngMapFontFile=EngMapFontFile@12 EngMapFontFile=EngMapFontFile@12
EngMapModule=EngMapModule@8 EngMapModule=EngMapModule@8
EngMarkBandingSurface=EngMarkBandingSurface@4 EngMarkBandingSurface=EngMarkBandingSurface@4
EngModifySurface=EngModifySurface@32
EngMovePointer=EngMovePointer@16 EngMovePointer=EngMovePointer@16
EngMulDiv=EngMulDiv@12 EngMulDiv=EngMulDiv@12
EngMultiByteToUnicodeN=EngMultiByteToUnicodeN@20 EngMultiByteToUnicodeN=EngMultiByteToUnicodeN@20
@ -84,6 +86,7 @@ EngQueryLocalTime=EngQueryLocalTime@4
EngQueryPalette=EngQueryPalette@16 EngQueryPalette=EngQueryPalette@16
EngQueryPerformanceCounter=EngQueryPerformanceCounter@4 EngQueryPerformanceCounter=EngQueryPerformanceCounter@4
EngQueryPerformanceFrequency=EngQueryPerformanceFrequency@4 EngQueryPerformanceFrequency=EngQueryPerformanceFrequency@4
EngQuerySystemAttribute=EngQuerySystemAttribute@8
EngReleaseSemaphore=EngReleaseSemaphore@4 EngReleaseSemaphore=EngReleaseSemaphore@4
EngRestoreFloatingPointState=EngRestoreFloatingPointState@4 EngRestoreFloatingPointState=EngRestoreFloatingPointState@4
EngSaveFloatingPointState=EngSaveFloatingPointState@8 EngSaveFloatingPointState=EngSaveFloatingPointState@8
@ -143,6 +146,7 @@ FONTOBJ_pifi=FONTOBJ_pifi@4
FONTOBJ_pvTrueTypeFontFile=FONTOBJ_pvTrueTypeFontFile@8 FONTOBJ_pvTrueTypeFontFile=FONTOBJ_pvTrueTypeFontFile@8
FONTOBJ_pxoGetXform=FONTOBJ_pxoGetXform@4 FONTOBJ_pxoGetXform=FONTOBJ_pxoGetXform@4
FONTOBJ_vGetInfo=FONTOBJ_vGetInfo@12 FONTOBJ_vGetInfo=FONTOBJ_vGetInfo@12
HeapVidMemAllocAligned=HeapVidMemAllocAligned@20
HT_ComputeRGBGammaTable=HT_ComputeRGBGammaTable@24 HT_ComputeRGBGammaTable=HT_ComputeRGBGammaTable@24
HT_Get8BPPFormatPalette=HT_Get8BPPFormatPalette@16 HT_Get8BPPFormatPalette=HT_Get8BPPFormatPalette@16
PALOBJ_cGetColors=PALOBJ_cGetColors@16 PALOBJ_cGetColors=PALOBJ_cGetColors@16
@ -166,6 +170,7 @@ RtlUpcaseUnicodeToMultiByteN=NTOSKRNL.RtlUpcaseUnicodeToMultiByteN
STROBJ_bEnum=STROBJ_bEnum@12 STROBJ_bEnum=STROBJ_bEnum@12
STROBJ_dwGetCodePage=STROBJ_dwGetCodePage@4 STROBJ_dwGetCodePage=STROBJ_dwGetCodePage@4
STROBJ_vEnumStart=STROBJ_vEnumStart@4 STROBJ_vEnumStart=STROBJ_vEnumStart@4
VidMemFree=VidMemFree@8
Win32kInitialize=Win32kInitialize@0 Win32kInitialize=Win32kInitialize@0
WNDOBJ_bEnum=WNDOBJ_bEnum@12 WNDOBJ_bEnum=WNDOBJ_bEnum@12
WNDOBJ_cEnumStart=WNDOBJ_cEnumStart@16 WNDOBJ_cEnumStart=WNDOBJ_cEnumStart@16