HP OpenVMS Systemsask the wizard | 
	
 The Question is: 
 
The following driver function for direct I/O  produces sporadically
the bugcheck error  INVALID PAGE TABLE ENTRY FORMAT
in the  ioc$load_map function.
I believe that the code conformes to the documention
"OpenVMS Alpha Guide yo Upgrading Priviledged-Code
Applications" .
Thank you very much in advance for any hint.
 
Yours sincerely
Kar. H. Degenhardt
 
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
Read data by DMA
 
(function is defined with DIRECT_64 flag)
 
--------------------------------------------------------------*/
 
int  ck$dma_operation (IRP *irp, PCB *pcb, *ucb, CCB *ccb)
 
  CHAR_PQ qio_bufp;
  int buflen;
 
...
 
/* get user buffer address and length */
  qio_bufp = (CHAR_PQ)irp->irp$q_qio_p1;
  count = irp->irp$l_qio_p2;
  buflen = 4*count;
 
...
 
/* Check write access to user buffer and lock buffer in memory */
    status = exe_std$readlock(irp,pcb,ucb,ccb,(VOID_PQ)qio_bufp,buflen,0);
    if (! $VMS_STATUS_SUCCESS(status))
    return (call_abortio(irp,pcb,ucb,status));
 
...
 
/* get crctx and set item count*/
  crab = adp->adp$l_crab;
  status = ioc$alloc_crctx(crab,&crctx,0);
  if (! $VMS_STATUS_SUCCESS(status))
  return (call_abortio(irp,pcb,ucb,status));
  crctx->crctx$l_item_cnt = (buflen >> 13) + 2;
/* get resources */
  status = ioc$alloc_cnt_res(crab,crctx,0,0,0);
  if (! $VMS_STATUS_SUCCESS(status))
  {
    status = ioc$dealloc_crctx(crctx);
    return (call_abortio(irp,pcb,ucb,status));
  }
/* load map registers */
  status = ioc$load_map(adp,crctx,irp->irp$l_svapte,
          irp->irp$l_boff, (void **)&dma_base);
  if (! $VMS_STATUS_SUCCESS(status))
  {
    status = ioc$dealloc_cnt_res(adp->adp$l_crab, crctx);
    status = ioc$dealloc_crctx(crctx);
    return (call_abortio(irp,pcb,ucb,status));
  }
 
...
 
  return (call_qiodrvpkt(irp, ucb));
 
  return (call_finishio(irp, ucb, status, 0));
 
 
The Answer is : Without a rather more detailed investigation involving a complete source example of the driver and an example of the crash, an answer is difficult. The OpenVMS Wizard would encourage contact with the Compaq Customer Support Center. 
 
 
  |