Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. i386init.c
  5. Abstract:
  6. This module contains code to manipulate i386 hardware structures used
  7. only by the kernel.
  8. Author:
  9. Bryan Willman 22 Feb 90
  10. Revision History:
  11. --*/
  12. #include "ki.h"
  13. VOID
  14. KiInitializeMachineType (
  15. VOID
  16. );
  17. #pragma alloc_text(INIT,KiInitializeMachineType)
  18. KIRQL KiProfileIrql = PROFILE_LEVEL;
  19. ULONG KeI386MachineType = 0;
  20. BOOLEAN KeI386NpxPresent;
  21. BOOLEAN KeI386FxsrPresent;
  22. ULONG KeI386ForceNpxEmulation;
  23. ULONG KiMXCsrMask;
  24. ULONG KeI386CpuType;
  25. ULONG KeI386CpuStep;
  26. PVOID Ki387RoundModeTable; // R3 emulators RoundingMode vector table
  27. ULONG KiBootFeatureBits;
  28. ULONG KiInBiosCall = FALSE;
  29. ULONG FlagState = 0; // bios calls shouldn't automatically turn interrupts back on.
  30. KTRAP_FRAME KiBiosFrame;
  31. #if DBG
  32. UCHAR MsgDpcTrashedEsp[] = "\n*** DPC routine %lx trashed ESP\n";
  33. UCHAR MsgDpcTimeout[] = "\n*** DPC routine > 1 sec --- This is not a break in KeUpdateSystemTime\n";
  34. UCHAR MsgISRTimeout[] = "\n*** ISR at %lx took over .5 second\n";
  35. ULONG KiISRTimeout = 55;
  36. #endif
  37. UCHAR MsgISROverflow[] = "\n*** ISR at %lx appears to have an interrupt storm\n";
  38. USHORT KiISROverflow = 30000;
  39. VOID
  40. KiInitializeMachineType (
  41. VOID
  42. )
  43. /*++
  44. Routine Description:
  45. This function initializes machine type, i.e. MCA, ABIOS, ISA
  46. or EISA.
  47. N.B. This is a temporary routine. machine type:
  48. Byte 0 - Machine Type, ISA, EISA or MCA
  49. Byte 1 - CPU type, i386 or i486
  50. Byte 2 - Cpu Step, A or B ... etc.
  51. Highest bit indicates if NPX is present.
  52. Arguments:
  53. None.
  54. Return Value:
  55. None.
  56. --*/
  57. {
  58. KeI386MachineType = KeLoaderBlock->u.I386.MachineType & 0x000ff;
  59. }