ifndef INC_LIST
.xlist
endif
;******************************************************************************
;
;   (C) Copyright IBM Corp. 1986-1991
;   (C) Copyright COMPAQ Computer Corp. 1986-1991
;
;   Title:    EMM386 - IBM Expanded Memory Manager 386
;
;   Module:   OEMDEP.INC
;
;   Version:  2.00
;
;   Date:     June 13, 1986
;
;   Author:     Steve Preston
;
;******************************************************************************
;
;   Change log:
;
;     DATE    REVISION                  DESCRIPTION
;   --------  --------  -------------------------------------------------------
;   06/13/86  Original
;   06/28/86  0.02      Name change from CEMM386 to CEMM (SBP).
;   07/05/86  0.04      Moved Diagbyte to _DATA (SBP).
;   07/06/86  0.04      Change from _DATA assume to _DATA (SBP).
;   05/08/87  2.00      Updated header for HWTABLOCK to use DS (SBP).
;   02/20/88  3.30 (*B) Add P9 diagnostic port support (RDV).
;   07/14/88  3.31 (*C) Change P9 to 386s and add 386c (RDV).
;   10/15/89  4.00 (*D) Generic 8042 detect added (RDV)
;   03/29/93  ELM1214   Moved equates for keyboard to mriemm38.inc.
;
;******************************************************************************
;
;   structure for 386 descriptor
;
desc    struc
  LIMIT         dw      0       ; offset of last byte in segment
  BASE_LO       dw      0       ; Low 16 bits of 24 bit base address
  BASE_HI       db      0       ; High 8 bits of 24 bit base address
  RIGHTS        db      0       ; access rights
  RES386        db      0       ; reserved for 386
  BASE_XHI      db      0       ; High 8 bits of 32 bit base address
desc    ends
;
;       386 related addresses
;
X_HI_MEM_SEG    equ     0f000h  ;segment for the following words
X_MT_386        equ     0fffeh  ; Machine type
X_RT_386        equ     0ffe8h  ; Rom type
X_HI_PTR        equ     0ffe0h  ; pointer to four words (offsets below)
X_MEM_BOARD     equ     0       ; 32-bit memory board status word
X_HISYS         equ     0       ; low byte = # of free 4k system pages
X_AVAIL_MEM     equ     4       ; available hi memory in 16 byte chunks
X_LAST_HI       equ     6       ; last used byte in hi memory (grows down)

;
;   Addresses and values used to write the "ROM"
;
LOCK_ADR_LO     equ     0000h   ; 0:15 of 32-bit location
LOCK_ADR_HI     equ     80C0h   ; 16-31 of 32-bit location
PORT386s        equ     0878h   ; diagnostic I/O port on 386s (RDV)  *C
LOCK_ROM        equ     0fcfch  ; value to write to lock rom
UNLOCK_ROM      equ     0fefeh  ; value to write to unlock rom

;
;       Interrupt Controller Ports
;
MASTER          EQU     0A1H    ; Master interrupt i/o port
SLAVE           EQU     021H    ; Slave interrupt i/o port
DIS_MSTSLV      EQU     00H     ; Value to write to disable master/slave
MASTER_IMR      equ     21h     ; mask port for master 8259

;
;       Keyboard Controller
;
KYBD_CMD        equ     64h     ; 8042 command port
KYBD_STATUS     equ     64h     ; 8042 status port
KYBD_DATA       equ     60h     ; 8042 data port
OUT_BUF_FULL    equ     1       ; 8042 output buffer
IN_BUF_FULL     equ     2       ; 8042 busy bit/input buffer
NULL_8042_CMD   equ     0FFh    ; 8042 null cmd
SPRD_8042_CMD   equ     0A5h    ; 8042 special read command
DIS_8042_CMD    equ     0ADh    ; 8042 disable kbd command
ENA_8042_CMD    equ     0AEh    ; 8042 enable kbd command
OUTPORT_A20     equ     02h     ; 8042 output port bit for A20 enable
KYBD_RD_OUTPUT  equ     0C0h    ; kybd read output port cmd
KYBD_WR_OUTPUT  equ     0D1h    ; kybd write output port cmd
KYBD_RD_ECHO    equ     0D2h    ; Echo next byte as read from keyboard
ENABLE_A20      equ     02h     ; Output port bit for A20 line enable (92h)
PS2_PORTA       equ     92H     ; A20 toggle on PS2s and optionally on ISA/EISA P8042

;
;       Keyboard
;

; Move equates for keyboard to mriemm38.inc.   ;ELM1214;

;
;       NMI Control
;
NMI_CMD         equ     70h     ; for handling the NMI
DISABLE_NMI     equ     80h     ; for handling the NMI
ENABLE_NMI      equ     00h     ; for handling the NMI
NMI386s         equ     61h     ; Disabling NMI on Taurus
;
;  Parity Port I/O bit definitions
;
PPI             equ     61h
PPO             equ     61h

PPO_MASK_IOCHECK        equ     04h     ; disable system board parity check
PPO_MASK_PCHECK         equ     08h     ; disable IO parity check

PPI_IOCHECK     equ     40h     ; IO parity bit
PPI_PCHECK      equ     80h     ; system brd parity bit
;
; external define for Diag segment
;
DIAGSEG segment USE16 at 0

DiagLoc dw      ?               ; 32 bit memory board diagnostic byte

DIAGSEG ends

.list   ; end of OEMDEP.INC
