mirror of
https://github.com/reactos/reactos
synced 2025-10-06 00:12:51 +02:00
[HACKS] The hack list is as follows:
- Disable Winlogon notification support - Ignore the PNP_FATAL bugcheck for devices with multiple video out - Return an error code instead of bugcheck on floating point bug - Ignore some asserts - Intel GPU Driver hacks - Ignore IOConflict
This commit is contained in:
@@ -312,77 +312,7 @@ CallNotificationDll(
|
||||
NOTIFICATION_TYPE Type,
|
||||
PWLX_NOTIFICATION_INFO pInfo)
|
||||
{
|
||||
HMODULE hModule;
|
||||
CHAR szFuncBuffer[128];
|
||||
DWORD dwError = ERROR_SUCCESS;
|
||||
PWLX_NOTIFY_HANDLER pNotifyHandler;
|
||||
|
||||
if (NotificationDll->bSfcNotification)
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case LogonHandler:
|
||||
strcpy(szFuncBuffer, "SfcWLEventLogon");
|
||||
break;
|
||||
|
||||
case LogoffHandler:
|
||||
strcpy(szFuncBuffer, "SfcWLEventLogoff");
|
||||
break;
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HKEY hDllKey;
|
||||
DWORD dwSize;
|
||||
DWORD dwType;
|
||||
|
||||
dwError = RegOpenKeyExW(hNotifyKey,
|
||||
NotificationDll->pszKeyName,
|
||||
0,
|
||||
KEY_READ,
|
||||
&hDllKey);
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
{
|
||||
TRACE("RegOpenKeyExW()\n");
|
||||
return;
|
||||
}
|
||||
|
||||
dwSize = sizeof(szFuncBuffer);
|
||||
dwError = RegQueryValueExA(hDllKey,
|
||||
FuncNames[Type],
|
||||
NULL,
|
||||
&dwType,
|
||||
(PBYTE)szFuncBuffer,
|
||||
&dwSize);
|
||||
|
||||
RegCloseKey(hDllKey);
|
||||
}
|
||||
|
||||
if (dwError != ERROR_SUCCESS)
|
||||
return;
|
||||
|
||||
hModule = LoadLibraryW(NotificationDll->pszDllName);
|
||||
if (!hModule)
|
||||
return;
|
||||
|
||||
pNotifyHandler = (PWLX_NOTIFY_HANDLER)GetProcAddress(hModule, szFuncBuffer);
|
||||
|
||||
_SEH2_TRY
|
||||
{
|
||||
if (pNotifyHandler)
|
||||
pNotifyHandler(pInfo);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
ERR("WL: Exception while running notification %S!%s, Status 0x%08lx\n",
|
||||
NotificationDll->pszDllName, szFuncBuffer, _SEH2_GetExceptionCode());
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
FreeLibrary(hModule);
|
||||
UNREFERENCED_PARAMETER(FuncNames);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -545,7 +545,7 @@ USBSTOR_HandleExecuteSCSI(
|
||||
PSCSI_REQUEST_BLOCK Request;
|
||||
PPDO_DEVICE_EXTENSION PDODeviceExtension = (PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
|
||||
|
||||
// ASSERT(PDODeviceExtension->Common.IsFDO == FALSE);
|
||||
// ASSERT(PDODeviceExtension->Common.IsFDO == FALSE);
|
||||
|
||||
IoStack = IoGetCurrentIrpStackLocation(Irp);
|
||||
Request = IoStack->Parameters.Scsi.Srb;
|
||||
|
@@ -1224,11 +1224,6 @@ PiInitializeDevNode(
|
||||
DPRINT1("Current instance parent: '%wZ'\n", &DeviceNode->Parent->InstancePath);
|
||||
DPRINT1("Old instance parent: '%wZ'\n", &OldDeviceNode->Parent->InstancePath);
|
||||
|
||||
KeBugCheckEx(PNP_DETECTED_FATAL_ERROR,
|
||||
0x01,
|
||||
(ULONG_PTR)DeviceNode->PhysicalDeviceObject,
|
||||
(ULONG_PTR)OldDeviceObject,
|
||||
0);
|
||||
}
|
||||
|
||||
DeviceNode->InstancePath = InstancePathU;
|
||||
|
@@ -1509,15 +1509,8 @@ KeRestoreFloatingPointState(
|
||||
*/
|
||||
if (FsContext->CurrentThread != KeGetCurrentThread())
|
||||
{
|
||||
/*
|
||||
* This isn't the thread that saved the
|
||||
* FPU state context, crash the system!
|
||||
*/
|
||||
KeBugCheckEx(INVALID_FLOATING_POINT_STATE,
|
||||
0x2,
|
||||
(ULONG_PTR)FsContext->CurrentThread,
|
||||
(ULONG_PTR)KeGetCurrentThread(),
|
||||
0);
|
||||
//HACK: return invalid param instead of bugcheck for AMD GPUs
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/* Are we under the same NPX interrupt level? */
|
||||
|
@@ -350,7 +350,8 @@ MiUnmapLockedPagesInUserSpace(
|
||||
|
||||
if (MiDecrementPageTableReferences(BaseAddress) == 0)
|
||||
{
|
||||
ASSERT(MiIsPteOnPdeBoundary(PointerPte + 1) || (NumberOfPages == 1));
|
||||
// HACK: Disabled for AMD GPU OpenGL application exit!
|
||||
// ASSERT(MiIsPteOnPdeBoundary(PointerPte + 1) || (NumberOfPages == 1));
|
||||
MiDeletePde(PointerPde, Process);
|
||||
}
|
||||
|
||||
|
@@ -248,6 +248,9 @@ MiReserveSystemPtes(IN ULONG NumberOfPtes,
|
||||
{
|
||||
PMMPTE PointerPte;
|
||||
|
||||
if (NumberOfPtes > 32768)
|
||||
return NULL;
|
||||
|
||||
//
|
||||
// Use the extended function
|
||||
//
|
||||
|
@@ -773,8 +773,8 @@ RtlLeaveCriticalSection(PRTL_CRITICAL_SECTION CriticalSection)
|
||||
*/
|
||||
if (Thread != CriticalSection->OwningThread)
|
||||
{
|
||||
DPRINT1("Releasing critical section not owned!\n");
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
DPRINT1("Releasing critical section not owned!\n");
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -995,7 +995,7 @@ VideoPortVerifyAccessRanges(
|
||||
ExFreePoolWithTag(ResourceList, TAG_VIDEO_PORT);
|
||||
|
||||
if (!NT_SUCCESS(Status) || ConflictDetected)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
return NO_ERROR;
|
||||
else
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
@@ -1469,6 +1469,7 @@ VideoPortCreateSecondaryDisplay(
|
||||
IN OUT PVOID *SecondaryDeviceExtension,
|
||||
IN ULONG Flag)
|
||||
{
|
||||
return ERROR_DEV_NOT_EXIST;
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
PVIDEO_PORT_DEVICE_EXTENSION FirstDeviceExtension, DeviceExtension;
|
||||
NTSTATUS Status;
|
||||
|
@@ -502,12 +502,6 @@ UserEnumDisplaySettings(
|
||||
return STATUS_INVALID_PARAMETER_1;
|
||||
}
|
||||
|
||||
/* let's politely ask the driver for an updated mode list,
|
||||
just in case there's something new in there (vbox) */
|
||||
|
||||
PDEVOBJ_vRefreshModeList(ppdev);
|
||||
PDEVOBJ_vRelease(ppdev);
|
||||
|
||||
iFoundMode = 0;
|
||||
for (i = 0; i < pGraphicsDevice->cDevModes; i++)
|
||||
{
|
||||
|
Reference in New Issue
Block a user