Merge 15329:15546 from trunk
Modified: branches/xmlbuildsystem/reactos/apps/utils/ps/ps.c
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware.
c
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386disk.
c
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/partition.c
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr.c
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/mm/mm.c
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/reactos.c
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/setupldr.c
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/ui/ui.c
Modified: branches/xmlbuildsystem/reactos/bootdata/hivesys.inf
Modified: branches/xmlbuildsystem/reactos/bootdata/packages/reactos.dff
Modified:
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/acpisys.c
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/fdo.c
Modified:
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/include/acpisys.h
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/osl.c
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/pdo.c
Modified: branches/xmlbuildsystem/reactos/drivers/bus/pci/pci.c
Modified: branches/xmlbuildsystem/reactos/drivers/bus/pci/pdo.c
Modified: branches/xmlbuildsystem/reactos/drivers/dd/serial/legacy.c
Modified: branches/xmlbuildsystem/reactos/drivers/dd/serial/pnp.c
Modified: branches/xmlbuildsystem/reactos/drivers/dd/serial/serial.h
Modified: branches/xmlbuildsystem/reactos/drivers/fs/np/create.c
Modified:
branches/xmlbuildsystem/reactos/drivers/input/i8042prt/i8042prt.h
Modified:
branches/xmlbuildsystem/reactos/drivers/input/i8042prt/keyboard.c
Modified: branches/xmlbuildsystem/reactos/drivers/input/i8042prt/mouse.c
Modified: branches/xmlbuildsystem/reactos/drivers/net/afd/afd/info.c
Modified:
branches/xmlbuildsystem/reactos/drivers/net/ndis/include/miniport.h
Modified:
branches/xmlbuildsystem/reactos/drivers/net/ndis/include/ndissys.h
Modified:
branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis/miniport.c
Modified:
branches/xmlbuildsystem/reactos/drivers/net/ndis/ndis/protocol.c
Modified: branches/xmlbuildsystem/reactos/drivers/net/tcpip/tcpip/main.c
Modified: branches/xmlbuildsystem/reactos/drivers/storage/cdrom/cdrom.c
Modified: branches/xmlbuildsystem/reactos/drivers/storage/disk/disk.c
Modified: branches/xmlbuildsystem/reactos/drivers/usb/Makefile
Modified: branches/xmlbuildsystem/reactos/drivers/usb/cromwell/Makefile
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/buffer_simple.
c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/config.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/hcd-pci.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/hcd.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/hcd.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/hub.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/hub.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/makefile
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/makefile.crom
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/message.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/urb.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usb-debug.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usb.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usb.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usbcore.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usbcore.def
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/core/usbcore.rc
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/makefile
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/makefile.crom
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-dbg.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-hcd.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-hub.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-mem.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-pci.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci-q.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci.def
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci.rc
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci_config.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci_main.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/host/ohci_main.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/asm/bitops.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/bitops.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/boot.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/consts.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/cromwell_type
s.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/errno.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/linux_wrapper
.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/list.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/pci_hal.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/pci_ids.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/usb.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/linux/usb_ch9.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/BootUSB.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/Makefile
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/linuxwrapper.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/risefall.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/ros_wrapper.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/usbkey.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/usbwrapper.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/xpad.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/sys/xremote.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/makefile
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/uhci-hcd.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/uhci.def
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/uhci.rc
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/uhci_config.h
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/uhci/uhci_main.c
Modified:
branches/xmlbuildsystem/reactos/drivers/usb/cromwell/usb_wrapper.h
Modified:
branches/xmlbuildsystem/reactos/drivers/video/displays/framebuf/screen.c
Modified:
branches/xmlbuildsystem/reactos/drivers/video/miniport/vbe/vbemp.c
Modified:
branches/xmlbuildsystem/reactos/drivers/video/miniport/vbe/vbemp.h
Modified: branches/xmlbuildsystem/reactos/hal/halx86/mp/mpconfig.c
Modified: branches/xmlbuildsystem/reactos/include/ddk/obfuncs.h
Modified: branches/xmlbuildsystem/reactos/include/debug.h
[truncated at 100 lines; 279 more skipped]
Property changes on: branches/xmlbuildsystem/reactos/apps/utils
___________________________________________________________________
Name: svn:ignore
+
_____
Modified: branches/xmlbuildsystem/reactos/apps/utils/ps/ps.c
--- branches/xmlbuildsystem/reactos/apps/utils/ps/ps.c 2005-05-27
18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/apps/utils/ps/ps.c 2005-05-27
19:29:24 UTC (rev 15547)
@@ -1,4 +1,4 @@
-/* $Id$
+/*
*
* ReactOS ps - process list console viewer
*
@@ -26,7 +26,68 @@
/* NOTE: W32API ddk/ntapi.h header has wrong definition of
SYSTEM_PROCESSES. */
#include <ntos/types.h>
+typedef struct _SYSTEM_THREADS
+ {
+ LARGE_INTEGER KernelTime;
+ LARGE_INTEGER UserTime;
+ LARGE_INTEGER CreateTime;
+ ULONG WaitTime;
+ PVOID StartAddress;
+ CLIENT_ID ClientId;
+ KPRIORITY Priority;
+ LONG BasePriority;
+ ULONG ContextSwitches;
+ ULONG ThreadState;
+ ULONG WaitReason;
+ } SYSTEM_THREADS, *PSYSTEM_THREADS;
+
+ typedef struct _SYSTEM_PROCESSES
+ {
+ ULONG NextEntryOffset;
+ ULONG NumberOfThreads;
+ LARGE_INTEGER SpareLi1;
+ LARGE_INTEGER SpareLi2;
+ LARGE_INTEGER SpareLi3;
+ LARGE_INTEGER CreateTime;
+ LARGE_INTEGER UserTime;
+ LARGE_INTEGER KernelTime;
+ UNICODE_STRING ImageName;
+ KPRIORITY BasePriority;
+ HANDLE UniqueProcessId;
+ HANDLE InheritedFromUniqueProcessId;
+ ULONG HandleCount;
+ ULONG SessionId;
+ ULONG PageDirectoryFrame;
+ /*
+ * This part corresponds to VM_COUNTERS_EX.
+ * NOTE: *NOT* THE SAME AS VM_COUNTERS!
+ */
+ ULONG PeakVirtualSize;
+ ULONG VirtualSize;
+ ULONG PageFaultCount;
+ ULONG PeakWorkingSetSize;
+ ULONG WorkingSetSize;
+ ULONG QuotaPeakPagedPoolUsage;
+ ULONG QuotaPagedPoolUsage;
+ ULONG QuotaPeakNonPagedPoolUsage;
+ ULONG QuotaNonPagedPoolUsage;
+ ULONG PagefileUsage;
+ ULONG PeakPagefileUsage;
+ ULONG PrivateUsage;
+
+ /* This part corresponds to IO_COUNTERS */
+ LARGE_INTEGER ReadOperationCount;
+ LARGE_INTEGER WriteOperationCount;
+ LARGE_INTEGER OtherOperationCount;
+ LARGE_INTEGER ReadTransferCount;
+ LARGE_INTEGER WriteTransferCount;
+ LARGE_INTEGER OtherTransferCount;
+
+ SYSTEM_THREADS Threads [1];
+ } SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;
+
+
// x00000000 00000000 000:00:00 000:00:00 ()
static char* title = "P PID PPID KTime UTime
NAME\n";
static char* title1 = "t TID KTime UTime State
WaitResson\n";
@@ -36,7 +97,7 @@
struct status {
DWORD state;
char desc[10];
-} thread_stat[8 + 1] = {
+} thread_stat[8 + 1] = {
{0, "Init "},
{1, "Ready "},
{2, "Running "},
@@ -50,39 +111,45 @@
struct waitres {
DWORD state;
- char desc[11];
-} waitreason[28 + 1] = {
- {0, "Executive "},
- {1, "FreePage "},
- {2, "PageIn "},
- {3, "PoolAlloc "},
- {4, "DelayExec "},
- {5, "Suspended "},
- {6, "UserReq "},
- {7, "WrExecutive"},
- {8, "WrFreePage "},
- {9, "WrPageIn "},
- {10,"WrPoolAlloc"},
- {11,"WrDelayExec"},
- {12,"WrSuspended"},
- {13,"WrUserReq "},
- {14,"WrEventPair"},
- {15,"WrQueue "},
- {16,"WrLpcRec "},
- {17,"WrLpcReply "},
- {18,"WrVirtualMm"},
- {19,"WrPageOut "},
- {20,"WrRendez "},
- {21,"Spare1 "},
- {22,"Spare2 "},
- {23,"Spare3 "},
- {24,"Spare4 "},
- {25,"Spare5 "},
- {26,"Spare6 "},
- {27,"WrKernel "},
- {-1," ? "}
+ char desc[17];
+} waitreason[35 + 1] = {
+ {0, "Executive "},
+ {1, "FreePage "},
+ {2, "PageIn "},
+ {3, "PoolAllocation "},
+ {4, "DelayExecution "},
+ {5, "Suspended "},
+ {6, "UserRequest "},
+ {7, "WrExecutive "},
+ {8, "WrFreePage "},
+ {9, "WrPageIn "},
+ {10,"WrPoolAllocation "},
+ {11,"WrDelayExecution "},
+ {12,"WrSuspended "},
+ {13,"WrUserRequest "},
+ {14,"WrEventPair "},
+ {15,"WrQueue "},
+ {16,"WrLpcReceive "},
+ {17,"WrLpcReply "},
+ {18,"WrVirtualMemory "},
+ {19,"WrPageOut "},
+ {20,"WrRendezvous "},
+ {21,"Spare2 "},
+ {22,"WrGuardedMutex "},
+ {23,"Spare4 "},
+ {24,"Spare5 "},
+ {25,"Spare6 "},
+ {26,"WrKernel "},
+ {27,"WrResource "},
+ {28,"WrPushLock "},
+ {29,"WrMutex "},
+ {30,"WrQuantumEnd "},
+ {31,"WrDispatchInt "},
+ {32,"WrPreempted "},
+ {33,"WrYieldExecution "},
+ {34,"MaximumWaitReason"},
+ {-1," ? "}
};
-
BOOL CALLBACK
EnumThreadProc(HWND hwnd, LPARAM lp)
{
@@ -90,9 +157,9 @@
LONG style;
HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE);
char buf[256];
-
+
GetWindowText(hwnd, (LPTSTR)lp, 30);
-
+
if(hwnd != 0)
{
style = GetWindowLong(hwnd, GWL_STYLE);
@@ -110,13 +177,13 @@
DWORD r;
ANSI_STRING astring;
HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE);
- PSYSTEM_PROCESS_INFORMATION SystemProcesses = NULL;
- PSYSTEM_PROCESS_INFORMATION CurrentProcess;
+ PSYSTEM_PROCESSES SystemProcesses = NULL;
+ PSYSTEM_PROCESSES CurrentProcess;
ULONG BufferSize, ReturnSize;
NTSTATUS Status;
char buf[256];
char buf1[256];
-
+
WriteFile(stdout, title, lstrlen(title), &r, NULL);
WriteFile(stdout, title1, lstrlen(title1), &r, NULL);
WriteFile(stdout, title2, lstrlen(title2), &r, NULL);
@@ -153,7 +220,7 @@
hour = (ptime.QuadPart / (10000000LL * 3600LL));
minute = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
seconds = (ptime.QuadPart / 10000000LL) % 60LL;
-
+
ptime.QuadPart = CurrentProcess->UserTime.QuadPart;
hour1 = (ptime.QuadPart / (10000000LL * 3600LL));
minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
@@ -166,7 +233,7 @@
hour, minute, seconds, hour1, minute1, seconds1,
astring.Buffer);
WriteFile(stdout, buf, lstrlen(buf), &r, NULL);
-
+
RtlFreeAnsiString(&astring);
for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++)
@@ -175,37 +242,37 @@
struct waitres *waitt;
char szWindowName[30] = {" "};
- ptime = CurrentProcess->TH[ti].KernelTime;
+ ptime = CurrentProcess->Threads[ti].KernelTime;
thour = (ptime.QuadPart / (10000000LL * 3600LL));
tmin = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
tsec = (ptime.QuadPart / 10000000LL) % 60LL;
- ptime = CurrentProcess->TH[ti].UserTime;
+ ptime = CurrentProcess->Threads[ti].UserTime;
thour1 = (ptime.QuadPart / (10000000LL * 3600LL));
tmin1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
tsec1 = (ptime.QuadPart / 10000000LL) % 60LL;
statt = thread_stat;
- while (statt->state !=
CurrentProcess->TH[ti].ThreadState && statt->state >= 0)
+ while (statt->state !=
CurrentProcess->Threads[ti].ThreadState && statt->state >= 0)
statt++;
waitt = waitreason;
- while (waitt->state !=
CurrentProcess->TH[ti].WaitReason && waitt->state >= 0)
+ while (waitt->state !=
CurrentProcess->Threads[ti].WaitReason && waitt->state >= 0)
waitt++;
- wsprintf (buf1,
+ wsprintf (buf1,
"t% %8d %3d:%02d:%02d %3d:%02d:%02d
%s %s\n",
- CurrentProcess->TH[ti].ClientId.UniqueThread,
+
CurrentProcess->Threads[ti].ClientId.UniqueThread,
thour, tmin, tsec, thour1, tmin1, tsec1,
statt->desc , waitt->desc);
WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
-
EnumThreadWindows((DWORD)CurrentProcess->TH[ti].ClientId.UniqueThread,
+
EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThre
ad,
(ENUMWINDOWSPROC) EnumThreadProc,
(LPARAM)(LPTSTR) szWindowName );
}
- CurrentProcess =
(PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess +
+ CurrentProcess =
(PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +
CurrentProcess->NextEntryOffset);
- }
+ }
return (0);
}
_____
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware.
c
---
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware.
c 2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/hardware.
c 2005-05-27 19:29:24 UTC (rev 15547)
@@ -1715,7 +1715,7 @@
/* Set 'Identifier' value */
strcpy(Buffer,
"PCAT_ENHANCED");
- Error = RegSetValue(ControllerKey,
+ Error = RegSetValue(PeripheralKey,
"Identifier",
REG_SZ,
Buffer,
_____
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386disk.
c
---
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386disk.
c 2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/arch/i386/i386disk.
c 2005-05-27 19:29:24 UTC (rev 15547)
@@ -206,9 +206,27 @@
// Partition requested was zero which means the boot
partition
if (! DiskGetActivePartitionEntry(i386BootDrive,
&PartitionTableEntry))
{
+ /* Try partition-less disk */
+ *StartSector = 0;
+ *SectorCount = 0;
+ }
+ /* Check for valid partition */
+ else if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
+ {
return FALSE;
}
+ else
+ {
+ *StartSector =
PartitionTableEntry.SectorCountBeforePartition;
+ *SectorCount =
PartitionTableEntry.PartitionSectorCount;
+ }
}
+ else if (0xff == i386BootPartition)
+ {
+ /* Partition-less disk */
+ *StartSector = 0;
+ *SectorCount = 0;
+ }
else
{
// Get requested partition
@@ -216,25 +234,26 @@
{
return FALSE;
}
+ /* Check for valid partition */
+ else if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
+ {
+ return FALSE;
+ }
+ else
+ {
+ *StartSector =
PartitionTableEntry.SectorCountBeforePartition;
+ *SectorCount =
PartitionTableEntry.PartitionSectorCount;
+ }
}
- // Check for valid partition
- if (PartitionTableEntry.SystemIndicator ==
PARTITION_ENTRY_UNUSED)
- {
- return FALSE;
- }
-
// Try to recognize the file system
- if (!FsRecognizeVolume(i386BootDrive,
PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
+ if (!FsRecognizeVolume(i386BootDrive, *StartSector,
&VolumeType))
{
return FALSE;
}
*DriveNumber = i386BootDrive;
- *StartSector = PartitionTableEntry.SectorCountBeforePartition;
- *SectorCount = PartitionTableEntry.PartitionSectorCount;
- //switch (PartitionTableEntry.SystemIndicator)
switch (VolumeType)
{
case PARTITION_FAT_12:
_____
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/partition.c
---
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/partition.c
2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/disk/partition.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -63,12 +63,12 @@
// Make sure there was only one bootable partition
if (BootablePartitionCount == 0)
{
- DiskError("No bootable (active) partitions found.", 0);
+ DbgPrint((DPRINT_DISK, "No bootable (active) partitions
found.\n"));
return FALSE;
}
else if (BootablePartitionCount != 1)
{
- DiskError("Too many bootable (active) partitions
found.", 0);
+ DbgPrint((DPRINT_DISK, "Too many bootable (active)
partitions found.\n"));
return FALSE;
}
_____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr.c
--- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/freeldr.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -35,7 +35,7 @@
DebugInit();
- DbgPrint((DPRINT_WARNING, "BootMain() called. BootDrive = 0x%x
BootPartition = %d\n", BootDrive, BootPartition));
+ DbgPrint((DPRINT_WARNING, "BootMain() called.\n"));
if (!MmInitializeMemoryManager())
{
_____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/mm/mm.c
--- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/mm/mm.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/mm/mm.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -36,10 +36,30 @@
VOID MemAllocTest(VOID);
#endif // DEBUG
+/*
+ * Hack alert
+ * Normally, we allocate whole pages. This is ofcourse wastefull for
small
+ * allocations (a few bytes). So, for small allocations (smaller than a
page)
+ * we sub-allocate. When the first small allocation is done, a page is
+ * requested. We keep a pointer to that page in SubAllocationPage. The
alloc
+ * is satisfied by returning a pointer to the beginning of the page. We
also
+ * keep track of how many bytes are still available in the page in
SubAllocationRest.
+ * When the next small request comes in, we try to allocate it just
after the
+ * memory previously allocated. If it won't fit, we allocate a new page
and
+ * the whole process starts again.
+ * Note that suballocations are done back-to-back, there's no
bookkeeping at all.
+ * That also means that we cannot really free suballocations. So, when
a free is
+ * done and it is determined that this might be a free of a
sub-allocation, we
+ * just no-op the free.
+ * Perhaps we should use the heap routines from ntdll here.
+ */
+static PVOID SubAllocationPage = NULL;
+static unsigned SubAllocationRest = 0;
+
PVOID MmAllocateMemory(ULONG MemorySize)
{
- ULONG PagesNeeded;
- ULONG FirstFreePageFromEnd;
+ ULONG PagesNeeded;
+ ULONG FirstFreePageFromEnd;
PVOID MemPointer;
if (MemorySize == 0)
@@ -49,6 +69,14 @@
return NULL;
}
+ MemorySize = ROUND_UP(MemorySize, 4);
+ if (MemorySize <= SubAllocationRest)
+ {
+ MemPointer = SubAllocationPage + MM_PAGE_SIZE -
SubAllocationRest;
+ SubAllocationRest -= MemorySize;
+ return MemPointer;
+ }
+
// Find out how many blocks it will take to
// satisfy this allocation
PagesNeeded = ROUND_UP(MemorySize, MM_PAGE_SIZE) / MM_PAGE_SIZE;
@@ -76,6 +104,13 @@
FreePagesInLookupTable -= PagesNeeded;
MemPointer = (PVOID)(FirstFreePageFromEnd * MM_PAGE_SIZE);
+ if (MemorySize < MM_PAGE_SIZE)
+ {
+ SubAllocationPage = MemPointer;
+ SubAllocationRest = MM_PAGE_SIZE - MemorySize;
+ }
+
+
#ifdef DEBUG
IncrementAllocationCount();
DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of
memory starting at page %d. AllocCount: %d\n", MemorySize, PagesNeeded,
FirstFreePageFromEnd, AllocationCount));
@@ -235,6 +270,13 @@
#endif
+ /* If this allocation is only a single page, it could be a
sub-allocated page.
+ * Just don't free it */
+ if (1 == PageCount)
+ {
+ return;
+ }
+
// Loop through our array and mark all the
// blocks as free
for (Idx=PageNumber; Idx<(PageNumber + PageCount); Idx++)
_____
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/reactos.c
---
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/reactos.c
2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/reactos.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -756,6 +756,16 @@
if (!FrLdrLoadDriver(szHalName, 10))
return;
+#if 0
+ /* Load bootvid */
+ strcpy(value, "INBV.DLL");
+ strcpy(szHalName, szBootPath);
+ strcat(szHalName, "SYSTEM32\\");
+ strcat(szHalName, value);
+
+ if (!FrLdrLoadDriver(szHalName, 10))
+ return;
+#endif
/*
* Load the System hive from disk
*/
_____
Modified:
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/setupldr.c
---
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/setupldr.c
2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/reactos/setupldr.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -34,7 +34,7 @@
#include "registry.h"
-//#define USE_UI
+#define USE_UI
static BOOL
@@ -88,7 +88,7 @@
* Update the status bar with the current file
*/
#ifdef USE_UI
- sprintf(szBuffer, "Reading %s", szShortName);
+ sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
UiDrawStatusText(szBuffer);
#else
printf("Reading %s\n", szShortName);
@@ -155,7 +155,7 @@
* Update the status bar with the current file
*/
#ifdef USE_UI
- sprintf(szBuffer, "Reading %s", szShortName);
+ sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
UiDrawStatusText(szBuffer);
#else
printf("Reading %s\n", szShortName);
@@ -220,7 +220,7 @@
* Update the status bar with the current file
*/
#ifdef USE_UI
- sprintf(szBuffer, "Reading %s", szShortName);
+ sprintf(szBuffer, "Setup is loading files (%s)", szShortName);
UiDrawStatusText(szBuffer);
#else
printf("Reading %s\n", szShortName);
@@ -232,6 +232,7 @@
return(TRUE);
}
+BOOL SetupUiInitialize(VOID);
VOID RunLoader(VOID)
{
@@ -294,7 +295,7 @@
#endif
#ifdef USE_UI
- UiInitialize();
+ SetupUiInitialize();
UiDrawStatusText("");
#endif
_____
Modified: branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/ui/ui.c
--- branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/ui/ui.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/boot/freeldr/freeldr/ui/ui.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -27,6 +27,7 @@
#include <inifile.h>
#include <version.h>
#include <video.h>
+#include <reactos/buildno.h>
ULONG UiScreenWidth = 80;
// Screen Width
ULONG UiScreenHeight = 25;
// Screen Height
@@ -197,7 +198,40 @@
UserInterfaceUp = TRUE;
DbgPrint((DPRINT_UI, "UiInitialize() returning TRUE.\n"));
+ return TRUE;
+}
+BOOL SetupUiInitialize(VOID)
+{
+
+ CHAR DisplayModeText[260];
+ ULONG Depth;
+
+
+ DisplayModeText[0] = '\0';
+
+
+ UiDisplayMode = MachVideoSetDisplayMode(DisplayModeText, TRUE);
+ MachVideoGetDisplaySize(&UiScreenWidth, &UiScreenHeight,
&Depth);
+
+ TuiInitialize();
+
+ // Draw the backdrop and fade it in if special effects are
enabled
+ TuiFillArea(0,
+ 0,
+ UiScreenWidth - 1,
+ UiScreenHeight - 2,
+ 0,
+ ATTR(UiBackdropFgColor, UiBackdropBgColor));
+
+ UiStatusBarBgColor = 7;
+ UserInterfaceUp = TRUE;
+
+ TuiDrawText(4, 1, "ReactOS " KERNEL_VERSION_STR " Setup",
ATTR(COLOR_GRAY, UiBackdropBgColor));
+ TuiDrawText(3, 2,
"\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xCD\xC
D\xCD\xCD\xCD\xCD\xCD\xCD", ATTR(COLOR_GRAY, UiBackdropBgColor));
+
+ DbgPrint((DPRINT_UI, "UiInitialize() returning TRUE.\n"));
+
return TRUE;
}
_____
Modified: branches/xmlbuildsystem/reactos/bootdata/hivesys.inf
--- branches/xmlbuildsystem/reactos/bootdata/hivesys.inf
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/bootdata/hivesys.inf
2005-05-27 19:29:24 UTC (rev 15547)
@@ -46,6 +46,9 @@
HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName",,0x00000012
HKLM,"SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName","Compu
terName",0x00000002,"COMPUTERNAME"
+; Device classes key
+HKLM,"SYSTEM\CurrentControlSet\Control\DeviceClasses",,0x00000012
+
; Hardware profile settings
HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB",,0x00000012
HKLM,"SYSTEM\CurrentControlSet\Control\IDConfigDB","CurrentConfig",0x000
10001,0x00000000
@@ -529,7 +532,7 @@
HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ErrorControl",0x00010
001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Group",0x00000000,"De
bug"
HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","ImagePath",0x00020000
,"system32\drivers\debugout.sys"
-HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Start",0x00010001,0x
00000001
+HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Start",0x00010001,0x
00000004
HKLM,"SYSTEM\CurrentControlSet\Services\DebugOut","Type",0x00010001,0x00
000001
; Disk class driver
@@ -675,7 +678,7 @@
HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","ErrorControl",0x0001000
1,0x00000001
HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","Group",0x00000000,"NDIS
"
HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","ImagePath",0x00020000,"
system32\drivers\ne2000.sys"
-HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","Start",0x00010001,0x00
000004
+HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","Start",0x00010001,0x00
000003
HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","Type",0x00010001,0x0000
0001
HKLM,"SYSTEM\CurrentControlSet\Services\Ne2000","Route",0x00000000,"Ne20
001"
@@ -687,8 +690,8 @@
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08
002BE10318}\0001\Linkage","Export",0x00000000,"\Device\Ne20001"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08
002BE10318}\0001\Linkage","RootDevice",0x00000000,"Ne20001"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08
002BE10318}\0001\Linkage","UpperBind",0x00000000,"Tcpip"
-HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-0
8002BE10318}\0001","Port",0x00000000,"280"
-HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-0
8002BE10318}\0001","Irq",0x00000000,"9"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-0
8002BE10318}\0001","Port",0x00000000,"c100"
+HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-0
8002BE10318}\0001","Irq",0x00000000,"B"
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08
002BE10318}\0001","NetworkAddress",0x00000000,"001122334455"
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","Defau
ltGateway",0x00010000,"0.0.0.0"
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","IPAdd
ress",0x00010000,"0.0.0.0"
@@ -926,6 +929,12 @@
HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Type",0x00010001,0x0000000
1
HKLM,"SYSTEM\CurrentControlSet\Services\VBE\Device0","InstalledDisplayDr
ivers",0x00010000,"framebuf"
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","Default
Settings.VRefresh",0x00010001,1
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","Default
Settings.BitsPerPel",0x00010001,8
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","Default
Settings.XResolution",0x00010001,640
+HKLM,"SYSTEM\CurrentControlSet\Hardware
Profiles\Current\System\CurrentControlSet\Services\VBE\Device0","Default
Settings.YResolution",0x00010001,480
+
+
; VGA miniport driver
HKLM,"SYSTEM\CurrentControlSet\Services\Vga","ErrorControl",0x00010001,0
x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Group",0x00000000,"Video
Save"
@@ -934,6 +943,7 @@
HKLM,"SYSTEM\CurrentControlSet\Services\Vga","Type",0x00010001,0x0000000
1
HKLM,"SYSTEM\CurrentControlSet\Services\Vga\Device0","InstalledDisplayDr
ivers",0x00010000,"vgaddi"
+
; VMware SVGA driver
HKLM,"SYSTEM\CurrentControlSet\Services\vmx_svga","ErrorControl",0x00010
001,0x00000000
HKLM,"SYSTEM\CurrentControlSet\Services\vmx_svga","Group",0x00000000,"Vi
deo"
_____
Modified: branches/xmlbuildsystem/reactos/bootdata/packages/reactos.dff
--- branches/xmlbuildsystem/reactos/bootdata/packages/reactos.dff
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/bootdata/packages/reactos.dff
2005-05-27 19:29:24 UTC (rev 15547)
@@ -16,7 +16,7 @@
1 = system32
2 = system32\drivers
3 = media\fonts
-4 = .
+4 =
5 = system32\drivers\etc
6 = inf
_____
Modified:
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/acpisys.c
--- branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/acpisys.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/acpisys.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -162,7 +162,7 @@
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
- DbgPrint("Advanced Configuration and Power Interface Bus Driver\n");
+ DPRINT("Advanced Configuration and Power Interface Bus Driver\n");
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
(PDRIVER_DISPATCH) ACPIDispatchDeviceControl;
DriverObject->MajorFunction[IRP_MJ_PNP] = (PDRIVER_DISPATCH)
ACPIPnpControl;
_____
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/fdo.c
--- branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/fdo.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/fdo.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -119,12 +119,16 @@
static BOOLEAN
AcpiCreateResourceList(PCM_RESOURCE_LIST* pResourceList,
PULONG ResourceListSize,
+ PIO_RESOURCE_REQUIREMENTS_LIST*
pRequirementsList,
+ PULONG RequirementsListSize,
RESOURCE* resources)
{
BOOLEAN Done;
ULONG NumberOfResources = 0;
PCM_RESOURCE_LIST ResourceList;
+ PIO_RESOURCE_REQUIREMENTS_LIST RequirementsList;
PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptor;
+ PIO_RESOURCE_DESCRIPTOR RequirementDescriptor;
RESOURCE* resource;
ULONG i;
KIRQL Dirql;
@@ -176,6 +180,24 @@
ResourceList->List[0].PartialResourceList.Count = NumberOfResources;
ResourceDescriptor =
ResourceList->List[0].PartialResourceList.PartialDescriptors;
+ *RequirementsListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) +
sizeof(IO_RESOURCE_DESCRIPTOR) * (NumberOfResources - 1);
+ RequirementsList =
(PIO_RESOURCE_REQUIREMENTS_LIST)ExAllocatePool(PagedPool,
*RequirementsListSize);
+ *pRequirementsList = RequirementsList;
+ if (!RequirementsList)
+ {
+ ExFreePool(ResourceList);
+ return FALSE;
+ }
+ RequirementsList->ListSize = *RequirementsListSize;
+ RequirementsList->InterfaceType =
ResourceList->List[0].InterfaceType;
+ RequirementsList->BusNumber = ResourceList->List[0].BusNumber;
+ RequirementsList->SlotNumber = 0; /* Not used by WDM drivers */
+ RequirementsList->AlternativeLists = 1;
+ RequirementsList->List[0].Version = 1;
+ RequirementsList->List[0].Revision = 1;
+ RequirementsList->List[0].Count = NumberOfResources;
+ RequirementDescriptor = RequirementsList->List[0].Descriptors;
+
/* Fill resources list structure */
Done = FALSE;
resource = resources;
@@ -199,7 +221,16 @@
&Dirql,
&ResourceDescriptor->u.Interrupt.Affinity);
ResourceDescriptor->u.Interrupt.Level = (ULONG)Dirql;
+
+ RequirementDescriptor->Option = 0; /* Required */
+ RequirementDescriptor->Type = ResourceDescriptor->Type;
+ RequirementDescriptor->ShareDisposition =
ResourceDescriptor->ShareDisposition;
+ RequirementDescriptor->Flags = ResourceDescriptor->Flags;
+ RequirementDescriptor->u.Interrupt.MinimumVector =
RequirementDescriptor->u.Interrupt.MaximumVector
+ = irq_data->interrupts[i];
+
ResourceDescriptor++;
+ RequirementDescriptor++;
}
break;
}
@@ -225,7 +256,16 @@
case TRANSFER_8_16: ResourceDescriptor->Flags |=
CM_RESOURCE_DMA_8_AND_16; break;
}
ResourceDescriptor->u.Dma.Channel = dma_data->channels[i];
+
+ RequirementDescriptor->Option = 0; /* Required */
+ RequirementDescriptor->Type = ResourceDescriptor->Type;
+ RequirementDescriptor->ShareDisposition =
ResourceDescriptor->ShareDisposition;
+ RequirementDescriptor->Flags = ResourceDescriptor->Flags;
+ RequirementDescriptor->u.Dma.MinimumChannel =
RequirementDescriptor->u.Dma.MaximumChannel
+ = ResourceDescriptor->u.Dma.Channel;
+
ResourceDescriptor++;
+ RequirementDescriptor++;
}
break;
}
@@ -242,7 +282,18 @@
ResourceDescriptor->u.Port.Start.u.HighPart = 0;
ResourceDescriptor->u.Port.Start.u.LowPart =
io_data->min_base_address;
ResourceDescriptor->u.Port.Length = io_data->range_length;
+
+ RequirementDescriptor->Option = 0; /* Required */
+ RequirementDescriptor->Type = ResourceDescriptor->Type;
+ RequirementDescriptor->ShareDisposition =
ResourceDescriptor->ShareDisposition;
+ RequirementDescriptor->Flags = ResourceDescriptor->Flags;
+ RequirementDescriptor->u.Port.Length =
ResourceDescriptor->u.Port.Length;
+ RequirementDescriptor->u.Port.Alignment = 1; /* Start address
is specified, so it doesn't matter */
+ RequirementDescriptor->u.Port.MinimumAddress =
RequirementDescriptor->u.Port.MaximumAddress
+ = ResourceDescriptor->u.Port.Start;
+
ResourceDescriptor++;
+ RequirementDescriptor++;
break;
}
case end_tag:
@@ -366,6 +417,8 @@
}
if
(!AcpiCreateResourceList(&PdoDeviceExtension->ResourceList,
&PdoDeviceExtension->ResourceListSize,
+
&PdoDeviceExtension->ResourceRequirementsList,
+
&PdoDeviceExtension->ResourceRequirementsListSize,
(RESOURCE*)Buffer.pointer))
{
ASSERT(FALSE);
@@ -573,7 +626,9 @@
}
}
+#ifndef NDEBUG
ACPIPrintInfo(DeviceExtension);
+#endif
/* Initialize ACPI bus manager */
AcpiStatus = bm_initialize();
_____
Modified:
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/include/acpisys.h
---
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/include/acpisys.h
2005-05-27 18:26:14 UTC (rev 15546)
+++
branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/include/acpisys.h
2005-05-27 19:29:24 UTC (rev 15547)
@@ -50,6 +50,9 @@
// Resource list
PCM_RESOURCE_LIST ResourceList;
ULONG ResourceListSize;
+ // Requirement list
+ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirementsList;
+ ULONG ResourceRequirementsListSize;
} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION;
_____
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/osl.c
--- branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/osl.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/osl.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -98,7 +98,7 @@
static char Buffer[512];
LONG Size = vsprintf(Buffer, fmt, args);
- DbgPrint("%s", Buffer);
+ DPRINT("%s", Buffer);
return Size;
}
_____
Modified: branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/pdo.c
--- branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/pdo.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/acpi/ospm/pdo.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -108,6 +108,35 @@
static NTSTATUS
+PdoQueryResourceRequirements(
+ IN PDEVICE_OBJECT DeviceObject,
+ IN PIRP Irp,
+ PIO_STACK_LOCATION IrpSp)
+{
+ PPDO_DEVICE_EXTENSION DeviceExtension;
+ PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirementsList;
+
+ DeviceExtension =
(PPDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
+
+ if (DeviceExtension->ResourceRequirementsListSize == 0)
+ {
+ return Irp->IoStatus.Status;
+ }
+
+ ResourceRequirementsList = ExAllocatePool(PagedPool,
DeviceExtension->ResourceRequirementsListSize);
+ if (!ResourceRequirementsList)
+ {
+ Irp->IoStatus.Information = 0;
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ RtlCopyMemory(ResourceRequirementsList,
DeviceExtension->ResourceRequirementsList,
DeviceExtension->ResourceRequirementsListSize);
+ Irp->IoStatus.Information = (ULONG_PTR)ResourceRequirementsList;
+ return STATUS_SUCCESS;
+}
+
+
+static NTSTATUS
PdoQueryResources(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
@@ -227,6 +256,9 @@
break;
case IRP_MN_QUERY_RESOURCE_REQUIREMENTS:
+ Status = PdoQueryResourceRequirements(DeviceObject,
+ Irp,
+ IrpSp);
break;
case IRP_MN_QUERY_RESOURCES:
_____
Modified: branches/xmlbuildsystem/reactos/drivers/bus/pci/pci.c
--- branches/xmlbuildsystem/reactos/drivers/bus/pci/pci.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/pci/pci.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -172,7 +172,7 @@
IN PDRIVER_OBJECT DriverObject,
IN PUNICODE_STRING RegistryPath)
{
- DbgPrint("Peripheral Component Interconnect Bus Driver\n");
+ DPRINT("Peripheral Component Interconnect Bus Driver\n");
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] =
PciDispatchDeviceControl;
DriverObject->MajorFunction[IRP_MJ_PNP] = PciPnpControl;
_____
Modified: branches/xmlbuildsystem/reactos/drivers/bus/pci/pdo.c
--- branches/xmlbuildsystem/reactos/drivers/bus/pci/pdo.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/bus/pci/pdo.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -409,6 +409,8 @@
ResourceList->ListSize = ListSize;
ResourceList->InterfaceType = PCIBus;
+ ResourceList->BusNumber = DeviceExtension->BusNumber,
+ ResourceList->SlotNumber = DeviceExtension->SlotNumber.u.AsULONG,
ResourceList->AlternativeLists = 1;
ResourceList->List[0].Version = 1;
@@ -433,7 +435,7 @@
if (Length == 0)
{
DPRINT("Unused address register\n");
- break;
+ continue;
}
/* Set preferred descriptor */
@@ -497,6 +499,7 @@
if (PciConfig.u.type0.InterruptPin != 0)
{
+ Descriptor->Option = 0; /* Required */
Descriptor->Type = CmResourceTypeInterrupt;
Descriptor->ShareDisposition = CmResourceShareShared;
Descriptor->Flags = CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE;
@@ -522,7 +525,7 @@
if (Length == 0)
{
DPRINT("Unused address register\n");
- break;
+ continue;
}
/* Set preferred descriptor */
@@ -722,7 +725,7 @@
if (Length == 0)
{
DPRINT("Unused address register\n");
- break;
+ continue;
}
if (Flags & PCI_ADDRESS_IO_SPACE)
@@ -776,7 +779,7 @@
if (Length == 0)
{
DPRINT("Unused address register\n");
- break;
+ continue;
}
if (Flags & PCI_ADDRESS_IO_SPACE)
_____
Modified: branches/xmlbuildsystem/reactos/drivers/dd/serial/legacy.c
--- branches/xmlbuildsystem/reactos/drivers/dd/serial/legacy.c
2005-05-27 18:26:14 UTC (rev 15546)
+++ branches/xmlbuildsystem/reactos/drivers/dd/serial/legacy.c
2005-05-27 19:29:24 UTC (rev 15547)
@@ -83,12 +83,13 @@
{
ULONG ResourceListSize;
PCM_RESOURCE_LIST ResourceList;
+ PCM_RESOURCE_LIST ResourceListTranslated;
PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptor;
+ PCM_PARTIAL_RESOURCE_DESCRIPTOR ResourceDescriptorTranslated;
BOOLEAN ConflictDetected;
UART_TYPE UartType;
PDEVICE_OBJECT Pdo = NULL;
PDEVICE_OBJECT Fdo;
- KIRQL Dirql;
NTSTATUS Status;
/* Create resource list */
@@ -96,29 +97,60 @@
ResourceList =
(PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize,
SERIAL_TAG);
if (!ResourceList)
return STATUS_INSUFFICIENT_RESOURCES;
- ResourceList->Count = 1;
- ResourceList->List[0].InterfaceType = InterfaceTypeUndefined;
- ResourceList->List[0].BusNumber = -1; /* unknown */
- ResourceList->List[0].PartialResourceList.Version = 1;
- ResourceList->List[0].PartialResourceList.Revision = 1;
- ResourceList->List[0].PartialResourceList.Count = 2;
+ ResourceListTranslated =
(PCM_RESOURCE_LIST)ExAllocatePoolWithTag(PagedPool, ResourceListSize,
SERIAL_TAG);
+ if (!ResourceListTranslated)
+ {
+ ExFreePoolWithTag(ResourceList, SERIAL_TAG);
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
+
+ /* Resource header */
+ ResourceList->Count = ResourceListTranslated->Count
+ = 1;
+ ResourceList->List[0].InterfaceType =
ResourceListTranslated->List[0].InterfaceType
+ = InterfaceTypeUndefined;
+ ResourceList->List[0].BusNumber =
ResourceListTranslated->List[0].BusNumber
+ = -1; /* unknown */
+ ResourceList->List[0].PartialResourceList.Version =
ResourceListTranslated->List[0].PartialResourceList.Version
+ = 1;
+ ResourceList->List[0].PartialResourceList.Revision =
ResourceListTranslated->List[0].PartialResourceList.Revision
+ = 1;
+ ResourceList->List[0].PartialResourceList.Count =
ResourceListTranslated->List[0].PartialResourceList.Count
+ = 2;
+
+ /* I/O port */
ResourceDescriptor =
&ResourceList->List[0].PartialResourceList.PartialDescriptors[0];
- ResourceDescriptor->Type = CmResourceTypePort;
- ResourceDescriptor->ShareDisposition =
CmResourceShareDriverExclusive;
- ResourceDescriptor->Flags = CM_RESOURCE_PORT_IO;
- ResourceDescriptor->u.Port.Start.u.HighPart = 0;
[truncated at 1000 lines; 72315 more skipped]