Author: sir_richard
Date: Tue Sep 21 05:34:05 2010
New Revision: 48839
URL:
http://svn.reactos.org/svn/reactos?rev=48839&view=rev
Log:
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.
Modified:
trunk/reactos/boot/bootdata/hivesys_i386.inf
trunk/reactos/include/ddk/wdm.h
trunk/reactos/ntoskrnl/config/cmvalche.c
trunk/reactos/ntoskrnl/ke/bug.c
trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
trunk/reactos/ntoskrnl/ntoskrnl.pspec
trunk/reactos/ntoskrnl/vf/driver.c
Modified: trunk/reactos/boot/bootdata/hivesys_i386.inf
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_i386…
==============================================================================
--- trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] (original)
+++ trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -7,6 +7,98 @@
HKLM,"SYSTEM\CurrentControlSet\Control","WaitToKillServiceTimeout",2,"20000"
HKLM,"SYSTEM\CurrentControlSet\Control\Biosinfo","InfName",2,"biosinfo.inf"
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","Win31FileSystem",0x00010001,0
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=4883…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -9773,7 +9773,7 @@
#endif
NTKERNELAPI
-DECLSPEC_NORETURN
+//DECLSPEC_NORETURN
VOID
NTAPI
KeBugCheckEx(
Modified: trunk/reactos/ntoskrnl/config/cmvalche.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmvalche.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmvalche.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmvalche.c [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -428,6 +428,7 @@
/* Full key information */
case KeyValueFullInformation:
+ case KeyValueFullInformationAlign64:
/* Check if this is a small key and compute key size */
IsSmall = CmpIsKeyValueSmall(&KeySize,
@@ -447,9 +448,20 @@
/* Calculate the data offset */
DataOffset = Size - KeySize;
- /* Align the offset to 4 bytes */
- AlignedData = ALIGN_UP(DataOffset, ULONG);
-
+#ifdef _WIN64
+ /* 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 (AlignedData > DataOffset) Size += (AlignedData-DataOffset);
}
@@ -656,6 +668,7 @@
default:
/* We got some class that we don't support */
+ DPRINT1("Caller requested unknown class: %lx\n",
KeyValueInformationClass);
*Status = STATUS_INVALID_PARAMETER;
break;
}
Modified: trunk/reactos/ntoskrnl/ke/bug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/bug.c?rev=4883…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/bug.c [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -1430,13 +1430,18 @@
IN ULONG_PTR BugCheckParameter3,
IN ULONG_PTR BugCheckParameter4)
{
- /* Call the internal API */
- KeBugCheckWithTf(BugCheckCode,
- BugCheckParameter1,
- BugCheckParameter2,
- BugCheckParameter3,
- BugCheckParameter4,
- NULL);
+ /* Workaround for Windows Server 2003 Checked PCI Driver issue */
+ if (!(BugCheckCode == PCI_BUS_DRIVER_INTERNAL) &&
+ (BugCheckParameter1 == 0xDEAD0010))
+ {
+ /* Call the internal API */
+ KeBugCheckWithTf(BugCheckCode,
+ BugCheckParameter1,
+ BugCheckParameter2,
+ BugCheckParameter3,
+ BugCheckParameter4,
+ NULL);
+ }
}
/*
Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -746,7 +746,11 @@
}
/* 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 */
Ordinal = OrdinalTable[Mid];
@@ -1237,6 +1241,7 @@
/* Cleanup and return */
MiDereferenceImports(LoadedImports);
if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_WSTR);
+ DPRINT1("Warning: Driver failed to load, %S not found\n",
*MissingDriver);
return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND;
}
Modified: trunk/reactos/ntoskrnl/ntoskrnl.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.pspec?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.pspec [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -1399,7 +1399,7 @@
@ stdcall VerSetConditionMask(long long long long)
@ cdecl VfFailDeviceNode(ptr long long long ptr ptr ptr)
;VfFailDriver
-;VfFailSystemBIOS
+@ cdecl VfFailSystemBIOS(long long long ptr ptr ptr)
@ stdcall VfIsVerificationEnabled(long ptr)
#ifndef __x86_64__
@ stdcall WRITE_REGISTER_BUFFER_UCHAR(ptr ptr long)
Modified: trunk/reactos/ntoskrnl/vf/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/vf/driver.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/vf/driver.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/vf/driver.c [iso-8859-1] Tue Sep 21 05:34:05 2010
@@ -43,4 +43,20 @@
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 */