Source code of Windows XP (NT5)
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.

161 lines
2.6 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. UCHAR HalName[] = "ACPI 1.0 - APIC platform";
  18. extern WCHAR HalHardwareIdString[];
  19. VOID
  20. HalpInitializePciBus (
  21. VOID
  22. );
  23. VOID
  24. HalpInheritBusAddressMapInfo (
  25. VOID
  26. );
  27. VOID
  28. HalpInitBusAddressMapInfo (
  29. VOID
  30. );
  31. BOOLEAN
  32. HalpTranslateSystemBusAddress (
  33. IN PVOID BusHandler,
  34. IN PVOID RootHandler,
  35. IN PHYSICAL_ADDRESS BusAddress,
  36. IN OUT PULONG AddressSpace,
  37. OUT PPHYSICAL_ADDRESS TranslatedAddress
  38. );
  39. VOID
  40. KeFlushWriteBuffer(
  41. VOID
  42. )
  43. /*++
  44. Routine Description:
  45. KeFlushWriteBuffer
  46. Flushes all write buffers and/or other data storing or reordering
  47. hardware on the current processor. This ensures that all previous
  48. writes will occur before any new reads or writes are completed.
  49. In the simulation environment, there is no write buffer and nothing
  50. needs to be done.
  51. Arguments:
  52. None
  53. Return Value:
  54. None.
  55. --*/
  56. {
  57. __mf();
  58. return;
  59. }
  60. VOID
  61. HalReportResourceUsage (
  62. VOID
  63. )
  64. /*++
  65. Routine Description:
  66. The registery is now enabled - time to report resources which are
  67. used by the HAL.
  68. Arguments:
  69. Return Value:
  70. --*/
  71. {
  72. ANSI_STRING AHalName;
  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. RtlInitAnsiString (&AHalName, HalName);
  88. RtlAnsiStringToUnicodeString (&UHalName, &AHalName, TRUE);
  89. HalpReportResourceUsage (
  90. &UHalName, // descriptive name
  91. interfacetype
  92. );
  93. RtlFreeUnicodeString (&UHalName);
  94. //
  95. // Turn on MCA support if present
  96. //
  97. HalpMcaInit();
  98. //
  99. // Registry is now intialized, see if there are any PCI buses
  100. //
  101. HalpInitializePciBus ();
  102. #ifdef notyet
  103. //
  104. // Update supported address info with MPS bus address map
  105. //
  106. HalpInitBusAddressMapInfo ();
  107. //
  108. // Inherit any bus address mappings from MPS hierarchy descriptors
  109. //
  110. HalpInheritBusAddressMapInfo ();
  111. #endif // notyet
  112. HalpRegisterPciDebuggingDeviceInfo();
  113. }