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.

128 lines
2.2 KiB

  1. //
  2. // No Check-in Source Code.
  3. //
  4. // Do not make this code available to non-Microsoft personnel
  5. // without Intel's express permission
  6. //
  7. /**
  8. *** Copyright (C) 1996-97 Intel Corporation. All rights reserved.
  9. ***
  10. *** The information and source code contained herein is the exclusive
  11. *** property of Intel Corporation and may not be disclosed, examined
  12. *** or reproduced in whole or in part without explicit written authorization
  13. *** from the company.
  14. **/
  15. /*++
  16. Copyright (c) 1995 Intel Corporation
  17. Module Name:
  18. simswint.c
  19. Abstract:
  20. This module implements the routines to support software interrupts.
  21. Author:
  22. 14-Apr-1995
  23. Environment:
  24. Kernel mode
  25. Revision History:
  26. --*/
  27. #include "halp.h"
  28. #include "ssc.h"
  29. VOID
  30. FASTCALL
  31. HalRequestSoftwareInterrupt (
  32. IN KIRQL RequestIrql
  33. )
  34. /*++
  35. Routine Description:
  36. This routine is used to request a software interrupt to the
  37. system. Also, this routine calls the SSC function
  38. SscGenerateInterrupt() to request the simulator to deliver
  39. the specified interrupt. As a result, the associated bit in
  40. the EIRR will be set.
  41. Arguments:
  42. RequestIrql - Supplies the request IRQL value
  43. Return Value:
  44. None.
  45. --*/
  46. {
  47. switch (RequestIrql) {
  48. case APC_LEVEL:
  49. SscGenerateInterrupt (SSC_APC_INTERRUPT);
  50. break;
  51. case DISPATCH_LEVEL:
  52. SscGenerateInterrupt (SSC_DPC_INTERRUPT);
  53. break;
  54. default:
  55. DbgPrint("HalRequestSoftwareInterrupt: Undefined Software Interrupt!\n");
  56. break;
  57. }
  58. }
  59. VOID
  60. HalClearSoftwareInterrupt (
  61. IN KIRQL RequestIrql
  62. )
  63. /*++
  64. Routine Description:
  65. This routine is used to clear a possible pending software interrupt.
  66. The kernel has already cleared the corresponding bit in the EIRR.
  67. The support for this function is optional, depending on the external
  68. interrupt control.
  69. Arguments:
  70. RequestIrql - Supplies the request IRQL value
  71. Return Value:
  72. None.
  73. --*/
  74. {
  75. switch (RequestIrql) {
  76. case APC_LEVEL:
  77. case DISPATCH_LEVEL:
  78. //
  79. // Nothing to do.
  80. //
  81. break;
  82. default:
  83. DbgPrint("HalClearSoftwareInterrupt: Undefined Software Interrupt!\n");
  84. break;
  85. }
  86. }