mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
Patches to allow Windows PCI Bus Driver to start working somewhat (need to implement HalAdjustResourceList for PCI to make it go further):
[BOOTDATA]: Windows Bus Drivers/HAL/Kernel require Arbiter data in the registry placed by the installer, otherwise they will not load. Add this Arbiter data. [NTOS]: Add support for KeyValueFullInformationAlign64, used by some Windows drivers (as a bonus, support Win64). PartialInformationAlign64 is a different beast -- warn when a driver attempts to use it, instead of silent failure. [NTOS]: Export VfFailSystemBIOS and stub it. [NTOS]: Warn when a driver fails to load due to a missing dependency and print the name and/or missing module, instead of silently failing. [NTOS]: Due to a bug in the ReactOS PnP manager, Windows PCI Driver hits an internal pseudo-assert. Hack KeBugCheckEx to ignore this pseudo-assert and continue executing normally. svn path=/trunk/; revision=48839
This commit is contained in:
parent
12d05b7eb8
commit
88e1640ef7
7 changed files with 144 additions and 13 deletions
|
@ -7,6 +7,98 @@ HKLM,"SYSTEM\CurrentControlSet\Control","CurrentUser",2,"USERNAME"
|
||||||
HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000"
|
HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000"
|
||||||
HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf"
|
HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf"
|
||||||
HKLM,"SYSTEM\CurrentControlSet\Control\PnP",,0x00000012
|
HKLM,"SYSTEM\CurrentControlSet\Control\PnP",,0x00000012
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters",,0x00000012
|
||||||
|
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\AllocationOrder","Root",0x000a0001,\
|
||||||
|
a8,04,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,01,00,00,00,01,00,01,00,24,00,00,00,00,01,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,05,00,00,00,00,00,00,ff,ff,00,00,00,00,00,\
|
||||||
|
00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,40,01,00,00,00,00,00,00,\
|
||||||
|
7f,01,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
02,00,00,00,00,00,00,ff,02,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,03,00,00,00,00,00,00,6f,03,00,00,00,00,00,00,08,01,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,78,03,00,00,00,00,00,00,7a,03,00,00,\
|
||||||
|
00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,e8,02,00,00,00,\
|
||||||
|
00,00,00,ff,02,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,f0,01,00,00,00,00,00,00,f8,01,00,00,00,00,00,00,08,01,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,b0,03,00,00,00,00,00,00,cf,03,00,00,00,00,00,00,\
|
||||||
|
08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,e8,03,00,00,00,00,00,00,ff,\
|
||||||
|
03,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,ce,01,\
|
||||||
|
00,00,00,00,00,00,cf,01,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,01,00,00,00,00,00,00,ff,03,00,00,00,00,00,00,08,02,00,00,\
|
||||||
|
00,00,00,00,09,00,00,00,09,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,08,02,00,00,00,00,00,00,08,00,00,00,08,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,07,00,00,00,07,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,\
|
||||||
|
0b,00,00,00,0b,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,\
|
||||||
|
02,00,00,00,00,00,00,0a,00,00,00,0a,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,08,02,00,00,00,00,00,00,02,00,00,00,02,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,02,00,00,00,00,00,00,03,00,00,00,\
|
||||||
|
03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,\
|
||||||
|
00,00,00,05,00,00,00,05,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,08,02,00,00,00,00,00,00,04,00,00,00,04,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,0f,00,00,00,0f,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,0d,\
|
||||||
|
00,00,00,0d,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,02,\
|
||||||
|
00,00,00,00,00,00,0e,00,00,00,0e,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,08,02,00,00,00,00,00,00,06,00,00,00,06,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,0c,00,00,00,0c,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,02,00,00,00,00,\
|
||||||
|
00,00,01,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,08,02,00,00,00,00,00,00,00,00,ff,ff,fe,ff,ff,ff,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,08,02,00,00,00,00,00,00,10,00,00,00,ff,ff,fe,ff,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,10,00,00,00,00,00,ff,ff,ff,ff,ff,ff,ff,ff,08,03,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0f,00,00,00,00,00,ff,ff,0f,00,\
|
||||||
|
00,00,00,00,08,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,00,00,\
|
||||||
|
00,00,00,ff,ff,0b,00,00,00,00,00,08,03,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,08,00,00,00,00,00,ff,ff,0f,00,00,00,00,00,08,03,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,08,00,00,00,00,00,ff,ff,bf,ff,00,00,00,00,\
|
||||||
|
00,04,00,00,00,00,00,00,06,00,00,00,0f,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,08,04,00,00,00,00,00,00,03,00,00,00,04,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,04,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,0f,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
|
||||||
|
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\AllocationOrder","Pci",0x000a0001,\
|
||||||
|
48,02,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,01,00,00,00,01,00,01,00,11,00,00,00,00,01,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,ff,ff,ff,ff,00,00,00,00,\
|
||||||
|
08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,05,00,00,00,00,00,00,ff,\
|
||||||
|
ff,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,40,01,\
|
||||||
|
00,00,00,00,00,00,7f,01,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,02,00,00,00,00,00,00,ff,02,00,00,00,00,00,00,08,01,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,03,00,00,00,00,00,00,6f,03,00,00,00,\
|
||||||
|
00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,78,03,00,00,00,00,\
|
||||||
|
00,00,7a,03,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,e8,02,00,00,00,00,00,00,ff,02,00,00,00,00,00,00,08,01,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,f0,01,00,00,00,00,00,00,f8,01,00,00,00,00,00,00,08,\
|
||||||
|
01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,b0,03,00,00,00,00,00,00,cf,03,\
|
||||||
|
00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,e8,03,00,\
|
||||||
|
00,00,00,00,00,ff,03,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,ce,01,00,00,00,00,00,00,cf,01,00,00,00,00,00,00,08,01,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,01,00,00,00,00,00,00,ff,03,00,00,00,00,\
|
||||||
|
00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,10,00,00,00,00,\
|
||||||
|
00,ff,ff,ff,ff,ff,ff,ff,ff,08,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,0f,00,00,00,00,00,ff,ff,0f,00,00,00,00,00,08,03,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,08,00,00,00,00,00,ff,ff,0b,00,00,00,00,00,08,03,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,00,00,00,00,00,ff,ff,0f,\
|
||||||
|
00,00,00,00,00,08,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,08,00,\
|
||||||
|
00,00,00,00,ff,ff,bf,ff,00,00,00,00
|
||||||
|
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\ReservedResources","Pci",0x00000002, "PCStandard"
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\ReservedResources","Root",0x00000002, "PCStandard"
|
||||||
|
HKLM,"SYSTEM\CurrentControlSet\Control\Arbiters\ReservedResources","PCStandard",0x000a0001,\
|
||||||
|
08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,01,00,00,00,01,00,01,00,07,00,00,00,00,01,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,00,00,00,00,f8,02,00,00,00,00,00,00,ff,02,00,00,00,\
|
||||||
|
00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,b0,03,00,00,00,00,\
|
||||||
|
00,00,bb,03,00,00,00,00,00,00,08,01,00,00,00,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,bc,03,00,00,00,00,00,00,be,03,00,00,00,00,00,00,08,01,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,00,00,c0,03,00,00,00,00,00,00,df,03,00,00,00,00,00,00,08,\
|
||||||
|
01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,f8,03,00,00,00,00,00,00,ff,03,\
|
||||||
|
00,00,00,00,00,00,00,03,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0a,\
|
||||||
|
00,00,00,00,00,ff,ff,0b,00,00,00,00,00,08,03,00,00,00,00,00,00,00,00,00,00,\
|
||||||
|
00,00,00,00,00,00,f0,ff,00,00,00,00,ff,ff,ff,ff,00,00,00,00
|
||||||
|
|
||||||
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","NtfsDisable8dot3NameCreation",0x00010003,0
|
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","NtfsDisable8dot3NameCreation",0x00010003,0
|
||||||
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win31FileSystem",0x00010001,0
|
HKLM,"SYSTEM\CurrentControlSet\Control\FileSystem","Win31FileSystem",0x00010001,0
|
||||||
|
|
|
@ -9773,7 +9773,7 @@ KeInitializeSpinLock(IN PKSPIN_LOCK SpinLock)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
NTKERNELAPI
|
NTKERNELAPI
|
||||||
DECLSPEC_NORETURN
|
//DECLSPEC_NORETURN
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
KeBugCheckEx(
|
KeBugCheckEx(
|
||||||
|
|
|
@ -428,6 +428,7 @@ CmpQueryKeyValueData(IN PCM_KEY_CONTROL_BLOCK Kcb,
|
||||||
|
|
||||||
/* Full key information */
|
/* Full key information */
|
||||||
case KeyValueFullInformation:
|
case KeyValueFullInformation:
|
||||||
|
case KeyValueFullInformationAlign64:
|
||||||
|
|
||||||
/* Check if this is a small key and compute key size */
|
/* Check if this is a small key and compute key size */
|
||||||
IsSmall = CmpIsKeyValueSmall(&KeySize,
|
IsSmall = CmpIsKeyValueSmall(&KeySize,
|
||||||
|
@ -447,9 +448,20 @@ CmpQueryKeyValueData(IN PCM_KEY_CONTROL_BLOCK Kcb,
|
||||||
/* Calculate the data offset */
|
/* Calculate the data offset */
|
||||||
DataOffset = Size - KeySize;
|
DataOffset = Size - KeySize;
|
||||||
|
|
||||||
/* Align the offset to 4 bytes */
|
#ifdef _WIN64
|
||||||
AlignedData = ALIGN_UP(DataOffset, ULONG);
|
/* On 64-bit, always align to 8 bytes */
|
||||||
|
AlignedData = ALIGN_UP(DataOffset, ULONGLONG);
|
||||||
|
#else
|
||||||
|
/* On 32-bit, align the offset to 4 or 8 bytes */
|
||||||
|
if (KeyValueInformationClass == KeyValueFullInformationAlign64)
|
||||||
|
{
|
||||||
|
AlignedData = ALIGN_UP(DataOffset, ULONGLONG);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AlignedData = ALIGN_UP(DataOffset, ULONG);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* If alignment was required, we'll need more space */
|
/* If alignment was required, we'll need more space */
|
||||||
if (AlignedData > DataOffset) Size += (AlignedData-DataOffset);
|
if (AlignedData > DataOffset) Size += (AlignedData-DataOffset);
|
||||||
}
|
}
|
||||||
|
@ -656,6 +668,7 @@ CmpQueryKeyValueData(IN PCM_KEY_CONTROL_BLOCK Kcb,
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/* We got some class that we don't support */
|
/* We got some class that we don't support */
|
||||||
|
DPRINT1("Caller requested unknown class: %lx\n", KeyValueInformationClass);
|
||||||
*Status = STATUS_INVALID_PARAMETER;
|
*Status = STATUS_INVALID_PARAMETER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1430,13 +1430,18 @@ KeBugCheckEx(IN ULONG BugCheckCode,
|
||||||
IN ULONG_PTR BugCheckParameter3,
|
IN ULONG_PTR BugCheckParameter3,
|
||||||
IN ULONG_PTR BugCheckParameter4)
|
IN ULONG_PTR BugCheckParameter4)
|
||||||
{
|
{
|
||||||
/* Call the internal API */
|
/* Workaround for Windows Server 2003 Checked PCI Driver issue */
|
||||||
KeBugCheckWithTf(BugCheckCode,
|
if (!(BugCheckCode == PCI_BUS_DRIVER_INTERNAL) &&
|
||||||
BugCheckParameter1,
|
(BugCheckParameter1 == 0xDEAD0010))
|
||||||
BugCheckParameter2,
|
{
|
||||||
BugCheckParameter3,
|
/* Call the internal API */
|
||||||
BugCheckParameter4,
|
KeBugCheckWithTf(BugCheckCode,
|
||||||
NULL);
|
BugCheckParameter1,
|
||||||
|
BugCheckParameter2,
|
||||||
|
BugCheckParameter3,
|
||||||
|
BugCheckParameter4,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -746,7 +746,11 @@ MiSnapThunk(IN PVOID DllBase,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we couldn't find it */
|
/* Check if we couldn't find it */
|
||||||
if (High < Low) return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND;
|
if (High < Low)
|
||||||
|
{
|
||||||
|
DPRINT1("Warning: Driver failed to load, %s not found\n", NameImport->Name);
|
||||||
|
return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
/* Otherwise, this is the ordinal */
|
/* Otherwise, this is the ordinal */
|
||||||
Ordinal = OrdinalTable[Mid];
|
Ordinal = OrdinalTable[Mid];
|
||||||
|
@ -1237,6 +1241,7 @@ CheckDllState:
|
||||||
/* Cleanup and return */
|
/* Cleanup and return */
|
||||||
MiDereferenceImports(LoadedImports);
|
MiDereferenceImports(LoadedImports);
|
||||||
if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR);
|
if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR);
|
||||||
|
DPRINT1("Warning: Driver failed to load, %S not found\n", *MissingDriver);
|
||||||
return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND;
|
return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1399,7 +1399,7 @@
|
||||||
@ stdcall VerSetConditionMask(long long long long)
|
@ stdcall VerSetConditionMask(long long long long)
|
||||||
@ cdecl VfFailDeviceNode(ptr long long long ptr ptr ptr)
|
@ cdecl VfFailDeviceNode(ptr long long long ptr ptr ptr)
|
||||||
;VfFailDriver
|
;VfFailDriver
|
||||||
;VfFailSystemBIOS
|
@ cdecl VfFailSystemBIOS(long long long ptr ptr ptr)
|
||||||
@ stdcall VfIsVerificationEnabled(long ptr)
|
@ stdcall VfIsVerificationEnabled(long ptr)
|
||||||
#ifndef __x86_64__
|
#ifndef __x86_64__
|
||||||
@ stdcall WRITE_REGISTER_BUFFER_UCHAR(ptr ptr long)
|
@ stdcall WRITE_REGISTER_BUFFER_UCHAR(ptr ptr long)
|
||||||
|
|
|
@ -43,4 +43,20 @@ VfFailDeviceNode(IN PDEVICE_OBJECT PhysicalDeviceObject,
|
||||||
UNIMPLEMENTED;
|
UNIMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @unimplemented
|
||||||
|
*/
|
||||||
|
VOID
|
||||||
|
NTAPI
|
||||||
|
VfFailSystemBIOS(IN ULONG BugCheckMajorCode,
|
||||||
|
IN ULONG BugCheckMinorCode,
|
||||||
|
IN VF_FAILURE_CLASS FailureClass,
|
||||||
|
IN OUT PULONG AssertionControl,
|
||||||
|
IN PSTR DebuggerMessageText,
|
||||||
|
IN PSTR ParameterFormatString,
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
UNIMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue