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.

107 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1989-2000 Microsoft Corporation
  3. Component Name:
  4. HALIA64
  5. Module Name:
  6. xxhal.c
  7. Abstract:
  8. This module determines the HAL IA64 common features based on processor
  9. and platform types. This exposes the processor and system features
  10. that the HAL would use to enable / disable its own features.
  11. By the mean of HAL exported interfaces or exported global variables,
  12. the HAL exposes its supported features.
  13. Author:
  14. David N. Cutler (davec) 5-Mar-1989
  15. Environment:
  16. ToBeSpecified
  17. Revision History:
  18. 3/23/2000 Thierry Fevrier (v-thief@microsoft.com):
  19. Initial version
  20. --*/
  21. #include "halp.h"
  22. extern ULONG HalpMaxCPEImplemented;
  23. extern HALP_SAL_PAL_DATA HalpSalPalData;
  24. #ifdef ALLOC_PRAGMA
  25. #pragma alloc_text(INIT,HalpGetFeatureBits)
  26. #endif
  27. ULONG
  28. HalpGetFeatureBits (
  29. VOID
  30. )
  31. {
  32. ULONG bits = HALP_FEATURE_INIT;
  33. PKPRCB prcb = KeGetCurrentPrcb();
  34. //
  35. // Determine Processor type and System type.
  36. //
  37. // For the processor, this could come from:
  38. // - PAL_BUS_GET_FEATURES
  39. // - PAL_DEBUG_INFO ??
  40. // - PAL_FREQ_BASE
  41. // - PAL_FREQ_RATIOS
  42. // - PAL_PERF_MON_INFO
  43. // - PAL_PROC_GET_FEATURES
  44. // - PAL_REGISTER_INFO
  45. // - PAL_VERSION
  46. //
  47. // NOT-YET...
  48. //
  49. // Determine Processor features:
  50. // like support for Processor Hardware Performance Monitor Events and
  51. // - HAL_NO_SPECULATION
  52. // - HAL_MCA_PRESENT
  53. // NOT-YET - should call PAL PERF_MON call.
  54. bits |= HAL_PERF_EVENTS;
  55. //
  56. // Determine Platform features:
  57. // like support for Platform Performance Monitor Events...
  58. //
  59. // NOT-YET - should call SAL calls.
  60. //
  61. // Default software HAL support for IA64 Errors (MCA, CMC, CPE).
  62. //
  63. // However, we already know if we found an ACPI platform interrupt entry which identifier
  64. // is PLATFORM_INT_CPE.
  65. //
  66. bits |= HAL_MCA_PRESENT;
  67. if (!(HalpSalPalData.Flags & HALP_SALPAL_CMC_BROKEN)) {
  68. bits |= HAL_CMC_PRESENT;
  69. }
  70. if (!(HalpSalPalData.Flags & HALP_SALPAL_CPE_BROKEN)) {
  71. bits |= HAL_CPE_PRESENT;
  72. }
  73. return bits;
  74. } // HalpGetFeatureBits()