Author: fireball
Date: Mon Feb 11 20:45:56 2008
New Revision: 32302
URL: http://svn.reactos.org/svn/reactos?rev=32302&view=rev
Log:
- Minor cleanup.
See issue #3054 for more details.
Modified:
trunk/reactos/ntoskrnl/mm/anonmem.c
trunk/reactos/ntoskrnl/mm/procsup.c
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/anonmem.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/anonmem.c (original)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c Mon Feb 11 20:45:56 2008
@@ -542,10 +542,6 @@
* PAGE_EXECUTE_READ, PAGE_EXECUTE_READWRITE, PAGE_GUARD,
* PAGE_NOACCESS
* RETURNS: Status
- * NOTES: Must run at IRQL PASSIVE_LEVEL? (or is APC_LEVEL cool too?)
- * MSDN states that ZwAllocateVirtualMemory IRQL must be PASSIVE_LEVEL,
- * but why wouldn't APC_LEVEL be valid (or is that only for the Zw* version
- * and Nt* can indeed run at APC_LEVEL?)
*/
{
PEPROCESS Process;
@@ -561,10 +557,7 @@
PHYSICAL_ADDRESS BoundaryAddressMultiple;
KPROCESSOR_MODE PreviousMode;
- // TMN: Someone Pick one of these. Until it's clear which
- // level is allowed, I play it safe and check for <= APC_LEVEL
PAGED_CODE();
-// ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);
DPRINT("NtAllocateVirtualMemory(*UBaseAddress %x, "
"ZeroBits %d, *URegionSize %x, AllocationType %x, Protect %x)\n",
Modified: trunk/reactos/ntoskrnl/mm/procsup.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/procsup.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/procsup.c (original)
+++ trunk/reactos/ntoskrnl/mm/procsup.c Mon Feb 11 20:45:56 2008
@@ -636,7 +636,7 @@
szDest = Process->ImageFileName;
lnFName = min(lnFName, sizeof(Process->ImageFileName) - 1);
while (lnFName--) *szDest++ = (UCHAR)*szSrc++;
- *szDest = UNICODE_NULL;
+ *szDest = ANSI_NULL;
/* Check if caller wants an audit name */
if (AuditName)
Author: hpoussin
Date: Mon Feb 11 19:49:05 2008
New Revision: 32297
URL: http://svn.reactos.org/svn/reactos?rev=32297&view=rev
Log:
Bus number can also be stored in resource list header
Modified:
trunk/reactos/drivers/bus/pci/fdo.c
Modified: trunk/reactos/drivers/bus/pci/fdo.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pci/fdo.c?rev=…
==============================================================================
--- trunk/reactos/drivers/bus/pci/fdo.c (original)
+++ trunk/reactos/drivers/bus/pci/fdo.c Mon Feb 11 19:49:05 2008
@@ -356,7 +356,6 @@
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp)
{
- static BOOLEAN FoundBuggyAllocatedResourcesList = FALSE;
PFDO_DEVICE_EXTENSION DeviceExtension;
PCM_RESOURCE_LIST AllocatedResources;
PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptor;
@@ -383,6 +382,9 @@
return STATUS_REVISION_MISMATCH;
ASSERT(DeviceExtension->State == dsStopped);
+
+ /* By default, use the bus number in the resource list header */
+ DeviceExtension->BusNumber = AllocatedResources->List[0].BusNumber;
for (i = 0; i < AllocatedResources->List[0].PartialResourceList.Count; i++)
{
@@ -393,6 +395,8 @@
{
if (FoundBusNumber || ResourceDescriptor->u.BusNumber.Length != 1)
return STATUS_INVALID_PARAMETER;
+ /* Use this one instead */
+ ASSERT(AllocatedResources->List[0].BusNumber == ResourceDescriptor->u.BusNumber.Start);
DeviceExtension->BusNumber = ResourceDescriptor->u.BusNumber.Start;
DPRINT("Found bus number resource: %lu\n", DeviceExtension->BusNumber);
FoundBusNumber = TRUE;
@@ -402,22 +406,7 @@
DPRINT("Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type);
}
}
- /* HACK due to a bug in ACPI driver, which doesn't report the bus number */
- if (!FoundBuggyAllocatedResourcesList && !FoundBusNumber)
- {
- FoundBuggyAllocatedResourcesList = TRUE;
- DPRINT1("No bus number resource found (bug in acpi.sys?), assuming bus number #0\n");
- DeviceExtension->BusNumber = 0;
- goto next;
- }
- /* END HACK */
- if (!FoundBusNumber)
- {
- DPRINT("Some required resources were not found in allocated resources list\n");
- return STATUS_INSUFFICIENT_RESOURCES;
- }
-
-next:
+
InitializeListHead(&DeviceExtension->DeviceListHead);
KeInitializeSpinLock(&DeviceExtension->DeviceListLock);
DeviceExtension->DeviceListCount = 0;