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.

159 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 1995 Intel Corporation
  3. Module Name:
  4. i64bus.c
  5. Abstract:
  6. This module implements the routines to support the management
  7. of bus resources and translation of bus addresses.
  8. Author:
  9. 14-Apr-1995
  10. Environment:
  11. Kernel mode
  12. Revision History:
  13. Based on simbus.c
  14. --*/
  15. #include "halp.h"
  16. #include "hal.h"
  17. const UCHAR HalName[] = "ACPI 2.0 - APIC platform";
  18. #define HalName L"ACPI 2.0 - APIC platform"
  19. const ULONG HalDisableFirmwareMapper = 1;
  20. VOID
  21. HalpInitializePciBus (
  22. VOID
  23. );
  24. VOID
  25. HalpInheritBusAddressMapInfo (
  26. VOID
  27. );
  28. VOID
  29. HalpInitBusAddressMapInfo (
  30. VOID
  31. );
  32. BOOLEAN
  33. HalpTranslateSystemBusAddress (
  34. IN PVOID BusHandler,
  35. IN PVOID RootHandler,
  36. IN PHYSICAL_ADDRESS BusAddress,
  37. IN OUT PULONG AddressSpace,
  38. OUT PPHYSICAL_ADDRESS TranslatedAddress
  39. );
  40. VOID
  41. KeFlushWriteBuffer(
  42. VOID
  43. )
  44. /*++
  45. Routine Description:
  46. KeFlushWriteBuffer
  47. Flushes all write buffers and/or other data storing or reordering
  48. hardware on the current processor. This ensures that all previous
  49. writes will occur before any new reads or writes are completed.
  50. In the simulation environment, there is no write buffer and nothing
  51. needs to be done.
  52. Arguments:
  53. None
  54. Return Value:
  55. None.
  56. --*/
  57. {
  58. __mf();
  59. return;
  60. }
  61. VOID
  62. HalReportResourceUsage (
  63. VOID
  64. )
  65. /*++
  66. Routine Description:
  67. The registery is now enabled - time to report resources which are
  68. used by the HAL.
  69. Arguments:
  70. Return Value:
  71. --*/
  72. {
  73. UNICODE_STRING UHalName;
  74. INTERFACE_TYPE interfacetype;
  75. //
  76. // Set type
  77. //
  78. switch (HalpBusType) {
  79. case MACHINE_TYPE_ISA: interfacetype = Isa; break;
  80. case MACHINE_TYPE_EISA: interfacetype = Eisa; break;
  81. case MACHINE_TYPE_MCA: interfacetype = MicroChannel; break;
  82. default: interfacetype = Internal; break;
  83. }
  84. //
  85. // Report HALs resource usage
  86. //
  87. RtlInitUnicodeString (&UHalName, HalName);
  88. HalpReportResourceUsage (
  89. &UHalName, // descriptive name
  90. interfacetype
  91. );
  92. //
  93. // Turn on MCA support if present
  94. //
  95. HalpMcaInit();
  96. //
  97. // Registry is now intialized, see if there are any PCI buses
  98. //
  99. HalpInitializePciBus ();
  100. #ifdef notyet
  101. //
  102. // Update supported address info with MPS bus address map
  103. //
  104. HalpInitBusAddressMapInfo ();
  105. //
  106. // Inherit any bus address mappings from MPS hierarchy descriptors
  107. //
  108. HalpInheritBusAddressMapInfo ();
  109. #endif // notyet
  110. HalpRegisterPciDebuggingDeviceInfo();
  111. }