OpenVMS
on the
ItaniumTM Processor Family
Clair Grant
OpenVMS Engineering
The Big Challenges
•	No Alpha SRM Console
•	No Alpha PALcode
•	Different primitives in the CPU
•	Compilers*
•	Calling Standard (Intel-based) *
•	Object Format (ELF) *
•	Debug Symbol Tables (DWARF) *

* - to be covered in Session 1690 at 2:30 

Selected Topics of Interest
•	Console Functions
•	PALcode
•	IPL / ASTs / Software Interrupts
•	Memory Management
•	Synchronization Techniques
•	Context Switching

Console Functions
•	Booting
•	Special Run Time Services
•	Power Management
Console:  Booting on the EFI Console
•	Intel Console: 
–	Processor Abstraction Layer (PAL)
–	System Abstraction Layer (SAL)
–	Extensible Firmware Interface (EFI)
•	Reads a FAT32 file partition to get OS loader
•	We will overlay that partition on an ODS-2 disk
•	There will be a new OS loader

Console:  Special Run Time Services
•	Console Terminal I/O
–	OpenVMS will do it
•	Partitioning
–	Need “ownership of devices” info
–	Need “switch of ownership” capabilities
–	Soft partitions (Galaxy) will be very challenging
•	Crash Dump
–	Driver
–	File system knowledge
–	CPU Management 

Console:  Power Management
•	Advanced Configuration and Power Interface (ACPI) provides
–	configuration data
–	interface to control device availability
•	Current OpenVMS RAS support
–	ACPI provides a lot but not all we need
–	Some additions to OpenVMS
–	Some additions in an EFI application
It’s All in the Software
Privileged Architecture Library (PALcode)
•	PALcode execution environment
–	Complete control of machine state
–	Interrupts disabled
–	I-stream mapping disabled

PALcode Functions
•	Instructions
–	Complex sequencing and atomic operation
–	VAX interlocked instructions
–	Privileged instructions
•	Translation buffer management
•	Interrupt and exception dispatching
•	Synchronization primitives

CALL_PAL Examples
•	CHMK  *
•	REI  *
•	SWPCTX
•	CSERVE
•	MFPR / MTPR  *
•	Atomic Queue Instructions *

* = VAX instruction
Remove from head of queue, interlocked
•	VAX instruction REMQHI
•	Alpha CALL_PAL REMQHIL
•	IA-64 instruction EPC + MF + OpenVMS code 
IPL / ASTs / Software Interrupts
•	0 - 31 IPLs (but we only define 13 of them… (2,3,4,5,6,7,8,9,10,11,15,21,22,31)
–	Map 16-31 directly onto a 16-bit interrupt register
–	Use another register for software levels 0-15
•	SETIPL / REI
•	Alpha AST Summary Register
•	Alpha Software Interrupt Summary Register

Memory Management
•	Page Size
•	Page Protection
•	Virtual Address Space
•	PTE Format

Page Size
•	Page size will be 8KB initially
•	GH factors (huge pages) will be handled by the VMS TLB miss handler
•	Same GH factors as on Alpha
•	3 full levels of page tables 
Page Protection
•	IA-64 access rights and privilege levels can do all common VAX and Alpha page protections except
–	User Read, Exec Write (UREW) - considering using User Read, Super Write (URSW)
–	User Read, Super Write (URSW) and Super Read, Exec Write (SREW) won't allow execute access. (Privileged code must change to write code, then set page read only.)
•	OpenVMS will allow ‘no execute’ pages.
Virtual Address Space
•	address space will be 8TB in size initially
•	32-bit System Page Table (SPT) window will still be created in S1 space for 32-bit device driver code
•	Each IA-64 region will have its own page table space
•	P0, P1, S0, S1 will be 32-bit; P2 and S2 will be 64-bit
PTE Format
•	Since OpenVMS will implement the TLB miss handler it can retain its current PTE formats.
•	The Address Space Match (ASM) bit will not be set for system space. ASM will be a function of the virtual address, not a PTE bit. All addresses in IA-64 region 7 will essentially have ASM set.
•	Other than protection and ASM, all PTE bits will be the same as on Alpha 
Synchronization Techniques
•	Requirement:  to read/write a shared location in a single atomic operation
•	Example OpenVMS Uses:
–	Spinlock
–	MUTEX
–	Semaphore
–	Queue instructions
•	Alpha: CALL_PAL, LDL/STC and MB
•	IA-64: FETCHADDx, CMPXCHGx, XCHGx, EPC, and MF
Context Switching
•	Probably a little worse:
–	More registers to save
–	More context to save on full interruption

•	Probably a little better:
–	No “interruption” for software interrupt
–	Fewer full interruptions

Portable OpenVMS
•	1978 VAX
•	1992 Alpha
•	2003 IA-64
•	20??    ?