mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 22:47:28 +00:00
- Small placeholder change for future Cm code:
- Added newcm.c which will contain some new Cm code part of the Cm Rewrite but not in the rewrite branch (used solely for supporting CmGetSystemControlValues). - Added System Control Vector which supports all the registry flags that Windows 2003 SP1 supports as well. - The most important part of this support, at least for us, is to get boot-time time zone support working properly. We can worry about the other options later. - Update KrnlFun for previous DPC/HAL fixes. svn path=/trunk/; revision=25806
This commit is contained in:
parent
973093ca7b
commit
c731ec2a5a
|
@ -9,12 +9,10 @@
|
|||
// Failure to respect this will *ACHIEVE NOTHING*.
|
||||
//
|
||||
// Hal:
|
||||
// - Use APC and DPC Interrupt Dispatchers.
|
||||
// - CMOS Initialization and CMOS Spinlock.
|
||||
//
|
||||
// Global:
|
||||
// - TODO: Complete the list of bufxies
|
||||
// - Fix DPCs interrupting code at DISPATCH_LEVEL
|
||||
// - Fix atapi.sys or serial.sys loading one more time at each boot.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -447,4 +447,24 @@ static __inline HCELL_INDEX xHvAllocateCell(char *file, int line, PHHIVE Hive, S
|
|||
#define ObGetObjectPointerCount(x) OBJECT_TO_OBJECT_HEADER(x)->PointerCount
|
||||
#define ObGetObjectHandleCount(x) OBJECT_TO_OBJECT_HEADER(x)->HandleCount
|
||||
|
||||
//
|
||||
// System Control Vector
|
||||
//
|
||||
typedef struct _CM_SYSTEM_CONTROL_VECTOR
|
||||
{
|
||||
PWCHAR KeyPath;
|
||||
PWCHAR ValueName;
|
||||
PVOID Buffer;
|
||||
PULONG BufferLength;
|
||||
PULONG Type;
|
||||
} CM_SYSTEM_CONTROL_VECTOR, *PCM_SYSTEM_CONTROL_VECTOR;
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CmGetSystemControlValues(
|
||||
IN PVOID SystemHiveData,
|
||||
IN PCM_SYSTEM_CONTROL_VECTOR ControlVector
|
||||
);
|
||||
|
||||
extern CM_SYSTEM_CONTROL_VECTOR CmControlVector[];
|
||||
#endif /*__INCLUDE_CM_H*/
|
||||
|
|
710
reactos/ntoskrnl/cm/cmdata.c
Normal file
710
reactos/ntoskrnl/cm/cmdata.c
Normal file
|
@ -0,0 +1,710 @@
|
|||
#include "ntoskrnl.h"
|
||||
#include "cm.h"
|
||||
|
||||
/* SYSTEM CONFIGURATION VECTOR ***********************************************/
|
||||
|
||||
ULONG DummyData;
|
||||
ULONG CmNtGlobalFlag;
|
||||
ULONG CmNtCSDVersion;
|
||||
|
||||
WCHAR CmDefaultLanguageId[12];
|
||||
ULONG CmDefaultLanguageIdLength = sizeof(CmDefaultLanguageId);
|
||||
ULONG CmDefaultLanguageIdType;
|
||||
|
||||
WCHAR CmInstallUILanguageId[12];
|
||||
ULONG CmInstallUILanguageIdLength = sizeof(CmInstallUILanguageId);
|
||||
ULONG CmInstallUILanguageIdType;
|
||||
|
||||
WCHAR CmSuiteBuffer[128];
|
||||
ULONG CmSuiteBufferLength = sizeof(CmSuiteBuffer);
|
||||
ULONG CmSuiteBufferType;
|
||||
|
||||
extern LANGID PsInstallUILanguageId;
|
||||
extern LANGID PsDefaultUILanguageId;
|
||||
|
||||
//CMHIVE CmControlHive;
|
||||
|
||||
CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
|
||||
{
|
||||
{
|
||||
L"Session Manager",
|
||||
L"ProtectionMode",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"ObjectSecurityMode",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"LUIDDeviceMapsDisabled",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"LSA",
|
||||
L"AuditBaseDirectories",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"LSA",
|
||||
L"AuditBaseObjects",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"LSA\\audit",
|
||||
L"ProcessAccessesToAudit",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"TimeZoneInformation",
|
||||
L"ActiveTimeBias",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"TimeZoneInformation",
|
||||
L"Bias",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"TimeZoneInformation",
|
||||
L"RealTimeIsUniversal",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"GlobalFlag",
|
||||
&CmNtGlobalFlag,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PagedPoolQuota",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"NonPagedPoolQuota",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PagingFileQuota",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"AllocationPreference",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"DynamicMemory",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"Mirroring",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"Mirroring",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SystemViewSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SessionViewSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SessionImageSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SessionPoolSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PoolUsageMaximum",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"MapAllocationFragment",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PagedPoolSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"NonPagedPoolSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"NonPagedPoolMaximumPercent",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"LargeSystemCache",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"LargeStackSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SystemPages",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"LowMemoryThreshold",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"HighMemoryThreshold",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"DisablePagingExecutive",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"ModifiedPageLife",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SecondLevelDataCache",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"ClearPageFileAtShutdown",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PoolTagSmallTableSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PoolTagBigTableSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PoolTag",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"PoolTagOverruns",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"SnapUnloads",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"ProtectNonPagedPool",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"TrackLockedPages",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"TrackPtes",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"VerifyDrivers",
|
||||
&DummyData,
|
||||
&DummyData,
|
||||
&DummyData
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"VerifyDriverLevel",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"VerifyMode",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"LargePageMinimum",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"EnforceWriteProtection",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"MakeLowMemory",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Memory Management",
|
||||
L"WriteWatch",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Executive",
|
||||
L"AdditionalCriticalWorkerThreads",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Executive",
|
||||
L"AdditionalDelayedWorkerThreads",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Executive",
|
||||
L"PriorityQuantumMatrix",
|
||||
&DummyData,
|
||||
&DummyData,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Kernel",
|
||||
L"DpcQueueDepth",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Kernel",
|
||||
L"MinimumDpcRate",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Kernel",
|
||||
L"AdjustDpcThreshold",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Kernel",
|
||||
L"IdealDpcRate",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\I/O System",
|
||||
L"CountOperations",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\I/O System",
|
||||
L"LargeIrpStackLocations",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\I/O System",
|
||||
L"IoVerifierLevel",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"ResourceTimeoutCount",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"CriticalSectionTimeout",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"HeapSegmentReserve",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"HeapSegmentCommit",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"HeapDeCommitTotalFreeThreshold",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"HeapDeCommitFreeBlockThreshold",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"ProductOptions",
|
||||
L"ProductType",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Terminal Server",
|
||||
L"TSEnabled",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Terminal Server",
|
||||
L"TSAppCompat",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
L"ProductOptions",
|
||||
L"ProductSuite",
|
||||
CmSuiteBuffer,
|
||||
&CmSuiteBufferLength,
|
||||
&CmSuiteBufferType
|
||||
},
|
||||
|
||||
{
|
||||
L"Windows",
|
||||
L"CSDVersion",
|
||||
&CmNtCSDVersion,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Nls\\Language",
|
||||
L"Default",
|
||||
CmDefaultLanguageId,
|
||||
&CmDefaultLanguageIdLength,
|
||||
&CmDefaultLanguageIdType
|
||||
},
|
||||
|
||||
{
|
||||
L"Nls\\Language",
|
||||
L"InstallLanguage",
|
||||
CmInstallUILanguageId,
|
||||
&CmInstallUILanguageIdLength,
|
||||
&CmInstallUILanguageIdType
|
||||
},
|
||||
|
||||
{
|
||||
L"\0\0",
|
||||
L"RegistrySizeLimit",
|
||||
&DummyData,
|
||||
&DummyData,
|
||||
&DummyData
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"ForceNpxEmulation",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"PowerPolicySimulate",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager\\Executive",
|
||||
L"MaxTimeSeparationBeforeCorrect",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Windows",
|
||||
L"ShutdownTime",
|
||||
&DummyData,
|
||||
&DummyData,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"PriorityControl",
|
||||
L"Win32PrioritySeparation",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"EnableTimerWatchdog",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"Session Manager",
|
||||
L"Debugger Retries",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"WMI",
|
||||
L"MaxEventSize",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"WMI\\Trace",
|
||||
L"UsePerformanceClock",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
L"WMI\\Trace",
|
||||
L"TraceAlignment",
|
||||
&DummyData,
|
||||
NULL,
|
||||
NULL
|
||||
},
|
||||
|
||||
{
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
12
reactos/ntoskrnl/cm/newcm.c
Normal file
12
reactos/ntoskrnl/cm/newcm.c
Normal file
|
@ -0,0 +1,12 @@
|
|||
#include "ntoskrnl.h"
|
||||
#include "cm.h"
|
||||
#include "debug.h"
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CmGetSystemControlValues(IN PVOID SystemHiveData,
|
||||
IN PCM_SYSTEM_CONTROL_VECTOR ControlVector)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
@ -11,7 +11,9 @@
|
|||
|
||||
#include <ntoskrnl.h>
|
||||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
#include <debug.h>
|
||||
//#include <ntoskrnl/cm/newcm.h>
|
||||
#include "ntoskrnl/cm/cm.h"
|
||||
|
||||
/* DATA **********************************************************************/
|
||||
|
||||
|
@ -889,7 +891,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
|
|||
KiInitializeBugCheck();
|
||||
|
||||
/* Setup initial system settings (FIXME: Needs Cm Rewrite) */
|
||||
//CmGetSystemControlValues(CommandLine, &CmControlVector);
|
||||
CmGetSystemControlValues(LoaderBlock->RegistryBase, CmControlVector);
|
||||
|
||||
/* Initialize the executive at phase 0 */
|
||||
if (!ExInitSystem()) KEBUGCHECK(PHASE0_INITIALIZATION_FAILED);
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
<file>regfile.c</file>
|
||||
<file>registry.c</file>
|
||||
<file>regobj.c</file>
|
||||
<file>newcm.c</file>
|
||||
<file>cmdata.c</file>
|
||||
</directory>
|
||||
<directory name="kdbg">
|
||||
<if property="ARCH" value="i386">
|
||||
|
|
Loading…
Reference in a new issue