This document, the "OpenVMS Alpha Guide to Upgrading Privileged-Code Applications (April 2001)", provides essential information for developers maintaining privileged software, such as device drivers and user-written system services, on OpenVMS Alpha systems. It primarily addresses the significant architectural changes introduced in OpenVMS Alpha Version 7.0: 64-bit virtual addressing and kernel threads support. Non-privileged applications and those on OpenVMS VAX systems are not affected.
Key Impacts and Upgrade Recommendations:
64-bit Virtual Addressing:
- Expanded Address Space: OpenVMS Alpha 7.0 extends virtual address space to 8 TB (P0, P1, P2, and S2 spaces), moving beyond the previous 32-bit limits.
- Data Structure Changes: Many internal 32-bit data structure fields (e.g., page table pointers, working set list entries, IRP parameters) are now 64-bit or replaced with 64-bit equivalents. Core system structures like process page tables, the PFN database, and the global page table have moved to S2 space and require 64-bit pointers.
- I/O Routines: New structures like the Direct I/O Buffer Map (DIOBM) are introduced for managing direct I/O buffers, solving the "cross-process PTE problem." Routines like
MMG$IOLOCK and MMG$UNLOCK are obsolete, replaced by MMG_STD$IOLOCK_BUF and DIOBM-related functions.
- Driver & System Service Support: Device drivers and user-written system services must explicitly declare support for 64-bit addresses, often requiring updates to Function Decision Tables (FDTs) and argument types for system services like
$QIO.
Kernel Threads Support:
- Process Structure Redefinition: The Process Control Block (PCB) now holds process-wide context, while a new Kernel Thread Block (KTB) holds per-thread context (e.g., scheduling state, AST queues). The KTB is the new basic unit of scheduling.
- Routine Interface Changes: Scheduling routines that previously accepted a PCB as a parameter now require a KTB address. Asynchronous System Traps (ASTs) now target kernel threads, using the ACB$L_PID field to represent the kernel thread.
- Process Identifiers (PIDs): PIDs are extended to identify individual kernel threads.
- TB Invalidation: Translation Buffer (TB) invalidation macros are updated to handle the multithreaded environment and invalidate across multiple CPUs.
General Upgrade Process:
The guide advises privileged-code developers to:
- Recompile and relink their applications on OpenVMS Alpha 7.0 to identify necessary source code changes.
- Address compile-time and link-time warnings or errors.
- Refer to detailed lists of removed and replaced privileged symbols (data fields, routines, macros, system data cells).
- Modify device drivers and user-written system services to properly support 64-bit addressing and adapt to kernel threads features.
Version 7.3 Note: Applications recompiled for OpenVMS Alpha 7.0 do not need further source code changes for Version 7.3. However, applications from releases prior to 7.0 that were not updated for 7.0 will likely require changes for Version 7.3.