From 82bcb975e4a21b99985e1b66f5ce68a1cd6b7cd5 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 10 May 2007 18:11:11 +0000 Subject: [PATCH] - CmpInitializeMachineDependentConfiguration: Write FeatureSet, MHZ and Update Signature to registry CentralProcessor node. svn path=/trunk/; revision=26680 --- reactos/ntoskrnl/config/i386/cmhardwr.c | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/reactos/ntoskrnl/config/i386/cmhardwr.c b/reactos/ntoskrnl/config/i386/cmhardwr.c index ef1a52356e7..a6e3015265d 100644 --- a/reactos/ntoskrnl/config/i386/cmhardwr.c +++ b/reactos/ntoskrnl/config/i386/cmhardwr.c @@ -197,6 +197,48 @@ CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBloc /* Close this new handle */ NtClose(FpuHandle); + + /* Check if we have features bits */ + if (Prcb->FeatureBits) + { + /* Add them to the registry */ + RtlInitUnicodeString(&ValueName, L"FeatureSet"); + Status = NtSetValueKey(KeyHandle, + &ValueName, + 0, + REG_DWORD, + &Prcb->FeatureBits, + sizeof(Prcb->FeatureBits)); + } + + /* Check if we detected the CPU Speed */ + if (Prcb->MHz) + { + /* Add it to the registry */ + RtlInitUnicodeString(&ValueName, L"~MHz"); + Status = NtSetValueKey(KeyHandle, + &ValueName, + 0, + REG_DWORD, + &Prcb->MHz, + sizeof(Prcb->MHz)); + } + + /* Check if we have an update signature */ + if (Prcb->UpdateSignature.QuadPart) + { + /* Add it to the registry */ + RtlInitUnicodeString(&ValueName, L"Update Signature"); + Status = NtSetValueKey(KeyHandle, + &ValueName, + 0, + REG_BINARY, + &Prcb->UpdateSignature, + sizeof(Prcb->UpdateSignature)); + } + + /* Close the processor handle */ + NtClose(KeyHandle); } }