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.

93 lines
1.9 KiB

  1. title "Trap Processing"
  2. ;++
  3. ;
  4. ; Copyright (c) 1989 Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; int.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This module implements the code necessary to field and process i386
  13. ; interrupt.
  14. ;
  15. ; Author:
  16. ;
  17. ; Shie-Lin Tzong (shielint) 8-Jan-1990
  18. ;
  19. ; Environment:
  20. ;
  21. ; Kernel mode only.
  22. ;
  23. ; Revision History:
  24. ;
  25. ;--
  26. .386p
  27. .xlist
  28. include ks386.inc
  29. include i386\kimacro.inc
  30. include callconv.inc
  31. .list
  32. ;
  33. ; Interrupt flag bit maks for EFLAGS
  34. ;
  35. EFLAGS_IF equ 200H
  36. EFLAGS_SHIFT equ 9
  37. _TEXT SEGMENT DWORD PUBLIC 'CODE'
  38. ASSUME DS:FLAT, ES:FLAT, SS:FLAT, FS:NOTHING, GS:NOTHING
  39. ; NOTE This routine is never actually called on standard x86 hardware,
  40. ; because passive level doesn't actually exist. It's here to
  41. ; fill out the portable skeleton.
  42. ;
  43. ; The following code is called when a passive release occurs and there is
  44. ; no interrupt to process.
  45. ;
  46. cPublicProc _KiPassiveRelease ,0
  47. stdRET _KiPassiveRelease ; cReturn
  48. stdENDP _KiPassiveRelease
  49. page ,132
  50. subttl "Disable Processor Interrupts"
  51. ;++
  52. ;
  53. ; BOOLEAN
  54. ; KeDisableInterrupts(
  55. ; VOID
  56. ; )
  57. ;
  58. ; Routine Description:
  59. ;
  60. ; This routine disables interrupts at the processor level. It does not
  61. ; edit the PICS or adjust IRQL, it is for use in the debugger only.
  62. ;
  63. ; Arguments:
  64. ;
  65. ; None
  66. ;
  67. ; Return Value:
  68. ;
  69. ; (eax) = !0 if interrupts were on, 0 if they were off
  70. ;
  71. ;--
  72. cPublicProc _KeDisableInterrupts ,0
  73. cPublicFpo 0, 0
  74. pushfd
  75. pop eax
  76. and eax,EFLAGS_IF ; (eax) = the interrupt bit
  77. shr eax,EFLAGS_SHIFT ; low bit of (eax) == interrupt bit
  78. cli
  79. stdRET _KeDisableInterrupts
  80. stdENDP _KeDisableInterrupts
  81. _TEXT ends
  82. end