Windows NT 4.0 source code leak
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.

138 lines
3.1 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. busdata.c
  5. Abstract:
  6. This module contains get/set bus data routines.
  7. Author:
  8. Darryl E. Havens (darrylh) 11-Apr-1990
  9. Environment:
  10. Kernel mode
  11. Revision History:
  12. James Livingston 29-Apr-1994
  13. Adapted from Avanti module for Mikasa.
  14. --*/
  15. #include "halp.h"
  16. //
  17. // External Function Prototypes
  18. //
  19. ULONG
  20. HalpNoBusData (
  21. IN PVOID BusHandler,
  22. IN PVOID RootHandler,
  23. IN ULONG SlotNumber,
  24. IN PVOID Buffer,
  25. IN ULONG Offset,
  26. IN ULONG Length
  27. );
  28. #ifdef ALLOC_PRAGMA
  29. #pragma alloc_text(INIT,HalpRegisterInternalBusHandlers)
  30. #endif
  31. VOID
  32. HalpRegisterInternalBusHandlers (
  33. VOID
  34. )
  35. /*++
  36. Routine Description:
  37. This function registers the bushandlers for buses on the system
  38. that will always be present on the system.
  39. Arguments:
  40. None.
  41. Return Value:
  42. None.
  43. --*/
  44. {
  45. PBUS_HANDLER Bus;
  46. //
  47. // Initalize BusHandler data before registering any handlers
  48. //
  49. HalpInitBusHandler ();
  50. //
  51. // Build the processor internal bus 0
  52. //
  53. HaliRegisterBusHandler (ProcessorInternal, // Bus Type
  54. -1, // No config space
  55. 0, // Bus Number
  56. -1, // No parent bus type
  57. 0, // No parent bus number
  58. 0, // No extension data
  59. NULL, // No install handler
  60. &Bus); // Bushandler return
  61. Bus->GetInterruptVector = HalpGetSystemInterruptVector;
  62. //
  63. // Build internal-bus 0, or system level bus
  64. //
  65. HaliRegisterBusHandler (Internal, // Bus Type
  66. -1, // No config space
  67. 0, // Bus Number
  68. -1, // No parent bus type
  69. 0, // No parent bus number
  70. 0, // No extension data
  71. NULL, // No install handler
  72. &Bus); // Bushandler return
  73. Bus->GetInterruptVector = HalpGetSystemInterruptVector;
  74. Bus->TranslateBusAddress = HalpTranslateSystemBusAddress;
  75. //
  76. // Build Isa/Eisa bus #0
  77. //
  78. HaliRegisterBusHandler (Eisa, // Bus Type
  79. EisaConfiguration, // Config space type
  80. 0, // Internal bus #0
  81. Internal, // Parent bus type
  82. 0, // Parent bus number
  83. 0, // No extension data
  84. NULL, // No install handler
  85. &Bus); // Bushandler return
  86. Bus->GetBusData = HalpGetEisaData;
  87. Bus->AdjustResourceList = HalpAdjustEisaResourceList;
  88. HaliRegisterBusHandler (Isa, // Bus Type
  89. -1, // No config space
  90. 0, // Internal bus #0
  91. Eisa, // Parent bus type
  92. 0, // Parent bus number
  93. 0, // No extension data
  94. NULL, // No install handler
  95. &Bus); // Bushandler returne
  96. Bus->GetBusData = HalpNoBusData;
  97. Bus->AdjustResourceList = HalpAdjustIsaResourceList;
  98. }