Final merge with 13934 Modified: branches/alex_devel_branch/reactos/ntoskrnl/ex/init.c Modified: branches/alex_devel_branch/reactos/ntoskrnl/include/internal/po.h Modified: branches/alex_devel_branch/reactos/ntoskrnl/io/device.c Modified: branches/alex_devel_branch/reactos/ntoskrnl/io/file.c Modified: branches/alex_devel_branch/reactos/ntoskrnl/po/power.c _____
Modified: branches/alex_devel_branch/reactos/ntoskrnl/ex/init.c --- branches/alex_devel_branch/reactos/ntoskrnl/ex/init.c 2005-03-11 23:06:43 UTC (rev 13938) +++ branches/alex_devel_branch/reactos/ntoskrnl/ex/init.c 2005-03-11 23:09:59 UTC (rev 13939) @@ -305,7 +305,10 @@
inline VOID STDCALL -ParseCommandLine(PULONG MaxMem, PBOOLEAN NoGuiBoot, PBOOLEAN BootLog) +ParseCommandLine(PULONG MaxMem, + PBOOLEAN NoGuiBoot, + PBOOLEAN BootLog, + PBOOLEAN ForceAcpiDisable) { PCHAR p1, p2;
@@ -356,6 +359,10 @@
p2 += 7; *BootLog = TRUE; + } else if (!_strnicmp(p2, "NOACPI", 6)) { + + p2 += 6; + *ForceAcpiDisable = TRUE; }
p1 = p2; @@ -375,6 +382,7 @@ BOOLEAN BootLog = FALSE; ULONG MaxMem = 0; BOOLEAN SetupBoot = TRUE; + BOOLEAN ForceAcpiDisable = FALSE; LARGE_INTEGER Timeout; HANDLE ProcessHandle; HANDLE ThreadHandle; @@ -396,7 +404,7 @@ NtEarlyInitVdm();
/* Parse Command Line Settings */ - ParseCommandLine(&MaxMem, &NoGuiBoot, &BootLog); + ParseCommandLine(&MaxMem, &NoGuiBoot, &BootLog, &ForceAcpiDisable);
/* Initialize Kernel Memory Address Space */ MmInit1(FirstKrnlPhysAddr, @@ -507,7 +515,7 @@ IoInit();
/* TBD */ - PoInit(); + PoInit((PLOADER_PARAMETER_BLOCK)&KeLoaderBlock, ForceAcpiDisable);
/* Initialize the Registry (Hives are NOT yet loaded!) */ CmInitializeRegistry(); _____
Modified: branches/alex_devel_branch/reactos/ntoskrnl/include/internal/po.h --- branches/alex_devel_branch/reactos/ntoskrnl/include/internal/po.h 2005-03-11 23:06:43 UTC (rev 13938) +++ branches/alex_devel_branch/reactos/ntoskrnl/include/internal/po.h 2005-03-11 23:09:59 UTC (rev 13939) @@ -18,7 +18,7 @@
extern PDEVICE_NODE PopSystemPowerDeviceNode;
VOID -PoInit(VOID); +PoInit(PLOADER_PARAMETER_BLOCK LoaderBlock, BOOLEAN ForceAcpiDisable);
NTSTATUS PopSetSystemPowerState( _____
Modified: branches/alex_devel_branch/reactos/ntoskrnl/io/device.c --- branches/alex_devel_branch/reactos/ntoskrnl/io/device.c 2005-03-11 23:06:43 UTC (rev 13938) +++ branches/alex_devel_branch/reactos/ntoskrnl/io/device.c 2005-03-11 23:09:59 UTC (rev 13939) @@ -244,17 +244,41 @@
}
/* - * @unimplemented + * @implemented */ NTSTATUS STDCALL -IoGetDiskDeviceObject( - IN PDEVICE_OBJECT FileSystemDeviceObject, - OUT PDEVICE_OBJECT *DiskDeviceObject - ) +IoGetDiskDeviceObject(IN PDEVICE_OBJECT FileSystemDeviceObject, + OUT PDEVICE_OBJECT *DiskDeviceObject) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; +#if 0 + PDEVOBJ_EXTENSION DeviceExtension; + PVPB Vpb; + KIRQL OldIrql; + + /* Make sure there's a VPB */ + if (!FileSystemDeviceObject->Vpb) return STATUS_INVALID_PARAMETER; + + /* Acquire it */ + IoAcquireVpbSpinLock(&OldIrql); + + /* Get the Device Extension */ + DeviceExtension = FileSystemDeviceObject->DeviceObjectExtension; + + /* Make sure this one has a VPB too */ + Vpb = DeviceExtension->Vpb; + if (!Vpb) return STATUS_INVALID_PARAMETER; + + /* Make sure someone it's mounted */ + if ((!Vpb->ReferenceCount) || (Vpb->Flags & VPB_MOUNTED)) return STATUS_VOLUME_DISMOUNTED; + + /* Return the Disk Device Object */ + *DiskDeviceObject = Vpb->RealDevice; + + /* Release the lock */ + IoReleaseVpbSpinLock(OldIrql); +#endif + return STATUS_SUCCESS; }
/* _____
Modified: branches/alex_devel_branch/reactos/ntoskrnl/io/file.c --- branches/alex_devel_branch/reactos/ntoskrnl/io/file.c 2005-03-11 23:06:43 UTC (rev 13938) +++ branches/alex_devel_branch/reactos/ntoskrnl/io/file.c 2005-03-11 23:09:59 UTC (rev 13939) @@ -265,16 +265,16 @@
}
/* - * @unimplemented + * @implemented */ BOOLEAN STDCALL -IoIsFileOriginRemote( - IN PFILE_OBJECT FileObject - ) +IoIsFileOriginRemote(IN PFILE_OBJECT FileObject) { - UNIMPLEMENTED; - return FALSE; +#if 0 + return (FileObject->Flags & FO_REMOTE_ORIGIN); +#endif + return FALSE; }
/* _____
Modified: branches/alex_devel_branch/reactos/ntoskrnl/po/power.c --- branches/alex_devel_branch/reactos/ntoskrnl/po/power.c 2005-03-11 23:06:43 UTC (rev 13938) +++ branches/alex_devel_branch/reactos/ntoskrnl/po/power.c 2005-03-11 23:09:59 UTC (rev 13939) @@ -12,6 +12,7 @@
#define NDEBUG #include <internal/debug.h>
+#define MB_INFO_FLAG_ACPI_TABLE 0x00001000 PDEVICE_NODE PopSystemPowerDeviceNode = NULL; BOOLEAN PopAcpiPresent = FALSE;
@@ -191,9 +192,16 @@ return Status; }
-VOID INIT_FUNCTION -PoInit(VOID) +VOID +INIT_FUNCTION +PoInit(PLOADER_PARAMETER_BLOCK LoaderBlock, + BOOLEAN ForceAcpiDisable) { + /* Set the ACPI State to False if it's been forced that way */ + if (ForceAcpiDisable) PopAcpiPresent = FALSE; + + /* Otherwise check the LoaderBlock's Flag */ + PopAcpiPresent = LoaderBlock->Flags & MB_INFO_FLAG_ACPI_TABLE; }
/*