/* #define SCCSID "@(#)vdmint13.h       6.3 92/03/13" */

/***    VDMINT13.H
 *
 *      IBM Confidential
 *
 *      Copyright (c) IBM Corporation 1987, 1989
 *
 *      All Rights Reserved
 *
 *      Title:
 *
 *      Int13 mini-VDM <> DiskDD communications block.
 *
 *      Description:
 *
 *      This control block is passed by the VIDEOPMI to mini-VDM
 *      initialzation via DosSysCtl
 *
 *      Modification History:
 *
 *      Created:  Senja Petrujkic   7/14/95
 *
 */
/******************************************************************************
 * CHANGE ACTIVITY =
 *  DATE      FLAG        APAR    CHANGE DESCRIPTION
 *  --------  ----------  ------  --------------------------------------
 *  mm/dd/yy  @Vr.mpppxx  xxxxxx   xxxxxxx
 *  04/11/95  @V3.2SEN00  151783   Created
 ******************************************************************************/

#define VDM_INT10PRIVATESGID     0x0FF0
typedef struct _VDMINT10
{
// Event semaphores used to signal start of a new process

//
// These variables provide the address of the Linear=Real
// I/O buffer mapped in the VDM address space.
//
   ULONG        pINT10BufLin;
   ULONG        pINT10BufProt;
   ULONG        INT10IOBufSize;
   USHORT       Flags;

//
// This variable indicates where we are in processing an INT 10
// request.
//
// Note: It is set to START by the VIDEOPMI, and to COMPLETE
//       by the V86 code just prior to dispatching the request
//       to the Int 10 BIOS
//
   USHORT       INT10State;
#define         VDMINT10_IDLE           0
#define         VDMINT10_START          1
#define         VDMINT10_COMPLETE       2
#define         VDMINT10_CREATED        3
   ULONG        INT10CreateRc;

//
// Register set passed to the BIOS in V86 mode
//
#define MAX_BUFFERS  2
   ULONG        ulIntNo;      /* software interrupt number */
   KMREG        INT10Regs;
   ULONG        ulSize[MAX_BUFFERS];
   PCHAR        aDosMemAddr[MAX_BUFFERS];   // Dos memory
   PCHAR        aOS2MemAddr[MAX_BUFFERS];   // OS/2 caller memory
   PCHAR        aShrMemAddr[MAX_BUFFERS];   // shared memory
   HVDHSEM      hevNewRequest;
   HVDHSEM      hevRequestDone;
   BYTE         fBufferFlag[MAX_BUFFERS];
   USHORT       Page0Sel;
   ULONG        Page0LinA;
} SVDMINT10, *PVDMINT10;

// VIDEOPMI-kernel interface is via the INT10CRF. These structures have
// to match the structures in svgadefs.h

typedef struct {
  BYTE bBufferType;        // input vs output buffer
#define BUFFER_NONE     0
#define INPUT_BUFFER    1
#define OUTPUT_BUFFER   2
  BYTE bReserved;
  BYTE bSelCRF;            // CRF flag for the selector
  BYTE bOffCRF;         // CRF flag for the offset
  PVOID pAddress;          // linear address of the buffer
  ULONG ulSize;            //maximum size of both buffers is 4K
}BUFFER, *PBUFFER;

typedef struct {
  ULONG ulIntNo;
  KMREG aCRF;
  BUFFER pb[MAX_BUFFERS];
}INT10CRF;
