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.

166 lines
3.8 KiB

4 years ago
  1. ;++
  2. ;
  3. ; Copyright (c) 1989 Microsoft Corporation
  4. ;
  5. ; Module Name:
  6. ;
  7. ; olimp.inc
  8. ;
  9. ; Abstract:
  10. ;
  11. ; LSX5030 MP include file
  12. ;
  13. ; Author:
  14. ;
  15. ; Bruno Sartirana (o-obruno) 3-Mar-92
  16. ;
  17. ;--
  18. ;*****************************
  19. ; Olivetti LSX5030 defines
  20. ;
  21. MAX_NUMBER_PROCESSORS_MASK equ 0fh ; Maximum number of processors
  22. ; bitmask
  23. MAX_NUMBER_PROCESSORS equ 4 ; Maximum number of processors
  24. RESET_WO_EOI equ 00ah ; Reset with out EOI
  25. WarmResetVector equ 467h ; warm reset vector in ROM data segment
  26. ; Multi-Processor Control and Configuration Registers I/O Locations:
  27. PCR_Px equ 0c6ah ; control register offset
  28. ;LEV2_CACHE_REG equ 0c94h ; level 2 cache register offset
  29. P0_SLOT equ 00000h
  30. P1_SLOT equ 0c000h
  31. P2_SLOT equ 0d000h
  32. P3_SLOT equ 0e000h
  33. Px_SLOT_MASK equ 0f000h
  34. PCR_P0 equ P0_SLOT + PCR_Px
  35. PCR_P1 equ P1_SLOT + PCR_Px
  36. PCR_P2 equ P2_SLOT + PCR_Px
  37. PCR_P3 equ P3_SLOT + PCR_Px
  38. ; WHO AM I Register
  39. PROC_ID_PORT equ 0c70h ; who am I
  40. ; Multi-Processor Control Register Bit Definitions:
  41. IPI_EN equ 080h ; Inter-Processor Interrupt Enable bit
  42. PINT equ 040h ; Inter-Processor Interrupt bit
  43. IPI_IRQ10 equ 008h ; Inter-processor-interrupt vectors
  44. IPI_IRQ11 equ 004h
  45. IPI_IRQ13 equ 00ch
  46. IPI_IRQ15 equ 000h
  47. RESET equ 001h ; RESET processor bit (1-0 transition
  48. ; Multi-Processor 2nd Level Cache Policy Registers Bit Definitions
  49. ;LEV2_CACHE_ON equ 80h ; 2nd level cache enable bit
  50. ;
  51. ; The kernel leaves some space (64 byte) of the PCR for the HAL to use
  52. ; as it needs. Currently this space is used for some efficiency in
  53. ; some of the MP specific code and is highly implementation
  54. ; dependant.
  55. ;
  56. PcrE struc
  57. PcrControlPort dw 0 ; Processor's control port
  58. PcrNumber db 0 ; Processor's number
  59. PcrE ends
  60. cr equ 0ah
  61. lf equ 0dh
  62. ;
  63. ; Constants used to initialize CMOS/Real Time Clock
  64. ;
  65. CMOS_CONTROL_PORT equ 70h ; command port for cmos
  66. CMOS_DATA_PORT equ 71h ; cmos data port
  67. CMOS_GET_MP_STATUS equ 36h ; offset for MP status
  68. ;
  69. ; Macros to Read/Write/Reset CMOS
  70. ;
  71. ; CMOS_READ
  72. ;
  73. ; Description: This macro read a byte from the CMOS register specified
  74. ; in (AL).
  75. ;
  76. ; Parameter: (AL) = address/register to read
  77. ; Return: (AL) = data
  78. ;
  79. CMOS_READ macro
  80. out CMOS_CONTROL_PORT, al ; ADDRESS LOCATION AND DISABLE NMI
  81. IODelay ; I/O DELAY
  82. in al, CMOS_DATA_PORT ; READ IN REQUESTED CMOS DATA
  83. IODelay ; I/O DELAY
  84. endm
  85. ;++
  86. ;
  87. ; DBG_DISPLAY DisplayCode
  88. ;
  89. ; Macro Description:
  90. ;
  91. ; This macro writes 'DisplayCode' to the parallel port, where a LED
  92. ; display can be plugged in to show such a code.
  93. ; In order to allow the user to read the code on the LED display,
  94. ; after writing, a delay is introduced.
  95. ;
  96. ; Arguments:
  97. ; DisplayCode - Byte to write to the parallel port
  98. ;
  99. ;
  100. ;--
  101. DBG_DISPLAY macro DisplayCode
  102. ifdef HALOLI_DBG
  103. push eax
  104. push edx
  105. ; signal something on the parallel port
  106. mov dx, 378h
  107. mov al, DisplayCode
  108. out dx, al
  109. mov eax, DbgDelay
  110. @@:
  111. dec eax
  112. cmp eax, 0
  113. jne @b
  114. pop edx
  115. pop eax
  116. endif ; HALOLI_DBG
  117. endm
  118. ;*****************************
  119. ; end of list