Presentation on theme: "Developing a Portable, Open Source Alpha Emulator Camiel Vanderhoeven OpenVMS Advanced Technical Bootcamp May 18-23, Nashua, NH."— Presentation transcript:
Developing a Portable, Open Source Alpha Emulator Camiel Vanderhoeven OpenVMS Advanced Technical Bootcamp May 18-23, Nashua, NH
Topics 1. Emulation 2. ES40 Emulator 3. Current problem areas 4. Portability and Open-source 5. Become involved 6. Questions?
1. Emulation What it is When to use it How to do it
Emulation: Definition An emulator duplicates (provides an emulation of) the functions of one system using a different system, so that the second system behaves like (and appears to be) the first system. This focus on exact reproduction of external behavior is in contrast to some other forms of computer simulation, which can concern an abstract model of the system being simulated.systemcomputer simulation (Wikipedia)
Emulation: Why? Get rid of unsupported hardware Datacenter consolidation Reduce space, power requirements (blades) While: Protecting investment in software
Emulation: When? Binary programs w/o source code Obsolete programming languages Software support for obsolete platform Hands-On Education Scenario Testing
Emulation: How? Get documentation on original system Technical Reference Manuals Study driver code (Linux, FreeBSD) Beware of hidden features, bugs... Analyse original system Reduce to logical requirements Implement in software Observe behaviour And re-iterate...
2. ES40 Emulator How it was done? ES40 Hardware Map Emulator Software Map
ES40: How? Start with bare minimum: CPU, SRM console firmware Chipset, memory Serial port Then start adding: IDE controller, disks First boot, then add: Rest of stuff (SCSI, NIC, VGA...)
ES40 Internals How the hardware structure of the ES40 maps to the software structure of the Emulator
Current Problem Areas Performance Floating-Point Instructions Multi-CPU Support Access/Alignment faults
Performance Issues... Current: Interpretation Each instruction is decoded and executed separately Lots of overhead
Performance Issues... Performance has been increased already by: Selective interrupt checking Replacing often-used SRM PALcode routines with C++ code Disabling the Instruction Cache when it is not needed Optimizing the size of the Translation Buffers and keeping MRU (Most Recently Used) information
Performance Issues... Future: Dynamic Translation Each instruction is decoded once
Dynamic Translation Dynamic translation drawbacks: Very complex Host processor specific code (less portable) Need to keep track of changed code pages For now: First get it working, then get it fast
Floating Point Problems Floating-point implementation is complex 5 different floating-point formats In-memory format differs from in-register Different rounding modes Exception handling, denormals, infinity Emulations “old” code: no exceptions, limited special values “new” code: more complete, but bugs Having CPU-level test suite would really help!
Multiple-CPU problems SRM startup may hang Extra CPU’s are seen from SRM and OpenVMS CPU’s fail to initialize in SRM CPU’s never make it into the active set in OpenVMS Solution probably buried somewhere in the SRM specs or source code. Where should the extra CPU’s wait for initialization?
Access/Alignment faults Access faults occur during OpenVMS installation, network bootup Alingment faults during boot when they shouldn’t occur. Alignment checking is turned off temporarily.
4. Portability and Open Source Portability Open Source resources SourceForge
Portability Portability is helped through: Portable libraries: Standard C/C++ libraries Poco (threads, locks, etc.) Pcap (networking) SDL (graphics) Buildchain management UNIX build scripts (autoconf, automake) Generated DCL build scripts
Open-Source Resources Compilers etc.: GNU compiler collection (gcc) GNU autotools (autoconf, automake) Websites etc. (collaboration): Usenet (newsgroups) SourceForge.net Ohloh.net (code metrics) Newsletters (like Sue’s)
SourceForge SourceForge.net helps out with: Project Website Downloads Version Control Forums Bug Tracking Statistics
Contact Information http://www.es40.org/ e-mail: email@example.com Skype: iamcamiel
This presentation is Copyright (c) 2008 by the Camiel Vanderhoeven. Website: http://es40.orghttp://es40.org E-mail : firstname.lastname@example.org@es40.org The information contained herein may be freely distributed. The OpenVMS Bootcamp NDA does not apply to this presentation. Permission is granted to copy, distribute and/or modify these documents under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) any later version published by the Free Software Foundation. The GNU Free Documentation License, version 1.2, can be found at http://gnu.org/licenses/fdl-1.2.htmlhttp://gnu.org/licenses/fdl-1.2.html