Ski IA-64 Simulator Reference Manual 1.0L

Figure 6-2. sdt Command Output in xski

6.4Misaligned Data Access Trap

If the psr.ac bit is set, the IA-64 architecture requires alignment checks on memory accesses; i.e., when data accesses are made to items larger than a byte, the appropriate number of low-order address bits must be zero. If the bit is clear, the IA- 64 implementation may choose whether or not to make such checks; Ski chooses to make the checks for references from IA-64 code. When an IA-64 program attempts an misaligned access, the behavior of the simulator depends on whether it is running in application-mode or system-mode (see Chapter 6, “Program Simulation”). In application-mode, the simula- tor stops the program and displays an error message. In system-mode, the simulator traps to the unaligned access vector.

6.5Program Loading

The Ski simulator supports loading IA-64 programs in the standard IA-64 ELF executable format and in MS-DOS .comand .exe formats. ELF files contain enough information to allow the simulator not only to load the program and its data, but also to build a symbol table, properly structure virtual memory, and initialize the screen and ip with the proper values. For IA-64 Linux programs, the psr.be bit is always initialized to zero, indicating that the program will run with little- endian byte-order.

The MS-DOS formats do not include symbol table information. Instead, you must supply the information in the form of a mapfile compatible with those created by Microsoft’s “ML” linker. If you don’t provide Ski with a mapfile, no program- defined symbols will be available. The MS-DOS formats do not specify where to place the program in memory. You must provide this information to Ski yourself. The .com format is very basic and is supported with the iaload and romload commands, described in Section 6.5.2, “Summary of Program Loading Commands”. The .exe format contains header information that is used by the iaload command and ignored by the romload command. For this reason, .exe files are not useful in system-mode simulation. For IA-32 programs, only IA-32 (little-endian) byte ordering is supported.

6.5.1How to Load a Program

There are two ways to load a file. The first way is to run the simulator with a IA-64 (not IA-32) executable program file- name as an argument. The file will be loaded immediately after the simulator initializes itself and before any command file specified with the -iflag is executed. (See Chapter 9, “Command Files” and Section 2.5.1, “Command Line Flags”.) An

Copyright © 2000 Hewlett-Packard Co.

Program Simulation

6-3

Page 67
Image 67
HP IA-64, Ski Simulator manual Misaligned Data Access Trap, Program Loading, How to Load a Program