Changeset 23255 in vbox
- Timestamp:
- Sep 23, 2009 12:38:37 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Miniport
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxHGSMI.h
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
r22848 r23255 90 90 typedef void (*PFNFREEPOOL) (void* HwDeviceExtension, void* Ptr); 91 91 92 typedef unsigned char (*PFNQUEUEDPC) (void* HwDeviceExtension, void (*CallbackRoutine)(void* HwDeviceExtension, void *Context), void *Context); 93 92 94 /* pfn*SpinLock* functions are available */ 93 95 #define VBOXVIDEOPORTPROCS_SPINLOCK 0x00000001 … … 96 98 /* pfn*Pool functions are available */ 97 99 #define VBOXVIDEOPORTPROCS_POOL 0x00000004 100 /* pfnQueueDpc function is available */ 101 #define VBOXVIDEOPORTPROCS_DPC 0x00000008 98 102 99 103 typedef struct VBOXVIDEOPORTPROCS … … 118 122 PFNALLOCATEPOOL pfnAllocatePool; 119 123 PFNFREEPOOL pfnFreePool; 124 125 PFNQUEUEDPC pfnQueueDpc; 120 126 } VBOXVIDEOPORTPROCS; 121 127 -
Property svn:eol-style
set to
-
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideo.cpp
r23221 r23255 86 86 { 87 87 case WINNT4: 88 dprintf(("VBoxVideo::DriverEntry: WINNT4\n")); 88 89 InitData.HwInitDataSize = SIZE_OF_NT4_VIDEO_HW_INITIALIZATION_DATA; 89 90 break; 90 91 case WIN2K: 92 dprintf(("VBoxVideo::DriverEntry: WIN2K\n")); 91 93 InitData.HwInitDataSize = SIZE_OF_W2K_VIDEO_HW_INITIALIZATION_DATA; 92 94 break; … … 1211 1213 1212 1214 VIDEO_ACCESS_RANGE tmpRanges[4]; 1213 ULONG slot ;1215 ULONG slot = 0; 1214 1216 1215 1217 VideoPortZeroMemory(tmpRanges, sizeof(tmpRanges)); 1216 1218 1217 1219 /* need to call VideoPortGetAccessRanges to ensure interrupt info in ConfigInfo gets set up */ 1218 VP_STATUS status = VideoPortGetAccessRanges(HwDeviceExtension, 1219 0, 1220 NULL, 1221 sizeof (tmpRanges)/sizeof (tmpRanges[0]), 1222 tmpRanges, 1223 NULL, 1224 NULL, 1225 (PULONG) &slot); 1220 VP_STATUS status; 1221 if (vboxQueryWinVersion() == WINNT4) 1222 { 1223 /* NT crashes if either of 'vendorId, 'deviceId' or 'slot' parameters is NULL, 1224 * and needs PCI ids for a successful VideoPortGetAccessRanges call. 1225 */ 1226 ULONG vendorId = 0x80EE; 1227 ULONG deviceId = 0xBEEF; 1228 status = VideoPortGetAccessRanges(HwDeviceExtension, 1229 0, 1230 NULL, 1231 sizeof (tmpRanges)/sizeof (tmpRanges[0]), 1232 tmpRanges, 1233 &vendorId, 1234 &deviceId, 1235 &slot); 1236 } 1237 else 1238 { 1239 status = VideoPortGetAccessRanges(HwDeviceExtension, 1240 0, 1241 NULL, 1242 sizeof (tmpRanges)/sizeof (tmpRanges[0]), 1243 tmpRanges, 1244 NULL, 1245 NULL, 1246 &slot); 1247 } 1248 dprintf(("VBoxVideo::VBoxVideoFindAdapter: VideoPortGetAccessRanges status 0x%x\n", status)); 1226 1249 if (status == NO_ERROR) 1227 1250 { … … 1358 1381 { 1359 1382 /* schedule a DPC*/ 1360 BOOLEAN bResult = VideoPortQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, (PVOID)1);1383 BOOLEAN bResult = PrimaryExtension->u.primary.VideoPortProcs.pfnQueueDpc(PrimaryExtension, VBoxVideoHGSMIDpc, (PVOID)1); 1361 1384 Assert(bResult); 1362 1385 } -
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/VBoxVideoHGSMI.cpp
r22920 r23255 470 470 } 471 471 472 BOOLEAN vboxQueueDpcVoid(IN PVOID HwDeviceExtension, IN PMINIPORT_DPC_ROUTINE CallbackRoutine, IN PVOID Context) 473 { 474 return FALSE; 475 } 476 472 477 void VBoxSetupVideoPortFunctions(PDEVICE_EXTENSION PrimaryExtension, VBOXVIDEOPORTPROCS *pCallbacks, PVIDEO_PORT_CONFIG_INFO pConfigInfo) 473 478 { … … 477 482 { 478 483 /* VideoPortGetProcAddress is available for >= win2k */ 484 pCallbacks->pfnWaitForSingleObject = vboxWaitForSingleObjectVoid; 485 pCallbacks->pfnSetEvent = vboxSetEventVoid; 486 pCallbacks->pfnClearEvent = vboxClearEventVoid; 487 pCallbacks->pfnCreateEvent = vboxCreateEventVoid; 488 pCallbacks->pfnDeleteEvent = vboxDeleteEventVoid; 489 pCallbacks->pfnCreateSpinLock = vboxCreateSpinLockVoid; 490 pCallbacks->pfnDeleteSpinLock = vboxDeleteSpinLockVoid; 491 pCallbacks->pfnAcquireSpinLock = vboxAcquireSpinLockVoid; 492 pCallbacks->pfnReleaseSpinLock = vboxReleaseSpinLockVoid; 493 pCallbacks->pfnAcquireSpinLockAtDpcLevel = vboxAcquireSpinLockAtDpcLevelVoid; 494 pCallbacks->pfnReleaseSpinLockFromDpcLevel = vboxReleaseSpinLockFromDpcLevelVoid; 495 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid; 496 pCallbacks->pfnFreePool = vboxFreePoolVoid; 497 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid; 479 498 return; 480 499 } … … 590 609 pCallbacks->pfnAllocatePool = vboxAllocatePoolVoid; 591 610 pCallbacks->pfnFreePool = vboxFreePoolVoid; 611 } 612 613 pCallbacks->pfnQueueDpc = (PFNQUEUEDPC)(pConfigInfo->VideoPortGetProcAddress) 614 (PrimaryExtension, 615 (PUCHAR)"VideoPortQueueDpc"); 616 Assert(pCallbacks->pfnQueueDpc); 617 618 if(pCallbacks->pfnQueueDpc) 619 { 620 pCallbacks->fSupportedTypes |= VBOXVIDEOPORTPROCS_DPC; 621 } 622 else 623 { 624 pCallbacks->pfnQueueDpc = vboxQueueDpcVoid; 592 625 } 593 626
Note:
See TracChangeset
for help on using the changeset viewer.