[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

Upgrading Privileged-Code Applications on OpenVMS Alpha and OpenVMS I64 Systems


Previous Contents Index

4.4.1 Drivers Written in C

Drivers written in C use theini_fdt_act macro to initialize an FDT entry for an I/O function. This macro uses the DRIVER$INI_FDT_ACT routine. Both the macro and the routine have been enhanced for OpenVMS Alpha Version 7.0.

The format of the macro in releases prior to OpenVMS Alpha Version 7.0 was:


ini_fdt_act (fdt, func, action, bufflag) 

where thebufflag parameter must be one of the following:

  BUFFERED The specified function is buffered.
  NOT_BUFFERED The specified function is direct. This is a synonym for DIRECT.
  DIRECT The specified function is direct. This is a synonym for NOT_BUFFERED.

The use of thebufflag parameter has been enhanced to include the declaration of 64-bit support by allowing 3 additional values:

  BUFFERED_64 The specified function is buffered and supports a 64-bit address in the p1 parameter.
  NOT_BUFFERED_64 The specified function is direct and supports a 64-bit address in the p1 parameter.
  DIRECT_64 The specified function is direct and supports a 64-bit address in the p1 parameter.

If a driver does not support a 64-bit address on any of its functions, there is no need to change its use of theini_fdt_act macro.

For example, the following C code segment declares that the IO$_READVBLK and IO$_READLBLK functions support 64-bit addresses.


ini_fdt_act (&driver$fdt, IO$_SENSEMODE, my_sensemode_fdt, BUFFERED); ini_fdt_act (&driver$fdt, IO$_SETMODE,   my_setmode_fdt,   BUFFERED); ini_fdt_act (&driver$fdt, IO$_READVBLK,  acp_std$readblk,  DIRECT_64); ini_fdt_act (&driver$fdt, IO$_READLBLK,  acp_std$readblk,  DIRECT_64); 

The interpretation of thebufflag parameter to the DRIVER$INI_FDT_ACT routine has been enhanced to support the new values and the setting of the 64-bit support mask in the FDT data structure.

4.4.2 Drivers Written in MACRO-32

As of OpenVMS Alpha Version 7.0, drivers written in MACRO-32 use a new FDT_64 macro to declare the set of I/O functions for which the driver supports 64-bit addresses. The use of the FDT_64 macro is similar to the use of the existing FDT_BUF macro. If a driver does not support a 64-bit address on any of its functions, there is no need to use the new FDT_64 macro.

For example, the following MACRO-32 code segment declares that the IO$_READVBLK and IO$_READLBLK functions support 64-bit addresses.


FDT_INI   MY_FDT FDT_BUF   <SENSEMODE,SETMODE> FDT_64    <READVBLK,READLBLK> FDT_ACT   ACP_STD$READBLK, <READVBLK,READLBLK> 

4.4.3 Drivers Written in BLISS

As of OpenVMS Alpha Version 7.0, drivers written in BLISS-32 and BLISS-64 use a new optional keyword parameter, FDT_64, to the existing FDTAB macro to declare the set of I/O functions that support 64-bit addresses. The use of the new FDT_64 parameter is similar to the use of the existing FDT_BUF parameter. If a driver does not support a 64-bit address on any of its functions, there is no need to use the new FDT_64 parameter.

For example, the following BLISS code segment declares that the IO$_READVBLK and IO$_READLBLK functions support 64-bit addresses.


FDTAB (     FDT_NAME = MY_FDT,     FDT_BUF  = (SENSEMODE,SETMODE),     FDT_64   = (READVBLK,READLBLK),     FDT_ACT  = (ACP_STD$READBLK, (READVBLK,READLBLK) )     );    

4.5 I/O Mechanisms

Table 4-2 summarizes the I/O mechanisms that support 64-bit addresses.

Table 4-2 Summary of 64-Bit Support by I/O Mechanism
Mechanism 64-Bits Comments
Simple buffered I/O Yes 32/64-bit BUFIO packet headers
     
Complex Buffered I/O No Used by XQP and ACPs
     
Complex Chained Buffered I/O Yes New cells in CXB
     
Direct I/O Yes Cross-process PTE problem
     
LAN VCI Yes Cross-process PTE problem
     
VMS I/O Cache Yes 64-bit support is transparent to other components
     
Buffer Objects Yes Special case of direct I/O
     
Diagnostic buffers Yes Driver-wide attribute

4.5.1 Simple Buffered I/O

Figure 4-1 shows a 32-bit buffered I/O packet header.

Figure 4-1 32-Bit Buffered I/O Packet Header


BUFIO$PS_PKTDATA Contains pointer to buffered data in packet
   
BUFIO$PS_UVA32 Contains 32-bit user virtual address

  • No symbolic offsets currently defined.
  • Frequent use of manifest constants; for example:


         MOVAB   12(R2),(R2) 

  • Dependencies on the packet header layout can be anywhere in the driver code path.
  • Drivers allocate and initialize these packets.

A 64-bit buffered packet header is as shown in Figure 4-2.

Figure 4-2 New 64-Bit Buffered I/O Packet Header


BUFIO$PS_PKTDATA Contains pointer to buffered data in packet
   
BUFIO$PS_UVA32 Must contain BUFIO$K_64 (-1) value
   
BUFIO$PQ_UVA64 Contains 64-bit user virtual address

  • BUFIO structures and offsets now defined.
  • Both 32-bit and 64-bit formats supported.
  • BUFIO packets are self-identifying.
  • New routines are EXE_STD$ALLOC_BUFIO_64, EXE_STD$ALLOC_BUFIO_32.
  • Used for diagnostic buffers as well.


Previous Next Contents Index