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.

99 lines
2.6 KiB

4 years ago
  1. // TITLE("Clock and Eisa Interrupt Handlers")
  2. //++
  3. //
  4. // Copyright (c) 1993 Digital Equipment Corporation
  5. //
  6. // Module Name:
  7. //
  8. // gmintr.s
  9. //
  10. // Abstract:
  11. //
  12. // This module implements first level interrupt handlers for the
  13. // Gamma system.
  14. //
  15. // Author:
  16. //
  17. // Joe Notarangelo 29-Oct-1993
  18. // Steve Jenness 29-Oct-1993
  19. //
  20. // Environment:
  21. //
  22. // Kernel mode only.
  23. //
  24. // Revision History:
  25. //
  26. //--
  27. #include "halalpha.h"
  28. SBTTL("Interprocessor Interrupt")
  29. //++
  30. //
  31. // VOID
  32. // HalpGammaIpiInterrupt
  33. // )
  34. //
  35. // Routine Description:
  36. //
  37. // This function is executed as the result of an interprocessor
  38. // interrupt asserted on the current processor. This function is
  39. // responsible for acknowledging the interrupt and dispatching to
  40. // the kernel for processing.
  41. //
  42. // Arguments:
  43. //
  44. // TrapFrame (fp/s6) - Supplies a pointer to the trap frame for
  45. // the interrupt.
  46. //
  47. // Return Value:
  48. //
  49. // None.
  50. //
  51. //--
  52. LEAF_ENTRY(HalpGammaIpiInterrupt)
  53. //
  54. // Acknowledge the IPI interrupt by clearing the RequestInterrupt bit
  55. // of the IPIR register for the current processor.
  56. //
  57. // N.B. - Clearing the RequestInterrupt bit of the IPIR is accomplished
  58. // by writing a zero to the register. This eliminates the need
  59. // to perform a read-modify-write operation but loses the state
  60. // of the RequestNodeHaltInterrupt bit. Currently, this is fine
  61. // because the RequestNodeHalt feature is not used. Were it to
  62. // be used in the future, then this short-cut would have to be
  63. // reconsidered.
  64. //
  65. // N.B. - The code to write a sable CPU register is inlined here for
  66. // performance.
  67. //
  68. // N.B. - The PcHalIpirSva value must reflect the location of the Ipir
  69. // pointer in the GAMMA_PCR structure, defined in gamma.h
  70. //
  71. //jnfix - define elsewhere
  72. #define PcHalIpirSva 0x08
  73. #define SicrIpiClear 0x1000000000000 // bit to write to clear IPI int
  74. call_pal rdpcr // v0 = pcr base address
  75. ldiq t0, SicrIpiClear // get clear bit
  76. ldq v0, PcHalReserved + PcHalIpirSva(v0) // get per-processor
  77. // CPU IPIR SVA
  78. stq t0, (v0) // clear IPIR
  79. mb // synchronize the write
  80. //
  81. // Call the kernel to processor the interprocessor request.
  82. //
  83. ldl t0, __imp_KeIpiInterrupt
  84. jmp zero, (t0) // call kernel to process
  85. //
  86. // Control is returned from KeIpiInterrupt to the caller.
  87. //
  88. .end HalpGammaIpiInterrupt