ReactOS 0.4.17-dev-806-gffa4164
cmhardwr.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/config/i386/cmhardwr.c
5 * PURPOSE: Configuration Manager - Hardware-Specific Code
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9/* INCLUDES ******************************************************************/
10
11#include "ntoskrnl.h"
12#define NDEBUG
13#include "debug.h"
14
15/* GLOBALS *******************************************************************/
16
17PCHAR CmpFullCpuID = "%s Family %u Model %u Stepping %u";
19{
20 "Ver",
21 "Rev",
22 "Rel",
23 "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9",
24 "v 0", "v 1", "v 2", "v 3", "v 4", "v 5", "v 6", "v 7", "v 8", "v 9",
25 NULL
26};
27
29
30/* FUNCTIONS *****************************************************************/
31
35 IN ULONG BiosLength,
37 IN BOOLEAN FromBios)
38{
39 CHAR LastDate[11] = {0}, CurrentDate[11];
40 PCHAR p, pp;
41
42 /* Skip the signature and the magic, and loop the BIOS ROM */
43 p = BiosStart + 2;
44 pp = BiosStart + BiosLength - 5;
45 while (p < pp)
46 {
47 /* Check for xx/yy/zz which we assume to be a date */
48 if ((p[0] == '/') &&
49 (p[3] == '/') &&
50 (isdigit(p[-1])) &&
51 (isdigit(p[1])) &&
52 (isdigit(p[2])) &&
53 (isdigit(p[4])) &&
54 (isdigit(p[5])))
55 {
56 /* Copy the string proper */
57 RtlMoveMemory(&CurrentDate[5], p - 2, 5);
58
59 /* Add a 0 if the month only has one digit */
60 if (!isdigit(CurrentDate[5])) CurrentDate[5] = '0';
61
62 /* Now copy the year */
63 CurrentDate[2] = p[4];
64 CurrentDate[3] = p[5];
65 CurrentDate[4] = CurrentDate[7] = CurrentDate[10] = ANSI_NULL;
66
67 /* If the date comes from the BIOS, check if it's a 4-digit year */
68 if ((FromBios) &&
69 (isdigit(p[6])) &&
70 (isdigit(p[7])) &&
71 ((RtlEqualMemory(&p[4], "19", 2)) ||
72 (RtlEqualMemory(&p[4], "20", 2))))
73 {
74 /* Copy the year proper */
75 CurrentDate[0] = p[4];
76 CurrentDate[1] = p[5];
77 CurrentDate[2] = p[6];
78 CurrentDate[3] = p[7];
79 }
80 else
81 {
82 /* Otherwise, we'll just assume anything under 80 is 2000 */
83 if (strtoul(&CurrentDate[2], NULL, 10) < 80)
84 {
85 /* Hopefully your BIOS wasn't made in 1979 */
86 CurrentDate[0] = '2';
87 CurrentDate[1] = '0';
88 }
89 else
90 {
91 /* Anything over 80, was probably made in the 1900s... */
92 CurrentDate[0] = '1';
93 CurrentDate[1] = '9';
94 }
95 }
96
97 /* Add slashes where we previously had NULLs */
98 CurrentDate[4] = CurrentDate[7] = '/';
99
100 /* Check which date is newer */
101 if (memcmp(LastDate, CurrentDate, 10) < 0)
102 {
103 /* Found a newer date, select it */
104 RtlMoveMemory(LastDate, CurrentDate, 10);
105 }
106
107 p += 2;
108 }
109 p++;
110 }
111
112 /* Make sure we found a date */
113 if (LastDate[0])
114 {
115 /* Copy the year at the pp, and keep only the last two digits */
116 RtlMoveMemory(BiosDate, &LastDate[5], 5);
117 BiosDate[5] = '/';
118 BiosDate[6] = LastDate[2];
119 BiosDate[7] = LastDate[3];
120 BiosDate[8] = ANSI_NULL;
121 return TRUE;
122 }
123
124 /* No date found, return empty string */
125 BiosDate[0] = ANSI_NULL;
126 return FALSE;
127}
128
130NTAPI
132 IN ULONG BiosLength,
134{
135 CHAR Buffer[128];
136 PCHAR p, pp;
137 USHORT i;
138
139 /* Check if we were given initial data for the search */
140 if (BiosStart)
141 {
142 /* Save it for later use */
143 CmpBiosBegin = BiosStart;
144 CmpBiosSearchStart = BiosStart + 1;
145 CmpBiosSearchEnd = BiosStart + BiosLength - 2;
146 }
147
148 /* Now loop the BIOS area */
149 for (;;)
150 {
151 /* Start an initial search looking for numbers and periods */
152 pp = NULL;
154 {
155 /* Check if we have an "x.y" version string */
156 if ((*CmpBiosSearchStart == '.') &&
157 (*(CmpBiosSearchStart + 1) >= '0') &&
158 (*(CmpBiosSearchStart + 1) <= '9') &&
159 (*(CmpBiosSearchStart - 1) >= '0') &&
160 (*(CmpBiosSearchStart - 1) <= '9'))
161 {
162 /* Start looking in this area for the actual BIOS version */
164 break;
165 }
166 else
167 {
168 /* Keep searching */
170 }
171 }
172
173 /* Break out if we're went past the BIOS area */
175
176 /* Move to the next 2 bytes */
178
179 /* Null-terminate our scratch buffer and start the string here */
180 Buffer[127] = ANSI_NULL;
181 p = &Buffer[127];
182
183 /* Go back one character since we're doing this backwards */
184 pp--;
185
186 /* Loop the identifier we found as long as it's valid */
187 i = 0;
188 while ((i++ < 127) &&
189 (pp >= CmpBiosBegin) &&
190 (*pp >= ' ') &&
191 (*pp != '$'))
192 {
193 /* Copy the character */
194 *--p = *pp--;
195 }
196
197 /* Go past the last character since we went backwards */
198 pp++;
199
200 /* Loop the strings we recognize */
201 for (i = 0; CmpBiosStrings[i]; i++)
202 {
203 /* Check if a match was found */
204 if (strstr(p, CmpBiosStrings[i])) goto Match;
205 }
206 }
207
208Match:
209 /* Skip until we find a space */
210 for (; *pp == ' '; pp++);
211
212 /* Loop the final string */
213 i = 0;
214 do
215 {
216 /* Copy the character into the final string */
217 BiosVersion[i] = *pp++;
218 } while ((++i < 127) &&
219 (pp <= (CmpBiosSearchEnd + 1)) &&
220 (*pp >= ' ') &&
221 (*pp != '$'));
222
223 /* Null-terminate the version string */
225 return TRUE;
226}
227
229NTAPI
231{
232 UNICODE_STRING KeyName, ValueName, Data, SectionName;
234 ULONG HavePae, Length, TotalLength = 0, i, Disposition;
237 HANDLE KeyHandle, BiosHandle, SystemHandle, FpuHandle, SectionHandle;
239 CHAR Buffer[128];
240 CPU_INFO CpuInfo;
241 ULONG ExtendedId;
242 PKPRCB Prcb;
243 USHORT IndexTable[MaximumType + 1] = {0};
244 ANSI_STRING TempString;
245 PCHAR PartialString = NULL, BiosVersion;
246 CHAR CpuString[48];
248 LARGE_INTEGER ViewBase = {{0, 0}};
249 ULONG_PTR VideoRomBase;
250 PCHAR CurrentVersion;
253
254 /* Open the SMSS Memory Management key */
256 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\"
257 L"Control\\Session Manager\\Memory Management");
259 &KeyName,
261 NULL,
262 NULL);
264 if (NT_SUCCESS(Status))
265 {
266 /* Detect if PAE is enabled */
267 HavePae = SharedUserData->ProcessorFeatures[PF_PAE_ENABLED];
268
269 /* Set the value */
270 RtlInitUnicodeString(&ValueName, L"PhysicalAddressExtension");
272 &ValueName,
273 0,
274 REG_DWORD,
275 &HavePae,
276 sizeof(HavePae));
277
278 /* Close the key */
280 }
281
282 /* Open the hardware description key */
284 L"\\Registry\\Machine\\Hardware\\Description\\System");
286 &KeyName,
288 NULL,
289 NULL);
290 Status = NtOpenKey(&SystemHandle, KEY_READ | KEY_WRITE, &ObjectAttributes);
291 if (!NT_SUCCESS(Status))
292 return Status;
293
294 /* Create the BIOS Information key */
296 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\"
297 L"Control\\BIOSINFO");
299 &KeyName,
301 NULL,
302 NULL);
303 Status = NtCreateKey(&BiosHandle,
306 0,
307 NULL,
309 &Disposition);
310 if (!NT_SUCCESS(Status))
311 {
312 NtClose(SystemHandle);
313 return Status;
314 }
315
316 /* Create the CPU Key, and check if it already existed */
317 RtlInitUnicodeString(&KeyName, L"CentralProcessor");
319 &KeyName,
321 SystemHandle,
322 NULL);
326 0,
327 NULL,
328 0,
329 &Disposition);
331
332 /* The key shouldn't already exist */
334 {
335 /* Allocate the configuration data for cmconfig.c */
338 TAG_CM);
340 {
341 // FIXME: Cleanup stuff!!
343 }
344
345 /* Loop all CPUs */
346 for (i = 0; i < KeNumberProcessors; i++)
347 {
348#ifdef _M_AMD64
349 PCHAR FamilyId;
350#endif
351 /* Get the PRCB */
352 Prcb = KiProcessorBlock[i];
353
354 /* Setup the configuration entry for the processor */
355 RtlZeroMemory(&ConfigData, sizeof(ConfigData));
358 ConfigData.ComponentEntry.Key = i;
360 ConfigData.ComponentEntry.Identifier = Buffer;
361
362#if defined(_M_IX86)
363 /* Check if the CPU doesn't support CPUID */
364 if (!Prcb->CpuID)
365 {
366 /* Build 80x86-style string for older CPUs */
368 "80%u86-%c%x",
369 Prcb->CpuType,
370 (Prcb->CpuStep >> 8) + 'A',
371 Prcb->CpuStep & 0xff);
372 }
373 else
374 {
375 /* Build full ID string for newer CPUs */
378 "x86",
379 Prcb->CpuType,
380 (Prcb->CpuStep >> 8),
381 Prcb->CpuStep & 0xff);
382 }
383#elif defined(_M_AMD64)
384 if (Prcb->CpuVendor == CPU_VIA)
385 {
386 /* This is VIA64 family */
387 FamilyId = "VIA64";
388 }
389 else if (Prcb->CpuVendor == CPU_AMD)
390 {
391 /* This is AMD64 family */
392 FamilyId = "AMD64";
393 }
394 else
395 {
396 /* This is generic EM64T family */
397 FamilyId = "EM64T";
398 }
399
400 /* ID string has the same style for all 64-bit CPUs */
403 FamilyId,
404 Prcb->CpuType,
405 (Prcb->CpuStep >> 8),
406 Prcb->CpuStep & 0xff);
407#else
408#error Unknown architecture
409#endif
410
411 /* Save the ID string length now that we've created it */
413
414 /* Initialize the registry configuration node for it */
415 Status = CmpInitializeRegistryNode(&ConfigData,
416 SystemHandle,
417 &KeyHandle,
419 0xFFFFFFFF,
420 IndexTable);
421 if (!NT_SUCCESS(Status))
422 {
423 NtClose(BiosHandle);
424 NtClose(SystemHandle);
425 return Status;
426 }
427
428 /* Check if we have an FPU */
430 {
431 /* Setup the configuration entry for the FPU */
432 RtlZeroMemory(&ConfigData, sizeof(ConfigData));
435 ConfigData.ComponentEntry.Key = i;
437 ConfigData.ComponentEntry.Identifier = Buffer;
438
439 /* For 386 CPUs, the standard FPU model is the 80387 */
440 if (Prcb->CpuType == 3) strcpy(Buffer, "80387");
441
442 /* Save the ID string length now that we've created it */
444
445 /* Initialize the registry configuration node for it */
446 Status = CmpInitializeRegistryNode(&ConfigData,
447 SystemHandle,
448 &FpuHandle,
450 0xFFFFFFFF,
451 IndexTable);
452 if (!NT_SUCCESS(Status))
453 {
454 /* We failed, close all the opened handles and return */
456 NtClose(BiosHandle);
457 NtClose(SystemHandle);
458 return Status;
459 }
460
461 /* Close this new handle */
462 NtClose(FpuHandle);
463
464 /* Stay on this CPU only */
466 if (!Prcb->CpuID)
467 {
468 /* Uh oh, no CPUID! Should not happen as we don't support 80386 and older 80486 */
469 ASSERT(FALSE);
470 }
471 else
472 {
473 /* Check if we have extended CPUID that supports name ID */
474 KiCpuId(&CpuInfo, 0x80000000);
475 ExtendedId = CpuInfo.Eax;
476 if (ExtendedId >= 0x80000004)
477 {
478 /* Do all the CPUIDs required to get the full name */
479 PartialString = CpuString;
480 for (ExtendedId = 2; ExtendedId <= 4; ExtendedId++)
481 {
482 /* Do the CPUID and save the name string */
483 KiCpuId(&CpuInfo, 0x80000000 | ExtendedId);
484 ((PULONG)PartialString)[0] = CpuInfo.Eax;
485 ((PULONG)PartialString)[1] = CpuInfo.Ebx;
486 ((PULONG)PartialString)[2] = CpuInfo.Ecx;
487 ((PULONG)PartialString)[3] = CpuInfo.Edx;
488
489 /* Go to the next name string */
490 PartialString += 16;
491 }
492
493 /* Null-terminate it */
494 CpuString[47] = ANSI_NULL;
495 }
496 }
497
498 /* Go back to user affinity */
500
501 /* Check if we have a CPU Name */
502 if (PartialString)
503 {
504 /* Convert it to Unicode */
505 RtlInitAnsiString(&TempString, CpuString);
507 {
508 /* Add it to the registry */
509 RtlInitUnicodeString(&ValueName, L"ProcessorNameString");
511 &ValueName,
512 0,
513 REG_SZ,
514 Data.Buffer,
515 Data.Length + sizeof(UNICODE_NULL));
516
517 /* ROS: Save a copy for Jira reporting */
519 KeRosProcessorName.Length = 0; /* Do not fail for this */
520
521 /* Free the temporary buffer */
523 }
524 }
525
526 /* Check if we had a Vendor ID */
527 if (Prcb->VendorString[0])
528 {
529 /* Convert it to Unicode */
530 RtlInitAnsiString(&TempString, Prcb->VendorString);
532 {
533 /* Add it to the registry */
534 RtlInitUnicodeString(&ValueName, L"VendorIdentifier");
536 &ValueName,
537 0,
538 REG_SZ,
539 Data.Buffer,
540 Data.Length + sizeof(UNICODE_NULL));
541
542 /* Free the temporary buffer */
544 }
545 }
546
547 /* Check if we have features bits */
548 if (Prcb->FeatureBits)
549 {
550 /* Add them to the registry */
551 RtlInitUnicodeString(&ValueName, L"FeatureSet");
553 &ValueName,
554 0,
555 REG_DWORD,
556 &Prcb->FeatureBits,
557 sizeof(Prcb->FeatureBits));
558 }
559
560 /* Check if we detected the CPU Speed */
561 if (Prcb->MHz)
562 {
563 /* Add it to the registry */
566 &ValueName,
567 0,
568 REG_DWORD,
569 &Prcb->MHz,
570 sizeof(Prcb->MHz));
571 }
572
573 /* Check if we have an update signature */
574 if (Prcb->UpdateSignature.QuadPart)
575 {
576 /* Add it to the registry */
577 RtlInitUnicodeString(&ValueName, L"Update Signature");
579 &ValueName,
580 0,
582 &Prcb->UpdateSignature,
583 sizeof(Prcb->UpdateSignature));
584 }
585
586 /* Close the processor handle */
588
589 /* FIXME: Detect CPU mismatches */
590 }
591 }
592
593 /* Free the configuration data */
595 }
596
597 /* Open physical memory */
598 RtlInitUnicodeString(&SectionName, L"\\Device\\PhysicalMemory");
600 &SectionName,
602 NULL,
603 NULL);
604 Status = ZwOpenSection(&SectionHandle,
607 if (!NT_SUCCESS(Status))
608 {
609 /* We failed, close all the opened handles and return */
610 // NtClose(KeyHandle);
611 NtClose(BiosHandle);
612 NtClose(SystemHandle);
613 /* 'Quickie' closes KeyHandle */
614 goto Quickie;
615 }
616
617 /* Map the first 1KB of memory to get the IVT */
619 Status = ZwMapViewOfSection(SectionHandle,
622 0,
623 ViewSize,
624 &ViewBase,
625 &ViewSize,
626 ViewUnmap,
629 if (!NT_SUCCESS(Status))
630 {
631 /* Assume default */
632 VideoRomBase = 0xC0000;
633 }
634 else
635 {
636 /* Calculate the base address from the vector */
637 VideoRomBase = (*((PULONG)BaseAddress + 0x10) >> 12) & 0xFFFF0;
638 VideoRomBase += *((PULONG)BaseAddress + 0x10) & 0xFFF0;
639
640 /* Now get to the actual ROM Start and make sure it's not invalid */
641 VideoRomBase &= 0xFFFF8000;
642 if (VideoRomBase < 0xC0000) VideoRomBase = 0xC0000;
643
644 /* And unmap the section */
645 ZwUnmapViewOfSection(NtCurrentProcess(), BaseAddress);
646 }
647
648 /* Allocate the BIOS version buffer */
650
651 /* Map 64KB of BIOS ROM */
653 ViewSize = 16 * PAGE_SIZE;
654 ViewBase.QuadPart = 0xF0000;
655
656 Status = ZwMapViewOfSection(SectionHandle,
659 0,
660 ViewSize,
661 &ViewBase,
662 &ViewSize,
663 ViewUnmap,
666 if (NT_SUCCESS(Status))
667 {
668 /* Scan the ROM to get the BIOS date */
670 {
671 /* Convert it to Unicode */
672 RtlInitAnsiString(&TempString, Buffer);
674 {
675 /* Write the date into the registry */
676 RtlInitUnicodeString(&ValueName, L"SystemBiosDate");
677 Status = NtSetValueKey(SystemHandle,
678 &ValueName,
679 0,
680 REG_SZ,
681 Data.Buffer,
682 Data.Length + sizeof(UNICODE_NULL));
683
684 /* Free the string */
686 }
687
688 if (BiosHandle)
689 {
690 /* Get the BIOS date identifier */
691 RtlCopyMemory(Buffer, (PCHAR)BaseAddress + (16 * PAGE_SIZE - 11), 8);
692 Buffer[8] = ANSI_NULL;
693
694 /* Convert it to unicode */
695 RtlInitAnsiString(&TempString, Buffer);
697 if (NT_SUCCESS(Status))
698 {
699 /* Save it to the registry */
700 Status = NtSetValueKey(BiosHandle,
701 &ValueName,
702 0,
703 REG_SZ,
704 Data.Buffer,
705 Data.Length + sizeof(UNICODE_NULL));
706
707 /* ROS: Save a copy for Jira reporting */
709 KeRosBiosDate.Length = 0; /* Do not fail for this */
710
711 /* Free the string */
713 }
714
715 /* Close the bios information handle */
716 NtClose(BiosHandle);
717 }
718 }
719
720 /* Get the BIOS version */
722 {
723 /* Start at the beginning of our buffer */
724 CurrentVersion = BiosVersion;
725 do
726 {
727 /* Convert to Unicode */
728 RtlInitAnsiString(&TempString, Buffer);
730 if (!NT_SUCCESS(Status))
731 break;
732
733 /* Calculate the length of this string and copy it in */
734 Length = Data.Length + sizeof(UNICODE_NULL);
735 RtlMoveMemory(CurrentVersion, Data.Buffer, Length);
736
737 /* Free the unicode string */
739
740 /* Update the total length and see if we're out of space */
742 if (TotalLength + 256 + sizeof(UNICODE_NULL) > PAGE_SIZE)
743 {
744 /* One more string would push us out, so stop here */
745 break;
746 }
747
748 /* Go to the next string inside the multi-string buffer */
749 CurrentVersion += Length;
750
751 /* Query the next BIOS version */
752 } while (CmpGetBiosVersion(NULL, 0, Buffer));
753
754 /* Check if we found any strings at all */
755 if (TotalLength)
756 {
757 /* Add the final null-terminator */
758 *(PWSTR)CurrentVersion = UNICODE_NULL;
759 TotalLength += sizeof(UNICODE_NULL);
760
761 /* Write the BIOS version to the registry */
762 RtlInitUnicodeString(&ValueName, L"SystemBiosVersion");
763 Status = NtSetValueKey(SystemHandle,
764 &ValueName,
765 0,
769
770 /* ROS: Save a copy for Jira reporting */
772 KeRosBiosVersion.Length = 0; /* Do not fail for this */
773 }
774 }
775
776 /* Unmap the section */
777 ZwUnmapViewOfSection(NtCurrentProcess(), BaseAddress);
778 }
779
780 /* Map 32KB of Video BIOS */
782 ViewSize = 8 * PAGE_SIZE;
783 ViewBase.QuadPart = VideoRomBase;
784
785 Status = ZwMapViewOfSection(SectionHandle,
788 0,
789 ViewSize,
790 &ViewBase,
791 &ViewSize,
792 ViewUnmap,
795 if (NT_SUCCESS(Status))
796 {
797 /* Scan the ROM to get the BIOS date */
799 {
800 /* Convert it to Unicode */
801 RtlInitAnsiString(&TempString, Buffer);
803 {
804 /* Write the date into the registry */
805 RtlInitUnicodeString(&ValueName, L"VideoBiosDate");
806 Status = NtSetValueKey(SystemHandle,
807 &ValueName,
808 0,
809 REG_SZ,
810 Data.Buffer,
811 Data.Length + sizeof(UNICODE_NULL));
812
813 /* ROS: Save a copy for Jira reporting */
815 KeRosVideoBiosDate.Length = 0; /* Do not fail for this */
816
817 /* Free the string */
819 }
820 }
821
822 /* Get the Video BIOS version */
824 {
825 /* Start at the beginning of our buffer */
826 CurrentVersion = BiosVersion;
827 do
828 {
829 /* Convert to Unicode */
830 RtlInitAnsiString(&TempString, Buffer);
831 if (!NT_SUCCESS(RtlAnsiStringToUnicodeString(&Data, &TempString, TRUE)))
832 break;
833
834 /* Calculate the length of this string and copy it in */
835 Length = Data.Length + sizeof(UNICODE_NULL);
836 RtlMoveMemory(CurrentVersion, Data.Buffer, Length);
837
838 /* Free the unicode string */
840
841 /* Update the total length and see if we're out of space */
843 if (TotalLength + 256 + sizeof(UNICODE_NULL) > PAGE_SIZE)
844 {
845 /* One more string would push us out, so stop here */
846 break;
847 }
848
849 /* Go to the next string inside the multi-string buffer */
850 CurrentVersion += Length;
851
852 /* Query the next BIOS version */
853 } while (CmpGetBiosVersion(NULL, 0, Buffer));
854
855 /* Check if we found any strings at all */
856 if (TotalLength)
857 {
858 /* Add the final null-terminator */
859 *(PWSTR)CurrentVersion = UNICODE_NULL;
860 TotalLength += sizeof(UNICODE_NULL);
861
862 /* Write the BIOS version to the registry */
863 RtlInitUnicodeString(&ValueName, L"VideoBiosVersion");
864 Status = NtSetValueKey(SystemHandle,
865 &ValueName,
866 0,
870
871 /* ROS: Save a copy for Jira reporting */
873 KeRosVideoBiosVersion.Length = 0; /* Do not fail for this */
874 }
875 }
876
877 /* Unmap the section */
878 ZwUnmapViewOfSection(NtCurrentProcess(), BaseAddress);
879 }
880
881 /* Close the section */
882 ZwClose(SectionHandle);
883
884 /* Free the BIOS version string buffer */
886
887Quickie:
888 /* Close the processor handle */
890 return STATUS_SUCCESS;
891}
#define isdigit(c)
Definition: acclib.h:68
unsigned char BOOLEAN
Definition: actypes.h:127
NTSTATUS NTAPI CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: cmhardwr.c:21
LONG NTSTATUS
Definition: precomp.h:26
static const CHAR BiosVersion[]
Definition: bios32.c:139
static const CHAR BiosDate[]
Definition: bios32.c:141
UNICODE_STRING KeRosVideoBiosVersion
Definition: bug.c:38
UNICODE_STRING KeRosProcessorName
Definition: bug.c:37
UNICODE_STRING KeRosBiosVersion
Definition: bug.c:37
UNICODE_STRING KeRosBiosDate
Definition: bug.c:37
UNICODE_STRING KeRosVideoBiosDate
Definition: bug.c:38
Definition: bufpool.h:45
NTSTATUS NTAPI CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, IN HANDLE NodeHandle, OUT PHANDLE NewHandle, IN INTERFACE_TYPE InterfaceType, IN ULONG BusNumber, IN PUSHORT DeviceIndexTable)
Definition: cmconfig.c:20
PCM_FULL_RESOURCE_DESCRIPTOR CmpConfigurationData
Definition: cmdata.c:37
ULONG CmpConfigurationAreaSize
Definition: cmdata.c:36
#define TAG_CM
Definition: cmlib.h:219
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
_ACRTIMP __msvcrt_ulong __cdecl strtoul(const char *, char **, int)
Definition: string.c:1864
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
_ACRTIMP char *__cdecl strstr(const char *, const char *)
Definition: string.c:3420
#define L(x)
Definition: resources.c:13
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define PagedPool
Definition: env_spec_w32.h:308
Status
Definition: gdiplustypes.h:24
GLfloat GLfloat p
Definition: glext.h:8902
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PCHAR CmpBiosSearchEnd
Definition: cmhardwr.c:28
PCHAR CmpFullCpuID
Definition: cmhardwr.c:17
PCHAR CmpBiosBegin
Definition: cmhardwr.c:28
BOOLEAN NTAPI CmpGetBiosDate(IN PCHAR BiosStart, IN ULONG BiosLength, IN PCHAR BiosDate, IN BOOLEAN FromBios)
Definition: cmhardwr.c:34
BOOLEAN NTAPI CmpGetBiosVersion(IN PCHAR BiosStart, IN ULONG BiosLength, IN PCHAR BiosVersion)
Definition: cmhardwr.c:131
PCHAR CmpBiosSearchStart
Definition: cmhardwr.c:28
PCHAR CmpBiosStrings[]
Definition: cmhardwr.c:18
#define RtlEqualMemory(dst, src, len)
Definition: kdvm.h:18
#define REG_SZ
Definition: layer.c:22
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
#define sprintf
Definition: sprintf.c:45
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:115
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
@ CPU_VIA
Definition: ketypes.h:101
@ CPU_AMD
Definition: ketypes.h:99
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:56
FORCEINLINE KAFFINITY AFFINITY_MASK(ULONG Index)
Definition: kefuncs.h:39
NTSYSAPI NTSTATUS NTAPI ZwOpenSection(_Out_ PHANDLE SectionHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID * BaseAddress
Definition: mmfuncs.h:408
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID _In_ ULONG_PTR _In_ SIZE_T _Inout_opt_ PLARGE_INTEGER _Inout_ PSIZE_T ViewSize
Definition: mmfuncs.h:412
#define MEM_DOS_LIM
Definition: mmtypes.h:90
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: ntapi.c:336
NTSYSAPI NTSTATUS NTAPI NtSetValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize)
Definition: ntapi.c:859
#define REG_BINARY
Definition: nt_native.h:1499
#define PAGE_READWRITE
Definition: nt_native.h:1307
#define KEY_ALL_ACCESS
Definition: nt_native.h:1044
#define SECTION_ALL_ACCESS
Definition: nt_native.h:1296
#define KEY_READ
Definition: nt_native.h:1026
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NtCurrentProcess()
Definition: nt_native.h:1660
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1060
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1087
#define REG_MULTI_SZ
Definition: nt_native.h:1504
@ ViewUnmap
Definition: nt_native.h:1282
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3429
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define KEY_WRITE
Definition: nt_native.h:1034
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NTSTATUS NTAPI NtCreateKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL)
Definition: ntapi.c:240
WCHAR * PWCH
Definition: ntbasedef.h:422
#define UNICODE_NULL
#define ANSI_NULL
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
ULONG KeI386NpxPresent
Definition: cpu.c:28
PKPRCB KiProcessorBlock[]
Definition: krnlinit.c:31
CCHAR KeNumberProcessors
Definition: processor.c:19
unsigned short USHORT
Definition: pedump.c:61
char CHAR
Definition: pedump.c:57
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
@ InterfaceTypeUndefined
Definition: restypes.h:120
#define REG_DWORD
Definition: sdbapi.c:615
@ ProcessorClass
Definition: arc.h:100
@ CentralProcessor
Definition: arc.h:114
@ MaximumType
Definition: arc.h:154
@ FloatingPointProcessor
Definition: arc.h:115
strcpy
Definition: string.h:131
#define SharedUserData
#define STATUS_SUCCESS
Definition: shellext.h:65
CONFIGURATION_COMPONENT ComponentEntry
Definition: arc.h:287
CONFIGURATION_TYPE Type
Definition: arc.h:161
ULONG IdentifierLength
Definition: arc.h:168
CONFIGURATION_CLASS Class
Definition: arc.h:160
CHAR CpuType
Definition: ketypes.h:684
USHORT CpuStep
Definition: ketypes.h:689
CHAR CpuID
Definition: ketypes.h:685
UCHAR CpuVendor
Definition: ketypes.h:704
UCHAR VendorString[13]
Definition: ketypes.h:901
ULONG FeatureBits
Definition: ketypes.h:903
UINT64 SetMember
Definition: ketypes.h:682
LARGE_INTEGER UpdateSignature
Definition: ketypes.h:904
ULONG MHz
Definition: ketypes.h:699
VOID NTAPI KeSetSystemAffinityThread(IN KAFFINITY Affinity)
Definition: thrdobj.c:1107
VOID NTAPI KeRevertToUserAffinityThread(VOID)
Definition: thrdobj.c:1021
uint16_t * PWSTR
Definition: typedefs.h:56
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
ULONG Ebx
Definition: ketypes.h:402
ULONG Eax
Definition: ketypes.h:401
ULONG Ecx
Definition: ketypes.h:403
ULONG Edx
Definition: ketypes.h:404
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ ULONG TotalLength
Definition: usbdlib.h:158
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
Definition: wdfdevice.h:2705
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
#define PF_PAE_ENABLED
Definition: ketypes.h:185