HP OpenVMS Systems

ask the wizard
Content starts here

High IPL Device Driver Console Output?

» close window

The Question is:

I am modifying the sample driver for the DRV11W (DMA Interface).  I am having a
 problem where the ISR does not seem to be called if the ATTN line is pulsed
 within a few microseconds of a DMA transfer completion.
I an trying to display a msg on the screen every time the ISR is called to help
 me debug the problem, but I am unable to do this.  Do you have any suggestions?
I have tried with the EXE$SENDEVMSG, but I believe that the IPL the ISR is
 running at is too high for this to work.

The Answer is :

  The OpenVMS Wizard would normally use a ring buffer accessable (and
  accessable at high-IPL and at near-full execution speed) via the UCB.
  This buffer would be used to track device activity and any other
  debugging-relevent information, and could be dumped out as required.
  Alternatively, the following undocumented and unsupported OpenVMS VAX
  feature may be of interest:
;       This routine will allow emergency messages to be put on the console
;       terminal.  Some time later the broadcast will complete, and
;       at that time all the necessary post-processing will be done.
; Input:
;       R1 = Message length
;       R2 = Message address
; Implicit input:
;       A dedicated TWP block must immediately preced the message.
;       The low bit of the first byte of the TWP is assumed to remain clear
;       while it is in use.
; Output:
;       None.  The contents of R1 .. R5 are preserved across the call.
; Routine value:
;       SS$_NORMAL      - The broadcast completed successfully.
  Here is an example call:
        $TTYDEF                         ;TWP-related symbols
        .ALIGN  QUAD                    ; TWP must be quadword-aligned
        .LONG   -1                      ; Preallocated TWP
        .BLKB   TTY$K_WB_LENGTH-4
10$:    .ASCII  <13><10>/%FacNam-Severity-MsgId, Message Text/<13><10>
        MOVZWL  W^NEXT_STUFF+2,R1               ; MESSAGE LENGTH
        JSB     G^IOC$CONBRDCST                 ; OUTPUT THE MESSAGE
80$:    MNEGL   #1,R0                           ; INDICATE FAILURE
        BRB     60$

answer written or last revised on ( 31-JUL-2001 )

» close window