AMD SimNow™ Simulator 4.4.5 User’s Manual Revision Date 2.01 November 2008 Advanced Micro Devices, Inc. One AMD Place Sunnyvale, CA 94088 simnow@amd.
AMD © 2004-2008 Advanced Micro Devices, Inc. The Contents of this document are provided in connection with Advanced Micro Devices, Inc. (“AMD”) products. AMD makes no representations or warranties with respect to the accuracy or completeness of the contents of this publication and reserves the right to make changes to specifications and product descriptions at any time without notice.
AMD Confidential User Manual November 21st, 2008 Contents Figures................................................................................................................................ ix Tables ................................................................................................................................. xi 1 2 Overview ..................................................................................................................... 1 Installation...........................
AMD Confidential User Manual 4 5 6 7 iv November 21st, 2008 3.4.2.5 PIO Rate Graph .............................................................................. 31 3.4.2.6 MMIO Rate Graph .......................................................................... 32 3.4.3 Simulated Video........................................................................................ 32 3.4.4 Hard Disk and Floppy Display ................................................................. 32 3.4.
AMD Confidential User Manual November 21st, 2008 7.22.1 Using XTR .............................................................................................. 111 7.22.1.1 Recoding XTR Trace ................................................................... 111 7.22.1.2 Stop XTR Record ......................................................................... 111 7.22.1.3 XTR Playback ............................................................................... 111 7.22.1.4 Stop XTR Playback .........
AMD Confidential User Manual November 21st, 2008 11.1 Kernel Debugger ............................................................................................. 155 11.2 GDB Interface ................................................................................................. 156 11.2.1 Simple Approach .................................................................................... 156 11.2.2 Alternate Approach .................................................................................
AMD Confidential User Manual November 21st, 2008 A.6.3.2 IRET – Return from Interrupt ............................................................. 223 A.6.4 Virtualization Instruction Reference ....................................................... 223 A.6.5 64-Bit Media Instruction Reference........................................................ 223 A.6.6 3DNow!™ Instruction Set ...................................................................... 224 A.6.7 Extension to the 3DNow! Instruction Set ...
AMD Confidential User Manual viii November 21st, 2008 Contents
AMD Confidential User Manual November 21st, 2008 Figures Figure 3-1: Main Window (In Simulation) ......................................................................... 7 Figure 3-2: Device Window................................................................................................ 9 Figure 3-3: Workspace Popup Menu ................................................................................ 11 Figure 3-4: Add Connection Dialog of Device Properties Window .................................
AMD Confidential User Manual November 21st, 2008 Figure 7-7: Graphics-Device VGA Sub Device Properties Dialog .................................. 66 Figure 7-8: Graphics Device Frame Buffer SubDevice Properties .................................. 67 Figure 7-9: Matrox G400 Block Diagram ........................................................................ 69 Figure 7-10: Matrox G400 Information Property Dialog .................................................
AMD Confidential User Manual November 21st, 2008 Tables Table 1-1: Feature Overview Public Release versus Full Release ..................................... 2 Table 2-1: Software and Hardware Requirements .............................................................. 3 Table 3-1: Cheetah_1p.bsd Devices ................................................................................. 15 Table 3-2: Device Window - Quick Reference.................................................................
AMD Confidential User Manual xii November 21st, 2008 Figures
AMD Confidential User Manual November 21st, 2008 1 Overview The AMD SimNow™ simulator is an AMD64 technology-compatible x86 platform simulator for AMD's family of processors. It is designed to provide an accurate model of a computer system from the program, OS, and programmer's point of view. It allows fast simulation of an entire computer system, plus standard debugging features such as breakpointing, memory-viewing, and single-stepping.
AMD Confidential November 21st, 2008 User Manual saved, the “*.bsd” file will have grown significantly, slightly larger than the size of simulated memory. The graphics device supplied with the simulator is a 2D and 3D graphics card with linear frame buffer and DirectX 6 support. AMD currently plans to provide a graphics model with the simulator which will also have modern 3D hardware acceleration, including Microsoft® DirectX 9/10 support.
AMD Confidential November 21st, 2008 User Manual 2 Installation 2.1 System Requirements The AMD SimNow™ simulator runs on both Linux 64 for AMD systems and Windows® for 64-bit AMD systems. The requirements for each system are as follows: Linux 64 for AMD64 OS Distribution Recommended Memory Processor Hard Disk Space Other Hardware Windows® XP 64Bit Edition for AMD64 Any of the following 64-Bit Windows XP x64 Edition or Linux distributions for AMD64. Windows Server 2003 x64 Edition for AMD64.
AMD Confidential November 21st, 2008 User Manual begin the installation, as follows. To install under Windows, double-click on the selfextracting executable. To install under Linux, extract the zipped tar file as shown below: tar –xzf Simnow-Linux64-.tar.gz 2.3 Directory Structure and Executable After the opening screen and license agreement are displayed, you will be prompted to choose an installation directory.
AMD Confidential User Manual November 21st, 2008 You can unset the per-process memory limits by running the following commands as root. ulimit -m unlimited ulimit -v unlimited 2.5 Configuration File The simulator's configuration file is a text file that may be edited and that is stored in different locations depending on which host OS you are using.
AMD Confidential User Manual November 21st, 2008 represents the automation command (please refer to Section A.7, “Automation Commands”, on page 227) that will be executes when the user clicks on the defined user button. Note that minimal parsing of the text is done, so it is important that no spaces exist around the separating comma. 2.6 Updates and Questions Please refer to the Release Notes located at "SimNow\docs" to obtain the latest information about the simulator.
AMD Confidential November 21st, 2008 User Manual 3 Graphical User Interface The simulator has a cross-platform GUI that uses the Qt toolkit. We welcome bug reports and usability feedback on the simulator. Menu Bar Simulator status Main Window Tool Bar 2D Engine Color Space Conversion Figure 3-1: Main Window (CSC) (In Simulation) Numeric Display Components Simulation Display Area 3.1 Tool Bar Buttons Video Scaling Unit The Tool Bar shown in Figure 3-1 contains upPort to eleven control buttons.
AMD Confidential User Manual November 21st, 2008 The power-management “Soft Power” button ( ) and “Soft Sleep” button ( ) are available only on simulated systems that have an Advanced Configuration and Power Interface (ACPI) BIOS. Clicking on the “Soft Power” button puts the simulated system in a very low power consumption mode. The working context can be restored if it is stored on nonvolatile media. The simulated system appears to be off.
AMD Confidential November 21st, 2008 User Manual Click on the “Best Fit To Window” button ( ) to reduce or enlarge the size of the simulated display area so that the entire simulated display area will fit into the simulators main window. If you hold down the CTRL key when clicking on the “best fit” button, it “locks” into a state where the simulated display area is resized whenever the simulated graphics display resolution changes. To clear this locked condition, click on the “best fit” button again. 3.
AMD Confidential User Manual November 21st, 2008 The Device Window, shown in Figure 3-2 with the “cheetah1_p.bsd” computer simulation loaded, graphically depicts a simulated computer system. In the simulator, a computer system is defined as a collection of device models that communicate with each other by exchanging messages. The icons in the workspace represent device models; the lines connecting the icons represent message routing.
AMD Confidential November 21st, 2008 User Manual Please note that these features are not supported by the public release version of the simulator. Figure 3-3: Workspace Popup Menu 3.2.2.1 Add Connection Please note that this feature is not supported by the public release version of the simulator. You can connect a device to another device by holding Shift, left-click, and drag from one device to the other. You will draw a line from the first device to the second.
AMD Confidential User Manual November 21st, 2008 Figure 3-4: Add Connection Dialog of Device Properties Window A device's connection appears in the “Connections” tab of the Device Properties window for each device, as shown in Figure 3-4. When you add a connection, the simulator shell sends a reset message to all of the devices in the workspace. The global reset is equivalent to power-cycling the simulated computer system. 3.2.2.2 Configure Device Most devices provide configuration options.
AMD Confidential November 21st, 2008 User Manual 3.2.2.4 Delete Device Please note that this feature is not supported by the public release version of the simulator. Selecting Delete Device from the workspace popup menu removes all connections to the specified device, and removes the device from the workspace. 3.2.3 Example Computer Description In this section we describe the major components of the computer simulation contained in the “cheetah_1p.bsd” file.
AMD Confidential November 21st, 2008 User Manual disconnect the selected device from all its connections. Please note that this feature is not supported by the public release version of the simulator. Table 3-1 lists each component in the “cheetah_1p.bsd” computer. For more information about devices and possible device configuration, please refer to Section 7, “Device Configuration” on page 53. Symbol Device Short Description AMD Debugger Standard debugging support.
AMD Confidential November 21st, 2008 User Manual Symbol Device USB JumpDrive Desktop Network Adapter Short Description The JumpDrive device allows easy import and export of data between a host system and a simulation environment. The network adapter device models an Intel Pro/1000 MT Desktop Network Adapter. Table 3-1: Cheetah_1p.bsd Devices 3.2.4 Device Window – Quick Reference Table 3-2 lists common tasks that may be done in the Device Window and describes how to complete them.
AMD Confidential User Manual November 21st, 2008 device(s) to meet a particular hardware implementation or configuration. Device groups provide a method that allows the user to group or collect one or more devices, libraries or groups into one composite device. To the user, the composite device will look and feel no different than a normal device library and, for the most part, the two should be indistinguishable.
AMD Confidential November 21st, 2008 User Manual Archive Data or Device State: A known device group has archive data for its child devices, which specifies the default and initial state for when a known device group is instantiated as a created device. A known device library also has default and initial state for when it is instantiated as a created device.
AMD Confidential November 21st, 2008 User Manual Machine Group Group Library Group Library Library y Library Library Library Figure 3-7: Device group (different conceptual view – devices are inside groups) The previous diagrams show child devices inside device groups. On the standard top level view (the context of inside the machine device), we would more simply just see three devices, see Figure 3-8 (arrows represent possible port connections between the devices).
AMD Confidential November 21st, 2008 User Manual Click on "Modify Group (Show Devices)". This will open a separate show device viewer window. Figure 3-10: Device Group If any modifications are done to the device group, then they will be saved with the BSD. Note that it is possible to modify a device group to a point where its children look nothing like the original device. 3.3.
AMD Confidential User Manual November 21st, 2008 1 simnow> shell.modules xtrsvc:0 shell:0 Cpu:0 sledgeldt:0 sledgenb:1 sledgenb:0 Cpu:1 Cpu:2 Cpu:3 sledgeldt:1 Cpu:4 Cpu:5 Cpu:6 Cpu:7 Notice the “shell.modules” list is flat, but the devices are in a tree structure that allows us to have both a "-> Machine #1 -> 4 core Node #0 -> AweSim Processor #0" and a "-> Machine #1 -> 4 core Node #1 -> AweSim Processor #0".
AMD Confidential November 21st, 2008 User Manual IOfpdis: MEM: MEMfpdis: GETMEMPTR: Mixed Disabled Mixed Disabled 1 simnow> shell.GetLogIO "-> Machine #1" PCI: Disabled IO: Disabled IOfpdis: Mixed MEM: Disabled MEMfpdis: Mixed GETMEMPTR: Disabled 3.3.5 Device Group Examples Device groups can be a powerful building block for SimNow users. These next examples should help give further understanding about device groups, and demonstrate some practical uses. 3.3.5.
AMD Confidential November 21st, 2008 User Manual Figure 3-12: Created DIMM Device Group The device GUI for the children of “Dimm DDR2 1GBx2 #0” would look like this: Figure 3-13: Children of DIMM Device Group If we looked at the options and configuration of the device library “-> Machine #1 -> Dimm DDR2 1GBx2 #0 -> Dimm Bank #0” (either from the GUI or from the console), we would see that it is already configured as DDR2 with 2 dimm slots (1GB each). This example demonstrates a broad concept.
AMD Confidential November 21st, 2008 User Manual connection ports. Once the devices are connected, a user would then need to load a product ID file so that the simulated devices would represent a real and planned piece of hardware. In summary, building a Quad-core node in SimNow could take as many as 14 individual steps, and these steps would need to be repeated each time a processor node is to be added.
AMD Confidential November 21st, 2008 User Manual This is not the only way we could create a (theoretical) “AMD 4-core CPU xxxx”. A cleaner idea would be to reuse the non-configured abstract and generic “4 core Node”. Configured with product ID file amd-xxxx.id This device group would (externally) be functionally the same as our previous “AMD 4core CPU xxxx” example, although it has the additional layer where it cleanly reuses “4 core Node”.
AMD Confidential November 21st, 2008 User Manual This brings up the device group creation wizard. On the first page, you give the group an identity as a device, by specifying device properties for the device (name, description, icon file, help file, flags). You specify a file path to save the known device group, because the wizard will create both a known device group *.
AMD Confidential November 21st, 2008 User Manual external connections are maintained, we automatically require an internal to external port mapping for an existing external connection. To finish, the wizard requires that the external port names are unique to the device group, since a device must have unique port names.
AMD Confidential November 21st, 2008 User Manual Turn This Row's Port Mapping On/Off Internal Port Names External Port Names Figure ? Clicking "OK" causes the "external ports, device state" page to regenerate its list of ports. So if you add a port using the checkbox, it will show up on the "external ports, device state" page. When you are done defining the device group then simply click the "Finish" button. This causes the device group to get created. A known device group file is created using the *.
AMD Confidential November 21st, 2008 User Manual with a new identity as a device instead of just the generic “Unnamed Group”. Finally, we can replace our “Unnamed Group” created device with a created device instance of our new known device. Here are the details of these commands: You can specify devices to get grouped into an “Unnamed Group” device: shell.GroupDevices[devices] We can modify an existing created device group‟s options: shell.
AMD Confidential November 21st, 2008 User Manual 3.3.8 Ungrouping a created device group Since a device group is really just a container for its child device's, with its own identity as a device, it is simple to ungroup a device group, on either the GUI or the console. In the show devices GUI, right-click a device group, click “Ungroup Device”. Or, in the console, execute the command: shell.UngroupDevice [created device group] 3.
AMD Confidential November 21st, 2008 User Manual These three lines of four bytes each show the values written to the diagnostic programmed I/O ports. Mostly these ports are written by the BIOS and low-level diagnostic software. Host Seconds shows the number of user and system seconds of host CPU time the simulator has uses since it started. Sim Seconds is the number of seconds of simulated time that has past since the simulator started.
AMD Confidential November 21st, 2008 User Manual Million of Instructions per Host CPU second. Exceeds 100 MIPS. Figure 3-18: CPU Real MIPS Graph 3.4.2.3 Invalidation Rate Graph The Invalidation Rate Graph updates once a second. If this value exceeds what can be displayed on this graph, the graph line turns red. A rate of zero will appear as a horizontal line, one pixel high. Full vertical scale represents one invalidatated translation per thousand simulated instructions.
AMD Confidential November 21st, 2008 User Manual instructions. Darker color on the bottom of the graph represents the read PIO's, the lighter color represents the write PIO‟s. Write PIO’s. Exceeded what can be displayed. Read PIO’s. Figure 3-21: CPU PIO Rate Graph 3.4.2.6 MMIO Rate Graph The MMIO Rate Graph updates once a second. If the memory-mapped I/O (MMIO) rate exceeds what can be displayed on this graph, the graph line turns red. A rate of zero will appear as a horizontal line one pixel high.
AMD Confidential November 21st, 2008 User Manual Figure 3-23: Primary, Secondary, and Floppy Displays When a disk is accessed in simulation, the status information is updated. 3.4.5 Using Hard Drive, DVD-/CD-ROM and Floppy Images Section 4 on page 35 describes how to create disk images. To use a disk image created by DiskTool go to the Main Window File Menu and choose one of the “Set […] Image” menu items. This brings up an open-file dialog. Select your drive image and click on „Ok‟.
AMD Confidential November 21st, 2008 User Manual Figure 3-24: Registry Window 3.4.7 Help, Problems and Bug Reports The simulator has HTML on-line help and documentation, with "Help" menu entries or buttons on the dialogs. In the device view, every device has a context menu (right-click) with "Help" documentation links and "What's this" floater text. In addition to any other support channel you may have, we encourage feedback on any problems encountered. Please send an email to simnow.support@amd.com.
AMD Confidential User Manual November 21st, 2008 4 Disk Images The simulator uses hard-drive images to provide simulated hard disks to the simulated computer. There are several ways to obtain hard drive-images. Install your OS onto a hard drive in a real system, then move it to the secondary drive in a system and use DiskTool to copy the contents of the drive to an “.hdd” image file.
AMD Confidential November 21st, 2008 User Manual window, as shown in Figure 4-1. It will also open a shell window, as shown in Figure 4-2, that is used to inform the user about all physical drives which DiskTool has detected. Figure 4-1: DiskTool Dialogue Window For information about supported options and modes that DiskTool supports, please refer to Section 13, “DiskTool”, on page 161. Figure 4-2 shows the DiskTool shell window.
AMD Confidential November 21st, 2008 User Manual To create a blank disk image click on the "Create Blank Disk Image" button on the right side of the DiskTool dialog window (see Figure 4-1). A "Save As" dialog will ask you for the location and image filename that will be created. Choose the location where you want to store the blank image file and then enter the image filename. Click on the "Save" button.
AMD Confidential November 21st, 2008 User Manual Figure 4-5: DiskTool Operation Successful To exit DiskTool click on the "Exit" button on the right side of the DiskTool dialog window (see Figure 4-1).
AMD Confidential November 21st, 2008 User Manual 5 Running the Simulator You can start AMD SimNow™ by launching "SimNow.exe" in your install directory. For convenience, you can create a desktop shortcut to launch the simulator. When you run the simulator, you will see the simulator's Main Window as shown in Figure 5-1. It will also open a console window (shown in Figure 3-15) that is used for text interaction. Figure 5-1: Main Window (No BSD Loaded) 5.
AMD Confidential November 21st, 2008 User Manual Argument -n --novga -c --nogui -d -r --register -h --help -? Description Disable VGA Window. Disable GUI (console mode). Disable mouse and keyboard inputs to simulator. Register the simulator with the O/S as an automation server. Print this help message. Table 5-1: Command-Line Arguments For instance, to open the cheetah_1p.bsd when starting the simulator you can enter the following: C:\SimNow\simnow –f cheetah_1p.bsd 5.1.
AMD Confidential November 21st, 2008 User Manual Menu Bar Tool Bar Main Window CPU Graph Area Simulator status Numeric Display Components Simulation Display Area Figure 5-2: Main Window (BSD Loaded) You can view the configuration of the simulated machine by clicking on . A window appears with a graphical representation of the simulated machine, as shown in Figure 5-3.
AMD Confidential November 21st, 2008 User Manual Figure 5-3: Device Window 5.2 Installing an Operating System This section describes the steps that are necessary to install Windows or Linux using the simulator. Before you can start installing an operating system make sure you have a blank hard-drive image available. To create a blank hard-drive image with DiskTool please follow the steps in Section 4.1, "Creating A Blank Hard-Drive Image", on page 35. 5.2.
AMD Confidential User Manual November 21st, 2008 You can download Linux ISO images from fedora.redhat.com. If you are a MSDN Subscription member you can also download Windows ISO images from Microsoft's MSDN Subscription Webpage. You can assign a physical host DVD-/CD-ROM drive to the simulators IDE Secondary Master Channel and use your hosts physical DVD-/CD-ROM drive to install from a CD or DVD media.
AMD Confidential November 21st, 2008 User Manual Use a raw floppy-disk image in a manner similar to the above. It's a lot smaller and a bit more hassle, so we don't recommend it. Mount a hard-disk image on the host. (On a Linux host, you can use the "loopback device"). Use the JumpDrive USB device to copy files into the simulator and out of the simulator, see. Section A.7.26, “JumpDrive”, on page 247.
AMD Confidential November 21st, 2008 User Manual 5.2.3 Interaction with the Simulated Machine The simulator will boot and the simulated output screen appears in the bottom right portion of the Main Window, which is the Simulation Display Area. When the focus is on this portion of the window, most keystrokes and mouse operations are passed through to the simulated machine.
AMD Confidential November 21st, 2008 User Manual configurations, etc., in the new machine, and they are completely independent of any other „machine‟ currently loaded. The leading number before the prompt identifies which machine is currently the active machine. All subsequent automation commands typed into the console window are directed to the current machine. Table 5-2 describes the arguments provided by the newmachine command.
AMD Confidential November 21st, 2008 User Manual * = Specifies current Machine ID. +d: Mouse and Keyboard inputs are enabled. -d: Mouse and keyboard inputs are disabled. 2 simnow> listmachines *2 –-gui -–vga +d 1 –-gui –-vga +d 2 simnow> VGA Window is enabled. GUI is enabled (console mode). See also Section 5.1, “Command-Line Arguments”, on page 39 for further information regarding available command-line arguments. .
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential November 21st, 2008 User Manual 6 Create a Simulated Computer This section describes how to create a simulated computer from scratch. We will build a computer identical to the “solo.bsd” computer. Please note that this only works if you are not using the public release version of the simulator. The public release version of the simulator does not support the necessary features which are required to create a simulated computer from scratch.
AMD Confidential November 21st, 2008 User Manual 1. Open a new simulator instance by launching "SimNow.exe" in your install directory. 2. Select “File→New BSD“ or click on the button to create a new BSD file. 3. Select “View→Show Devices” or click on the button to show the blank Device Window. 4. For each item added, click and drag the icon from the device list on the left side into the workspace area on the right side of the window. 5. Add the Debugger device. This device needs no connections drawn. 6.
AMD Confidential User Manual November 21st, 2008 10. Add the Matrox Millenium G400 Graphics Device. This is the simulated video device. Connect it to the AMD-8151 AGP Tunnel Device using AMD-8151 AGP Tunnel AGP Bus and the Graphics Device's AGP or PCI Bus. 11. Add the Southbridge Device. Connect it to AMD-8151 AGP Tunnel using AMD8151 AGP Tunnel HyperTransport Bus 1 and HyperTransport Bus 0. Also, connect AMD-8111™ to the DIMM device using AMD-8111 System Management Bus 0 and DIMM‟s Generic Bus. 12.
AMD Confidential November 21st, 2008 User Manual Figure 6-3: PCI Bus Configuration dialog window 4. Configure the DIMM Memory device. Go to the Dimm 0 tab. Click Import SPD. Open the SPD file Images/simnow_DDR_256M.spd. 5. Configure the AweSim CPU device. Go to the Processor Type tab. Choose the Ahtlon64-754_SH-C0_(800MHz).id product file, as shown in Figure 7-1 on page 56. 6.4 Save and Run The created simulated computer is identical to the “solo.bsd” computer.
AMD Confidential November 21st, 2008 User Manual 7 Device Configuration Each section in this chapter provides a description of how to configure device models in the simulator‟s Device Properties window.
AMD Confidential November 21st, 2008 User Manual Symbol Device USB Keyboard Public Release Full Release USB Mouse XTR Device ITE 8712 SIO ATI SB400/SB600/SB700 ATI RS480/RD790/RS780/RD890 AMD “Istanbul”/AMD “Sao Paulo”/AMD “Magny-Cours” Table 7-1: Supported Devices To open a Device Property dialog window, open the Device View window “View→Show Devices” or click on the button. Then Open the workspace popup menu, right-click on a device in the workspace area and select “Configure Device”.
AMD Confidential User Manual November 21st, 2008 7.1 AweSim Processor Device The AweSim processor device provides a simulation of an AMD microprocessor. Interfaces Three interfaces are used in the AweSim device: CPU Bus 0. This interface is used to issue memory and I/O read and write requests, as well as cache control and input/output signal messages. This interface is generally connected to the Northbridge device. Interrupt Bus.
AMD Confidential November 21st, 2008 User Manual Figure 7-1: AweSim Processor-Type Properties Figure 7-2 shows the Logging tab for the AweSim processor device. Here you can specify the following configuration options: Check the Log Disassembly check box to log the disassembly of the instructions executed by the processor model. Check the Log Register State Changes check box to log all the processor model register state changes.
AMD Confidential November 21st, 2008 User Manual Figure 7-2: AweSim Processor Logging Properties Dialog Log Messages This device produces log messages to the Message Log Window as specified by the options in the Message Log Windows (see Section 9 “Logging”, on page 141). Difference from Real Hardware While the processor device is a faithful simulation of the software-visible portion of an AMD microprocessor, it is not a model of the specific AMD microprocessor hardware.
AMD Confidential November 21st, 2008 User Manual 7.2 Debugger Device The debugger allows debugging tasks such as break-pointing, single-stepping, and other standard tasks. Interfaces The debugger has no interfaces; the debugger is present if it is in the Device Window. To add the Debugger Device follow these steps: 1. Select “View→Show Devices”. 2. Click and drag the Debugger Device icon from the device list on the left side into the workspace area on the right side of the Device Window. 3.
AMD Confidential User Manual November 21st, 2008 7.3 DIMM Device The DIMM device provides a simulation model of an array of up to four dual-inlinememory modules (DIMMs). The model provides RAM storage and serial presence detect (SPD) ROM access for each DIMM. Bytes 0, 5, 13, and 31 (zero-based) of the SPD data are used to configure the DIMM model. The remaining SPD entries are available for BIOS probing, but are not used to configure the DIMM model.
AMD Confidential User Manual November 21st, 2008 Figure 7-3: AMD Opteron™ Processor Virtual Bank-Select Line Configuration Memory controllers in AMD Athlon™ 64 provide eight bank select lines. However, in this case, each bank-select is routed to only one physical DIMM bank, i.e., the banks are not ganged. Figure 7-4: AMD Athlon™ 64 Processor Bank-Select Line Configuration Configuration of the DIMM Device allows the user to specify SPD data for each simulated DIMM.
AMD Confidential User Manual November 21st, 2008 Once the simulation is started, the DIMM Device allocates memory arrays to hold the DRAM data. One array is allocated for each bank or virtual bank. In the case of 64-bit memory interfaces, memory arrays are allocated to match the size of the physical banks on each DIMM. If the memory interface is 128 bits, then the memory arrays are sized to the sum of the physical bank pairs that make up the virtual banks.
AMD Confidential November 21st, 2008 User Manual Figure 7-5: DIMM-Bank Options Properties Dialog Figure 7-5 shows the dialog for configuring DIMM-bank options. The PDL Error Simulation Control section specifies the type of error that the DIMM device will generate, when a memory read is attempted and when a Northbridge PDL is set outside the valid response range. These settings apply to all four simulated DIMMs.
AMD Confidential November 21st, 2008 User Manual Figure 7-6: DIMM Module Properties Dialog The two DIMM module configuration dialogs, shown in Figure 7-6, (DIMM0 – DIMM1) provide module-specific setup options for each simulated DIMM. The two DIMM module configuration dialogs share the same format. Note: The public release of the simulator does not support any of the options shown in Figure 7-6. To change the simulated memory size please use the Memory Configurator, see Section 14.
AMD Confidential User Manual November 21st, 2008 The upper part of the dialog lists some summary information. This information, which is derived from the SPD data, gives a quick indication of the type of device being simulated. The center section of the dialog lists all 256 bytes of data held in the simulated SPD ROM. The list box provides a description of each byte index in the ROM. If a description is selected, the corresponding data byte is displayed in the text box to the right.
AMD Confidential User Manual November 21st, 2008 7.4 Emerald Graphics Device The Emerald graphics device provides an industry-standard PCI/AGP VGA-compatible video device. The device provides a fully functional set of PCI configuration registers. The AGP interface is currently somewhat minimal, and is not capable of generating AGP cycles nor AGP-specific modes at this time. The Emerald graphics device is comprised of a standard VGA and the Emerald Graphics sub device.
AMD Confidential User Manual November 21st, 2008 Figure 7-7: Graphics-Device VGA Sub Device Properties Dialog In Figure 7-7, the BIOS File option enables you to load different VGA BIOS ROMs into the device. The VGA ROM is assumed to be a maximum of 32-Kbytes, and is assigned to ISA bus address 0x000C0000 - 0x000C7FFF, which is the industry-standard location. This file must be a standard binary file, with the correct header and checksum information already incorporated.
AMD Confidential November 21st, 2008 User Manual Figure 7-8: Graphics Device Frame Buffer SubDevice Properties Difference from Real Hardware The Emerald Graphics device currently does not simulate any specific graphics hardware, it simulates something functionally “like” a modern graphics adapter, with only 2D acceleration implemented at this time. Drivers are Windows only at the moment.
AMD Confidential November 21st, 2008 User Manual Mode Number 140h 141h 142h 143h 144h 145h 146h 147h 148h 149h 14Ah 14Bh 14Ch 14Dh 14Eh 14Fh 150h Resolution 320x200 640x480 800x600 1024x768 1280x720 1280x720 1280x960 1280x960 1280x1024 1600x1200 1600x1200 1920x1080 1920x1080 1920x1200 1920x1200 2048x1536 2048x1536 Color depth 32-bit 32-bit 32-bit 32-bit 16-bit 32-bit 16-bit 32-bit 32-bit 16-bit 32-bit 16-bit 32-bit 16-bit 32-bit 16-bit 32-bit Table 7-3: Supported Custom VESA Modes Improve Graphics Per
AMD Confidential November 21st, 2008 User Manual 7.5 Matrox MGA-G400 PCI/AGP The Matrox G400 graphics device provides a high performance PCI/AGP VGAcompatible video device. The device provides a fully functional set of PCI configuration registers, and a 2D drawing engine. The AGP interface is currently somewhat minimal, and is not capable of generating neither AGP cycles nor AGP-specific modes at this time.
AMD Confidential User Manual November 21st, 2008 Interfaces The Matrox G400 graphics device has both a PCI bus and an AGP bus connection, only one of which can be used at any time to connect to PCI bus or AGP bus ports in other devices. Initialization and Reset State Upon initial creation, this device initializes the internal registers to Matrox G400 standard reset state, and creates a display window that acts as the VGA display.
AMD Confidential November 21st, 2008 User Manual Figure 7-10: Matrox G400 Information Property Dialog The Configuration tab displays details about the active configuration of the Matrox G400 graphics device. If you want to change the active configuration, click on the Configuration Tab (see Figure 7-11).
AMD Confidential November 21st, 2008 User Manual Figure 7-11: Matrox G400 Configuration Properties The BIOS ROM File input field gives you the ability to load different Matrox G400 BIOS ROMs into the device. This is in particular useful if Matrox releases a new BIOS ROM file which has improvements or bug fixes. To check for new Matrox BIOS http://www.matrox.com/mga/support/drivers/bios/.
AMD Confidential User Manual November 21st, 2008 to timing, such as the vertical retrace time, will be different. Any software that depends on exact timing behavior may not function correctly. The following features are only partially implemented. Any software that depends on these features may not function correctly. Translucency / Full Alpha-Blending Full Texture Mapping Gouraud Shaded Fills (ALPHA, FOG, STENCIL) Trapezoids functions Bitblts a. Color Patterning 8x8 b.
AMD Confidential November 21st, 2008 User Manual a. Patterned Fills b. Constant Shaded c. Gouraud Shaded (partially) d. Texture Mapping (partially) Trapezoids a. Constant Shaded Lines a. Auto-Lines (line open/line close) b. Solid-Lines (line open/line close) 8, 15, 16, 24, and 32 Bits Per Pixel video modes ILOAD Pseudo- DMA Window Transfers Programmable, transparent BLTer Linear packed pixel frame buffer Supported DirectX 6.1 Features Alpha Test0 Alpha Blending Functions a.
AMD Confidential November 21st, 2008 User Manual Mode Number 0x0108 0x0109 0x010A 0x010B 0x010C 0x0100 0x0101 0x0110 0x0111 0x0112 0x0102 0x0103 0x0113 0x0114 0x0115 0x0105 0x0116 0x0117 0x0118 0x0107 0x0119 0x011A 0x011B 0x011C 0x011D 0x011E Type VGA VGA VGA VGA VGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA SVGA Organization Resolution 80x60 Text 132x25 Text 132x43 Text 132x50 Text 132x60 Text Packed-pixel 8 bpp Packed-pixel 8 bpp Packed-pixel
AMD Confidential November 21st, 2008 User Manual Supported Guest Operating Systems Table 7-6 shows all operating systems which are tested and known to work with the Matrox G400 graphics device model: Guest Operating System MS-DOS Windows 2000 Windows XP (32-bit/64-bit) Windows Server 2003 (32-bit/64-bit)) Windows Vista Beta 2 Build 5308 (32-bit/64-bit) Linux (32-bit/64-bit), RedHat/SuSE/SuSE Xen Solaris 10 for AMD64 Device Driver Version N/A 5.93.009 5.93.009/1.11.00.114SE 5.93.009/1.11.00.
AMD Confidential November 21st, 2008 User Manual Figure 7-12: Enable Full Hardware Acceleration on WindowsXP guest Enabling Hardware Cursor Support Please follow the following steps to enable native hardware cursor support on Windows platforms: 1. 2. 3. 4. 5. 6. Install latest Matrox G400 drivers. Reboot computer. Right click on “My Computer” and select “Properties”. Click on “Advanced‟, “Performance”, and then on “Settings…”. Uncheck “Show shadows under mouse pointer” checkbox.
AMD Confidential User Manual November 21st, 2008 7.6 Super IO Devices: Winbond W83627HF SIO / ITE 8712 SIO Device models of the Super IO device contain the keyboard, PS/2 mouse, floppy, COM1, COM2, LPT1, IR, fan, GPIO, MIDI, and joystick devices, as well as PCI support and control information. The COM1 and COM2 devices create named-pipes "SimNow.Com1" and "SimNow.Com2” and send all serial communication through these.
AMD Confidential November 21st, 2008 User Manual Floppy COM1 and COM2 LPT1 IR GPIO MIDI Joystick Fan All devices store their current state in the BSD files, as well as any data that may be buffered at the time of the save. Register content is also saved for all devices. Configuration Options The Super I/Os have the capability of setting device breakpoints on an event basis. In this case, the event is the sequence of writes to access the Super I/O's device configuration registers.
AMD Confidential User Manual November 21st, 2008 Floppy Configuration Options The floppy is capable of reading disk images of real floppies created with the DiskTool Utility, described in Section 13, on page 161. To use an image, first create an image file with DiskTool and then specify the floppy image file in the Super I/O configuration dialog page. Difference from Real Hardware Keyboard, Mouse, Floppy, COM1 and COM2 differ from real hardware. Baud rate, parity, and stop bits are ignored.
AMD Confidential User Manual November 21st, 2008 7.7 Memory Device The memory device enables you to add memory devices to the system. You can configure the memory device for emulation of ROM or dynamic memory. You specify the total memory size and the beginning address to which the device should respond. The memory device can also be configured as a LPC flash device. It currently models 2Mb (SST49LF020A), 4Mb (SST49LF040A), 8Mb (SST49LF080A) and 16Mb (SST49LF160C) flash memory devices.
AMD Confidential November 21st, 2008 User Manual Selecting the System BIOS ROM option tells the memory device it is the system BIOS. The memory device only responds to memory address ranges accompanied by a chipselect that is generated by the Southbridge device. Selecting Flash Mode option tells the memory device that it is configured as a flash memory device. There are two command sequences supported by our flash memory device - SST and ATMEL, which can be selected by the drop down below.
AMD Confidential User Manual November 21st, 2008 Difference from Real Hardware The memory device differs in that it is a generic memory model. When configured as a BIOS ROM, it does not contain flash-specific information that a modern flash ROM contains (for programming information purposes).
AMD Confidential November 21st, 2008 User Manual 7.8 PCA9548 SMB Device The PCA9548 is an 8-channel System Management Bus (SMB) switch. Interface The PCA9548 has one input port and eight output ports, as well as a programmable interface that directs the switch which output port to forward messages to. Initialization and Reset State The PCA9548 has the input value specified in its configuration dialog window. Contents of a BSD The PCA9548 saves its SMB base address and input pin value.
AMD Confidential November 21st, 2008 User Manual 7.9 PCA9556 SMB Device The PCA9556 is a registered System Management Bus (SMB) interface. When queried from its SMB base address, it returns the value of its input pins. Interfaces The PCA9556 has one output port. Initialization and Reset State The PCA9556 has the input value specified in its configuration dialog window. Contents of a BSD The PCA9556 saves its SMB base address and input pin value.
AMD Confidential November 21st, 2008 User Manual 7.10 AMD 8th Generation Integrated Northbridge Device The AMD 8th Generation Integrated Northbridge device supports the AMD 8th generation family of processors - AMD Athlon™ 64 and AMD Opteron™ processors. Although the physical processor chip has a Northbridge built in, for simulation purposes, the Northbridge is considered as a separate unit. Features include HyperTransport™ technology (for coherent and non-coherent connections) and a memory controller.
AMD Confidential November 21st, 2008 User Manual Figure 7-17: Northbridge Logging Capabilities Properties Dialog If Log PCI Configuration Cycles is selected, the device will produce log messages whenever PCI configuration registers are accessed. If Log HyperTransport Message Routing is selected, the device will log HyperTransport messages. Figure 7-18: Northbridge HT Link Configuration Properties Dialog If the DDR DRAM Controller is selected, the device will support DDR DRAM.
AMD Confidential November 21st, 2008 User Manual Each HyperTransport link can be enabled separately. Each link can be 8- or 16-bits wide. Only the 940-pin AMD Opteron processor can have three links; a 754-pin AMD Athlon 64 has one HyperTransport port. Figure 7-19: Northbridge DDR2 Training Properties Dialog When the DDR2 DRAM Controller is selected and DDR2 DRAM is being used you can manually modify these values to verify the correctness of the DDR2 training algorithmn.
AMD Confidential User Manual November 21st, 2008 The data value, e, is always one byte (two hex digits) in width. The device will log multiple messages for PCI configuration accesses that are greater than one byte in width.
AMD Confidential November 21st, 2008 User Manual 7.11 AMD-8111™ Southbridge Devices – IO Hubs The Southbridge devices provide the basic I/O Southbridge functionality of the system. Features include a PIO-mode IDE controller, register set for the USB controller(s), an LPC/ISA bridge, a system-management bus controller, IOAPIC bus bridge if applicable, and legacy AT devices (PIC, PIT, CMOS, timer, and DMA controller).
AMD Confidential November 21st, 2008 User Manual Figure 7-20: USB Properties Dialog (AMD-8111™ Southbridge) The CMOS dialogue window, shown in Figure 7-21, gives the user the ability to change the contents of CMOS. When first created, the CMOS contains all zeroes to force a CMOS checksum error, resulting in the default settings being loaded by BIOS. The alternative to this is loading a binary file containing the CMOS desired data.
AMD Confidential User Manual November 21st, 2008 Figure 7-21: CMOS Properties Dialog (AMD-8111™ Southbridge) The Primary HDD Channel and Secondary HDD Channel tabs, shown in Figure 7-22, contain the same information for each hard drive channel. The user has two options for drive simulation: an image of a hard drive created with DiskTool (see Section 13 on page 161), or use of a real hard disk.
AMD Confidential User Manual November 21st, 2008 Turning off journaling is recommended during the installation process for an operating system. Figure 7-22: HDD Primary Channel Properties Dialog (AMD-8111 Southbridge) Device Options The AMD-8111 device has specific configuration requirements that relate to device option type and HyperTransport information. The Default Base Unit ID is a way of telling the device of the strapping option for ID selection.
AMD Confidential User Manual November 21st, 2008 Figure 7-23: Device Options Properties Dialog (AMD-8111 chipset) Log Messages The AMD-8111 device produces log messages to the Message Log Window as specified by the options in the Logging Option tab, shown in Figure 7-24. The device can log I/Omapped Transactions, Memory-mapped Transactions, and SMI and SCI assertions.
AMD Confidential November 21st, 2008 User Manual Figure 7-24: Logging Options Properties Dialog (AMD-8111 chipset) Differences from Real Hardware The AMD-8111 Southbridge device differs from other devices mainly in those items that deal with real-time operation. Those items cannot be modeled in the current simulator. The model does not include any of the power-management registers. The functionality of the USB 2.
AMD Confidential User Manual November 21st, 2008 7.12 PCI BUS Device The PCI Bus device enables you to add PCI devices to the system. You can configure the PCI Bus device to provide any number of PCI slots for one to six connections. You configure each PCI slot on the PCI Bus by setting its device number and base IRQrouting pin. Interfaces The PCI Bus device has two types of interfaces, a bus interface and one or more slot interfaces.
AMD Confidential November 21st, 2008 User Manual Figure 7-25: PCI Bus Properties Dialog The first field is the Device ID of the slot. This value may range from zero to 31. The second field is the Base IRQ Pin for the slot. You can choose from pin A, B, C, or D. The third field is an Enable Slot. By default, all slots are disabled. One cannot disable a slot that has a device connected to it. Differences from Real Hardware The PCI Bus device differs from other devices in that it is a generic model.
AMD Confidential November 21st, 2008 User Manual 7.13 AMD-8131™ PCI-X® Controller The AMD-8131 PCI-X Controller is a HyperTransport tunnel that provides two PCI-X buses and two IOAPICs. These PCI-X buses may or may not be configured as hot-plugcapable, depending on the platform. Interfaces The AMD-8131 has two types of interfaces, HyperTransport and PCI buses. It has two HyperTransport links, HT0 and HT1, that can connected to other non-coherent HyperTransport link-capable devices.
AMD Confidential November 21st, 2008 User Manual 7.14 AMD-8132™ PCI-X® Controller The AMD-8132 PCI-X Controller is a HyperTransport tunnel that provides two PCI-X buses and two IOAPICs. These PCI-X buses may or may not be configured as hot-plugcapable, depending on the platform. Interface AMD-8132 has two types of interfaces, HyperTransport and PCI buses. It has two HyperTransport links, HT0 and HT1, that can connect to other HyperTransport linkcapable devices.
AMD Confidential November 21st, 2008 User Manual Figure 7-28: AMD-8132 Properties Dialog The Upstream HyperTransport Link selection, shown in Figure 7-28, specifies the HyperTransport Bus that will be used as a upstream link. Differences from Real Hardware Clock-sensitive functionality, like setting bus speed, is not supported. Neither are system errors, nor power management.
AMD Confidential User Manual November 21st, 2008 7.15 PCI-X Test Device This PCI-X Test Device model provides a simulation of a generic PCI-X device. Its main purpose is to provide BIOS programmers with a tool to test the PCI-X configuration cycle. This device is implemented as a single-function device. Interface The interface varies from system to system. In the AMD Athlon 64 or AMD Opteron processor-based system configurations, it can be connected to AMD-8131 PCI-X or AMD-8111 Southbridge devices.
AMD Confidential November 21st, 2008 User Manual 7.16 AMD-8151™ AGP Bridge Device The AMD-8151 AGP Bridge Device tunnel is a HyperTransport tunnel that provides an AGP bridge. In general, AMD-8151 would be connected in a non-coherent HyperTransport chain between the host bridge and the Southbridge. Interface The AMD-8151 has three types of interfaces, HyperTransport, AGP, and INT/IOAPIC buses.
AMD Confidential User Manual November 21st, 2008 Differences from Real Hardware Clock-sensitive functionality, like setting bus speeds, is not supported. The HyperTransport bus protocol is not simulated.
AMD Confidential November 21st, 2008 User Manual 7.17 Raid Device: Compaq SmartArray 5304 The RAID device uses disk images, which are accessed as simulated volumes by the RAID controller. Storage devices like ATA HDD and RAID are implemented with concepts like disk-block cache, journaling, file, and memory stores. This page describes journaling in more detail. A simulated volume in the RAID device is represented by an image file and one or more optional journals.
AMD Confidential User Manual November 21st, 2008 7.18 SMB Hub Device The SMB hub device is used to connect one SMBus to any of four SMBus branches. The device is programmed via read-byte and write-byte commands on the SMBus where the 7-bit address field is 0x18. The SMB hub device models the combination of two physical devices manufactured by Philips Semiconductors: the PCA9516 5-channel I2C hub, and the PCA9556 Octal SMBus and I2C registered interface.
AMD Confidential November 21st, 2008 User Manual Figure 7-30: SMB Hub Properties Dialog Differences from Real Hardware This device model is the combination of two physical devices connected in a specific way. The model attempts to match the functionality of the physical devices from a programmer's perspective. The SMBus protocol is not modeled. Also, the SMBus address of the PCA9556 is programmable based on pin-strapping, whereas this model has a fixed SMBus base address.
AMD Confidential November 21st, 2008 User Manual 7.19 AT24C Device The AT24C device is a Serial EEPROM device. It can be configured to store 16, 32, or 64Kb of EEPROM. The device has an SMB bus interface for access to its internal registers. It is typically used to store platform specific configuration data. Interface The AT24C device has a SMB interface. For example, this device can be connected to a PCA9548 or PCA9556 device (see Section 7.8, "PCA9548 SMB Device", on page 84 or Section 7.
AMD Confidential User Manual November 21st, 2008 7.20 EXDI Server Device This interface, and the instructions contained herein, applies only to the Windows operating system-hosted version of the simulator. The simulator provides a special device known as the EXDI Server Device. This device can be added to any BSD. When a BSD containing the EXDI Server Device is loaded, the EXtended Debugging Interface becomes available.
AMD Confidential User Manual November 21st, 2008 7.21 USB Keyboard and USB Mouse Devices USB legacy emulation is not yet supported by the simulator model. USB 2.0 support is very limited, only basic PCI configuration and memory read and write functionality is available. By default, the simulator uses the keyboard device model to send user‟s keystrokes to the simulation.
AMD Confidential User Manual November 21st, 2008 7.22 XTR Device XTR is a trace record and playback mechanism that is instrumental for applications that are not dependent on the specific version of the CPU. An XTR trace contains the interaction of the processor with the rest of the system in an XML based log file.
AMD Confidential User Manual November 21st, 2008 7.22.1 Using XTR No special setup for XTR Record is required; XTR can be recorded by using the appropriate automation commands as described in Section A.7.28, “XTR”, on page 250. The XTR XML file can easily exceed five Gbytes in size. Please make sure you have enough physical storage before you start XTR Record. 7.22.1.1 Recoding XTR Trace To record XTR, please enter the following commands in the simulator‟s console window: 1 simnow> xtrsvc.
AMD Confidential November 21st, 2008 User Manual SetErrorLogFileEnabled 1 go [or hit Run on the shell] 7.22.1.4 Stop XTR Playback XTR Playback will stop automatically when End Of Trace (EOT) event is reached. It could also be stopped prematurely by clicking on the stop button or by executing the stop automation command. Initialization and Reset State XTR Record does not have any special Initialization or Reset state. Init from BSD The BSD contents of XTRNB are loaded.
AMD Confidential User Manual November 21st, 2008 XTRNB: Attempting to allocate large buffer of size 1074503680 Logged during XTR initialization phase just before XTR tries to allocate memory to simulate DIMM. XTRNB: Sending APIC initialization data to CPU0 Logged during XTR initialization phase just before APIC memory is initialized. XTRNB: Write to TSC ignored. Please use M00000010 for writes to TSC Logged during XTR initialization phase.
AMD Confidential November 21st, 2008 User Manual XTRNB: Setting event trigger delay for CPU0[DMAW] to 1205 Logged during execution. DMAW event is setup to be triggered at a later point. 1205 is the difference between NOW and event time. XTRNB: Processing queued event CPU0[DMAW] ICount=8403 ShellICount=8403. Logged during execution. Trigger for event setup earlier is invoked. CPU0 and DMAW could have different values depending on which CPU it is (MP-XTR only) and which event is processed.
AMD Confidential November 21st, 2008 User Manual . . . APIC initialization information. An FJMP Instruction. RIP is optional and is only used to double check whether if the FJMP is taken at the correct instruction.
AMD Confidential November 21st, 2008 User Manual Defines a Memory Read or Memory Write event. MEMR and MEMW are recorded for MMIO ranges. 7.22.2.2 XTR Binary File Contents XTR Binary file contains the memory image of the system just before the XTR Record started.
AMD Confidential November 21st, 2008 User Manual Execution Control Flag ECF_UNUSED ECF_HALT ECF_SHUTDOWN ECF_FPUHANG ECF_APICHOLD ECF_IGNOREINTR ECF_TRAP ECF_EXECBP ECF_LATCHEDSMI ECF_STACKEDSMI ECF_LATCHEDNMI ECF_SMIEDGE ECF_NMIEDGE ECF_APICMSGPENDING ECF_APICACTPENDING ECF_DR7CODEBREAKS ECF_LASTWASIO Value 0x00008000 0x00010000 0x00020000 0x00040000 0x00080000 0x00100000 0x00200000 0x00400000 0x00800000 0x01000000 0x02000000 0x04000000 0x08000000 0x10000000 0x20000000 0x40000000 0x80000000 Description
AMD Confidential User Manual PAGE 131AMD Confidential November 21st, 2008 User Manual Device="CPU0" Device="CPU0" Device="CPU0" Device="CPU0" Device="CPU0" Device="CPU0" De
AMD Confidential User Manual November 21st, 2008 PAGE 133AMD Confidential User Manual PAGE 134AMD Confidential User Manual November 21st, 2008 PAGE 135AMD Confidential User Manual November 21st, 2008 7.23 JumpDrive Device The purpose of the JumpDrive device is to allow easy import and export of data between a host system and a simulation environment. You can import files from the host system on to the JumpDrive, where they will be accessible by the simulated operating system. Data can also be exported from the JumpDrive back to the host system after the simulation ended.
AMD Confidential November 21st, 2008 User Manual 7.24 E1000 Network Adapter Device The network adapter device models an Intel Pro/1000 MT Desktop Network Adapter. The adapter depends heavily on MAC address assignment in order to determine how visible it is to real network resources or other simulator network sessions. The adapter model requires a separate mediator process to bridge access to the real network.
AMD Confidential November 21st, 2008 User Manual Alternatively a multi-machine approach can be used in which multiple BSD‟s are loaded in the same process space. This architecture allows the simulator sessions to pass packets back and forth without the need for a mediator. Running without a mediator isolates the simulator sessions from the real network. For more information on running multiple simulator instances in the same process, see Section 5.3, Multi-Machine Support, on page 45.
AMD Confidential November 21st, 2008 User Manual the NIC model to retry a mediator connection or search for any simulator peers, running in the same process. 7.24.2 The Mediator Daemon The mediator provides several services for the simulator session: Access to real network resources (DHCP servers, etc.). Note that the mediator will need to be run with supervisor privileges in order to snoop network traffic on its host. Bridge communication to other simulator sessions.
AMD Confidential November 21st, 2008 User Manual -v[v][v] -m XX:XX network traffic. This device number will need to be one listed using the “-l” command. Turns on verbose output. The verbosity level gets noisier with the number of “v” on the command line. Denotes the two high bytes used to classify the simulator‟s MAC addresses. By default these values are FA:CD, but can be configured to avoid collisions with real hardware. Table 7-9: Mediator Command Line Switches 7.24.
AMD Confidential November 21st, 2008 User Manual Visibility: Mediator String: DHCP acquired address. Can be seen by external network and all simulator sessions running anywhere on the network. “Hostname” Table 7-10: MAC Address Assignments 7.24.4.2 Client-Server simulated network This configuration uses “fixed” MAC addresses to allow this domain to be replicated in the mediator space, without colliding with one another.
AMD Confidential November 21st, 2008 User Manual Visibility: Mediator String: Can only communicate with BSD‟s in the same simulator process using multiple machines. N/A Table 7-14: Isolated Client-Server: Simulator Client 1 7.24.5 Visibility Diagram Figure 7-34 depicts the mediator routing packets to and from several simulator sessions in different domains. The session running BSD #3 is using an absolute MAC address, and therefore is globally visible.
AMD Confidential User Manual November 21st, 2008 7.25 Plug and Play Monitor Device The Plug and Play Monitor device (PnP Monitor) conforms to the VESA Plug and Play Monitor specification and therefore supports the DDC2B standard. DDC (Display Data Channel) is the Plug and Play standard for monitors. DDC monitors are designed to meet the VESA (Video Electronic Standards Association) standard that defines the DDC implementation.
AMD Confidential November 21st, 2008 User Manual Figure 7-35: Plug and Play Monitor Device Configuration Chapter 7: Device Configuration 131
AMD Confidential User Manual November 21st, 2008 7.26 ATI SB400/SB600/SB700 Southbridge Devices The ATI Southbridge devices provide the basic I/O Southbridge functionality of the system. Features include 4 or 6 SATA ports, a PIO-mode IDE controller supporting 1 or 2 channels, fully functinoal USB 1.1 Controller supporting legacy emulation, an LPC/ISA bridge, an SMB 2.0 compliant controller, an IOAPIC controller, HPET timer, and legacy AT devices (8259 PIC, 8254 PIT, CMOS, and DMA controller).
AMD Confidential November 21st, 2008 User Manual Figure 7-36: ATI SB600 SATA Configuration Dialog Log Messages These SouthBridge devices have the ability to log messages to the Message Log Window as specified by the options in the Logging Option tab. These devices can log I/O-mapped Transactions, Memory-mapped Transactions, and SMI and SCI assertions. Difference from Real Hardware These Southbridge devices differ from other devices mainly in those items that deal with real-time operation.
AMD Confidential User Manual November 21st, 2008 7.27 ATI RS480/RS780/RD790/RD890 Northbridge Devices The ATI RS480/RD790/RS780 feature set includes an upstream HyperTransport CPU interface, a PCI-E interface, and an A-Link PCI-E dowstream interface to the SouthBridge. Depending on the part and the platform, each device may have some number of available PCI-E slots to connect with endpoint devices.
AMD Confidential User Manual November 21st, 2008 7.28 AMD “Istanbul” Device The AMD "Istnabul" device is a 6 core processor node, suitable for an L1 socket. It emulates a planned product that derives from a revision of the AMD Family10h product line. The device iteself is composed of 6 individual AweSim Processor Devices that are connected to a single “AMD 8th Generation Integrated Northbridge Device”. For more information on Group Devices, see Section 3.3, “Device Groups", on page 3.3.
AMD Confidential User Manual November 21st, 2008 7.29 AMD “Sao Paulo” Device The AMD "Sao Paulo" device is a 8 core processor node, suitable for a G34 socket. It emulates a planned product that derives from a revision of the AMD Family10h product line. The device iteself is composed of 8 individual AweSim Processor Devices that are connected to a single “AMD 8th Generation Integrated Northbridge Device”. For more information on Group Devices, see Section 3.3, “Device Groups", on page 3.3.
AMD Confidential User Manual November 21st, 2008 7.30 AMD “Magny-Cours” Device The AMD "Magny-Cours" device is a 12 core processor node, suitable for a G34 socket. It emulates a planned product that derives from a revision of the AMD Family10h product line. The device iteself is composed of 12 individual AweSim Processor Devices that are connected to dual AMD 8th Generation Integrated Northbridge Devices. For more information on Group Devices, see Section 3.3, “Device Groups", on page 3.3.
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential November 21st, 2008 User Manual 8 PCI Configuration Viewer The PCI Config Viewer can be used to scan PCI buses and report information about the configuration-space settings for each PCI device.
AMD Confidential November 21st, 2008 User Manual 8.1 Scanning PCI Buses To view the PCI Config Viewer Dialog select the "View→Show PCI Config Viewer” entry from the Main Window menu. To scan a PCI bus, you must first load a bsd file that contains a CPU device. The dialog should look like the one shown in Figure 8-1. 8.2 Modifying the PCI Configuration contents To modify the PCI configuration registers of a specific PCI device, select a device listed in the PCI Config Viewers list box.
AMD Confidential User Manual November 21st, 2008 9 Logging The simulator provides support for three types of logging: A message log that can provide detailed text data from simulator devices and modules. An error log that provides text messages in response to critical errors or unexpected conditions. I/O Logging that provides detailed information about PCI Configuration, I/O and Memory Space accesses. 9.
AMD Confidential November 21st, 2008 User Manual Figure 9-1: Message Log The left-hand window lists all of the currently loaded modules. The user may individually enable or disable logging from a given module by using the checkbox next to the module's name. In addition, the user may configure module-specific logging options by double-clicking on the module name.
AMD Confidential November 21st, 2008 User Manual 9.2 Error Log The simulator provides an interface that loaded modules may use to report critical errors or unexpected conditions. The messages are always written to a file, and the most-recent messages may be displayed in a window. The error log may not be disabled. The most-recent error log entries may be viewed by selecting the "View→Error Log" entry from the Main Window menu, shown in Figure 9-2.
AMD Confidential November 21st, 2008 User Manual 9.3 I/O Logging This is a generic feature available on all devices for logging slave accesses (i.e. accesses responded to by this device). Several categories of generic I/O logging are available. Logging is performed to the I/O loggers (see Section 9.1, "Message Log", on page 141) of names similar to the device you are enabling the logging for.
AMD Confidential User Manual November 21st, 2008 This item, checked by default, disables the Fastpath Memory mechanism when Memory Space Accesses logging is enabled. If this is unchecked, accesses may not appear in the log. WARNING: Un-checking this item may lead to significantly compromised performance of SimNow if large numbers of accesses are being made to the device in question. For example, logging all accesses to the DIMM device would make SimNow extremely slow.
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential November 21st, 2008 User Manual 10 CPU Debugger 10.1 Using the CPU Debugger The CPU Debugger provides a list of commands and their descriptions when the “?” command is typed in the bottom line of the debug window, shown in Figure 10-1. CPU Attach Button CPU Registers Disassembly Instruction Opcode cs:[r][e]ip Memory Dump Memory Dump in ASCII Memory Dump Address Information and Message Output Command Line Figure 10-1: CPU Debugger Window 10.1.1 Setting a Breakpoint 1.
AMD Confidential November 21st, 2008 User Manual address parameter that specifies a linear address associated with the breakpoint. An optional parameter can be used to specify the pass count, i.e., the number of times the breakpoint should be hit before breaking into the debugger. In addition, the BM and BI commands accept an optional parameter that specifies whether to break on a read/input, or write/output transaction to the specified address. Examples of each command are shown in Table 10-1. 4.
AMD Confidential November 21st, 2008 User Manual which will step into calls, interrupts, etc., executing the next instruction regardless of its type. 4. The debugger will repeat the last entered command, if you just type Enter in the command edit window. So, you can repeatedly execute the pretty trace command by entering P once, then repeatedly hitting the Enter key. 5. The simulation can be returned to continuous execution by entering G. This executes the debugger's Go command. 10.1.
AMD Confidential November 21st, 2008 User Manual Table 10-2: Debugger Memory Dump Command Examples When using Pacifica Virtualization Technology in simulation, the user can tell the debugger to access memory for either the guest or the host. If multiple guests are running under a hypervisor, the debugger will acess memory for the last guest that has run. The user can further qualify an input address using the 'G' (Guest) and 'H' (Host) specifiers.
AMD Confidential November 21st, 2008 User Manual Table 10-4: MSR Read Examples 4. MSR registers can be modified by adding a "= Value" suffix on the above command syntax. Value will be assigned to the MSR register only if the value does not modify any reserved bits in the MSR. If an attempt is made to modify any reserved bits, the MSR write is ignored. An example MSR write is shown in Table 10-5: 5. This command may not allow access to all MSRs that are supported by the CPU model.
AMD Confidential November 21st, 2008 User Manual Table 10-7 lists the debugger commands and their definitions. Debugger Command Definition Displays an abbreviated list of the available commands and their syntax. Repeat of previous command. * Execute an automation command. #P [; Sets the file search path. #L [Load Address] Loads the named symbol file, optionally offsetting each address by the given load offset.
AMD Confidential User Manual Debugger Command bm
[r | w] [v[b|w|d] ] bs bx c[r|w] [data] d[b|w|d|q] [,[l|p] e[b|w|d|q] AMD Confidential November 21st, 2008 User Manual Debugger Command p r [regname[= ]] R16 R32 R64 s t [count] u [address range] v q [noncase] [,[l|p]] <[[L]Length] | [EndAddress]> Definition Similar to the t command, single steps the simulation one instruction, unless the current instruction is a call, software interrupt, or repeated string instruction, in which case this command sets a temporary execution breakpoint at the instruction seque
AMD Confidential User Manual November 21st, 2008 11 Debug Interface The simualtor supports Linux and Windows® based debugging. It is recommended to use the GDB interface to debug on Linux based hosts. The kernel debugger interface can be used to debug on Windows based hosts. 11.1 Kernel Debugger This only applies to the Windows® version of the simulator and not to the Linux version. The simulator can interact with the kernel debugger through: EXDI interface (see Section 7.
AMD Confidential November 21st, 2008 User Manual The pipe is not created until the first “go” command will be executed. This can be achieved by clicking on the “go” button followed by a click on the “stop” button. This command sequence will setup the named-pipe. If you try to connect the kernel debugger without setting up the named-pipe as described the kernel debugger will return an error message.
AMD Confidential User Manual November 21st, 2008 Run the following automation command: 1 simnow> shell.gdb Start gdb gdb> set architecture i386:x86-64 gdb> target remote:2222 11.2.2 Alternate Approach This assumes you are running the simualtor and gdb on the same machine. Start the simulator Run the following automation command: 1 simnow> shell.gdb Add the following to your .
AMD Confidential User Manual November 21st, 2008 output pipe at "~./simnow/comX/simnow_in" and "~./simnow/comX/simnow_out". External applications should read data from the simulation using the simnow_out named-pipe. Conversely, external applications should send serial data to the simulation using the simnow_in pipe. Note that it is not possible for two simualtor sessions to communicate with each other on the same host using named-pipes.
AMD Confidential User Manual November 21st, 2008 12 Command API The CMDAPI (cmdapi.dll) gives Windows users a way to script the simulator using any scripting language that can interface with the Microsoft Component Object Model (COM). It gives you the opportunity to create scripts that instantiate a simulator object. You can use this instantiated object to execute any of the SimNow™ automation commands, see Section A.7, “Automation Commands”, on page 227.
AMD Confidential November 21st, 2008 User Manual use Win32::OLE; use Win32::OLE::Variant; $Win32::OLE::Warn = 3; $cmd = Win32::OLE->new('SimNow.Command') or die "Cannot open SimNow.
AMD Confidential User Manual November 21st, 2008 13 DiskTool Use the DiskTool utility to create hard-disk images. DiskTool copies, byte-for-byte, the contents of a secondary hard disk into an .hdd file. This .hdd file can be loaded as a disk image in the simulator. DiskTool runs in two modes, GUI mode, and command-line mode. Double-clicking on the DiskTool icon, or running DiskTool from the command line with no command line options, starts DiskTool in GUI mode.
AMD Confidential User Manual November 21st, 2008 Option: E = Erase (Write zeros to all blocks) physical device. Syntax: {/E|-E} Example: disktool –e /dev/hd0 This command writes zeros to all sectors on device /dev/hd0. Option: N = Create a new blank image file that represents a freshly formatted device. Syntax: {/N|-N} Example: disktool –n image.hdd 102400 This command creates an image file named image.
AMD Confidential November 21st, 2008 User Manual Figure 13-1: DiskTool Shell Window DiskTool will only copy drives - not partitions, although it does have the ability to stop copying at the end of a given partition. So, for example, you can copy the contents of a drive starting at the beginning of the drive and ending at the end of the 2nd partition, but you can not copy only the 2nd partition. LINUX Note: The list box always shows /dev/fd0 and /dev/fd1.
AMD Confidential November 21st, 2008 User Manual Figure 13-2: DiskTool GUI Window You may select any physical drive in your system, including floppy drives. Selecting a drive updates the Drive Information list box as shown in Figure 13-3.
AMD Confidential November 21st, 2008 User Manual When a drive is selected, you have the option to get an image from the drive, put an image onto the drive, or erase the contents of the drive. If you erase the contents of the drive, a dialog will ask for confirmation that you actually wish to permanently destroy the contents of that hard disk. In case DiskTool displays an “Operation failed!” message box, DiskTool was unable to lock or unlock the drive.
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential User Manual November 21st, 2008 14 BIOS Developer’s Quick Start Guide This section provides you with instructions on how to perform common tasks within the simulation environment. The tasks described in this section are likely to be of particular interest to BIOS developers. However, developers of other types of software will benefit as well, especially from tasks like logging CPU cycles and using the debugger. 14.1 Loading a BIOS Image 1.
AMD Confidential November 21st, 2008 User Manual Figure 14-1: Memory Configurator Note: The public release of the simulator supports no specific or non-symmetric DIMM configurations. To change the simulated memory size please use the Memory Configurator. If you want specific or non-symmetric DIMM configurations please follow these steps: 1. Use “View→Show Devices” to show the Devices Window. 2.
AMD Confidential November 21st, 2008 User Manual 3. Select the tab for the DIMM slot that you wish to alter. 4. Select an SPD byte description from the large list box. The corresponding data byte will be shown as two hex digits in the small edit box to the right of the list box. 5. Type a new hex value in the edit box. 6. Optionally, the altered SPD data can be saved to a file by clicking the Export SPD button. 7. Click OK to close the configuration property sheet and accept the changes.
AMD Confidential November 21st, 2008 User Manual 3. Log messages will only be captured from devices that have a check beside their name. If the Northbridge device does not have a check, then check it by clicking its check box. 4. Select whether to send log messages to the window, and/or to a file. If logging to a file, enter a filename for the log file. 5. Execute the simulation, and the requested information will be logged. Figure 14-3: Message Log Window 14.
AMD Confidential User Manual November 21st, 2008 14.7 Creating a Floppy-Disk Image Use the DiskTool utility to create a floppy-disk image file suitable for loading into the simulator. DiskTool is located in the “SimNow\Tools" directory. To create an image of a physical floppy disk, see Section 13, “DiskTool”, on page 161. When the image has been created, it can be loaded into the simulation as described in Section 5.1.1, “Open a Simulation Definition”, on page 40.
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential User Manual November 21st, 2008 15 Frequently Asked Questions (FAQ) Why is the mouse cursor very difficult to control inside the simulated display area? The mouse on the Host and in the Guest do not track each other very well in general. We provide another mouse mode to help with this. Click on the menu item "Special Keyboard→Grab Mouse and Keyboard", see Section 5.2.3, “Interaction with the Simulated Machine”, on page 45.
AMD Confidential November 21st, 2008 User Manual What devices are supported? See Section 7, “Device Configuration”, on page 53. What about graphics/video adapter? See Section 1, “Overview”, on page 1 and Section 7.4, “Emerald Graphics Device on page 65. What about networking? See Section 7.24, “E1000 Network Adapter Device”, on page 124. How does the simulator access media? What are Hard Disk, DVD-/ CD-ROM Disk, or Floppy Disk images? See Section 4, “Disk Images”, on page 35.
AMD Confidential User Manual November 21st, 2008 How do I change the amount of system RAM installed in a BSD? See Section 7.3, “DIMM Device”, on page 59. How do I change the processor type of a processor in a BSD? See Section 7.1, “AweSim Processor Device - Configuration Options”, on page 55. How do I enable or disable IDE Hard Disk image journaling? See Section 5.2.1, “Assigning Disk-Image”, on page 42 or A.7.2 IDE on page 232. Why does Windows Server 2003 crash? See Section A.
AMD Confidential User Manual November 21st, 2008 1 simnow> usb:0.
AMD Confidential User Manual November 21st, 2008 A Appendix A.1 Format of Floppy and Hard-Drive Images The floppy-disk format assumes a standard 1.44 Mbyte floppy disk, consisting of 80 cylinders, 2 heads, and eighteen 512-byte sectors per head (36 sectors per cylinder). The image file consists simply of each sector, starting with the first sector of the first cylinder on the first head, and proceeding sequentially through the last sector of the last cylinder on the second head.
AMD Confidential November 21st, 2008 User Manual A.2 Bill of Material A.2.1 Computer Platform Files (BSD) This section gives a brief description of the computer platform description (BSD) files, devices, and disk- and ROM-image files that come with AMD SimNow™ Platform Simulator. Note: The public release version of the simulator comes only with the following computer platform description files, the "Cheetah_1p_emerald.bsd" and "Cheetah_1p_jh_emerald.bsd". Public release version 4.4.
AMD Confidential November 21st, 2008 User Manual A.2.3 Product Files (*.ID) A product file configures the CPU and Northbridge to represent and behave as an actual AMD product. A product file will set the CPUID Family Model and Stepping, the BrandID, the MANID, and fuses. Note: The public release version of the simulator doesn't contain any product files! Product File CPU Type # CPU Cores PIN Rev. Athlon64-754_SH-C0_(800MHz).id Athlon64-754_SH-CG_(800MHz).id Athlon64-754_SH-D0_(800MHz).
AMD Confidential November 21st, 2008 User Manual File name Bare-4gig.hdd Bare-8gig.hdd Description 4-GB bare hard disk image. 8-GB bare hard disk image. Table 15-3: Hard-Disk Images A.2.4.2 Memory SPD Files When a computer is booted (started), serial presence detect (SPD) is information stored in an electrically erasable programmable read-only memory (EEPROM) chip on memory module that tells the BIOS the memory module's size, data width, and speed.
AMD Confidential November 21st, 2008 User Manual In order to use unbuffered DDR/DDR2 memory we recommend using the “simnow_DDRx_yyyy_.spd” SPD files. To use buffered DDR/DDR2 memory use the “simnow_DDRx_yyyy_reg.spd” SPD files (for DDR2 x = 2 and yyyy = size in Mbytes). A.3 Supported Guest Operating Systems Table 15-5 lists the guest OS compatibility matrix.
AMD Confidential November 21st, 2008 User Manual A.4 CPUID This section is an overview of the CPUID feature implementation in the AweSim CPU processor model. A.4.1 CPUID Standard Feature Support (Standard Function 0x01) Table 15-6 shows the standard feature bits returned by the AweSim CPU processor model and which features are fully ( ) or only partially ( ) implemented and supported. A indicates that the returned feature bit is zero and this feature is not implemented and not supported.
AMD Confidential November 21st, 2008 User Manual Table 15-6: CPUID Standard Feature implementation A.4.2 CPUID AMD Feature Support (Extended Function 0x80000001) Table 15-7 shows the extended feature bits returned by the AweSim CPU processor model and which features are fully ( ) or only partially ( ) implemented and supported. A indicates that the returned feature bit is zero and this feature is not implemented and not supported. 7th Generation Feature 8th Generation (Base) 8th Generation Pre.-Rev.
AMD Confidential November 21st, 2008 User Manual A.5 Known Issues A.5.1 FSAVE/FRSTOR and FSTENV/FLDENV When the simulator is executing FSAVE/FRSTOR and FSTENV/FLDENV in real-mode it is using the 16-bit protected-mode memory format. A.5.2 Triple Faulting If the processor encounters an exception while trying to invoke the double fault (#DF) exception handler, a triple fault exception occurs. This can rarely occur, but is possible.
AMD Confidential User Manual November 21st, 2008 The code we execute in step 6 will probably be the old code because our page-based coherency mechanism depends on the software TLB to write protect pages which have x86 code that has been translated. However, this mechanism protects physical pages through the virtual mapping mechanism and this mechanism only knows about one virtual address mapping, not all possible mappings of any code page.
AMD Confidential November 21st, 2008 User Manual A.6 Instruction Reference This section specifies the hexadecimal and/or binary encodings for the opcodes that SimNow does ( ), does not ( ) or does partially ( ) simulate when simulating an AMD 8th Generation CPU, Rev. F. A.6.1 Notation A.6.1.1 Mnemonic Syntax Each instruction has a syntax that includes the mnemonic and any operands that the instruction can take. Figure A-1 shows an example of a syntax in which the instruction takes two operands.
AMD Confidential User Manual November 21st, 2008 mem32int – Doubleword (32-bit) integer operand in memory. mem64real – Double-precision (64-bit) floating-point operand in memory. mem64int – Quadword (64-bit) integer operand in memory. mem80real – Double-extended-precision (80-bit) floating-point operand in memory. mem80dec – 80-bit packed BCD operand in memory, containing 18 4-bit BCD digits.
AMD Confidential User Manual November 21st, 2008 reg/mem64 – Quadword (64-bit) operand in a GPR register or memory. rel8off – Relative address in the current code segment, in 8-bit offset range. rel16off - Relative address in the current code segment, in 16-bit offset range. rel32off - Relative address in the current code segment, in 32-bit offset range. segReg or sReg – Word (16-bit) operand in a segment register. ST(0) – x87 stack register 0.
AMD Confidential November 21st, 2008 User Manual +i – Specifies an x87 floating-point stack operand, ST(i). The value is used only with x87 floating-point instructions. It is added to the hexadecimal byte on the left, forming a one-byte opcode. Valid values range from 0 to 7. A.6.2 General Purpose Instructions This chapter describes the function, mnemonic syntax, and opcodes that the simulator simulates. General-purpose instructions are used in basic software execution.
AMD Confidential November 21st, 2008 User Manual ADD ADD ADD ADD ADD ADD Mnemonic reg/mem32,reg32 reg/mem64,reg64 reg8,reg/mem8 reg16,reg/mem16 reg32,reg/mem32 reg64,reg/mem64 01 01 02 03 03 03 AND AL,imm8 24 AND AX,imm16 25 AND EAX,imm32 25 AND RAX,imm32 25 AND reg/mem8,imm8 80 AND reg/mem16,imm16 81 AND reg/mem32,imm32 81 AND reg/mem64,imm32 81 AND reg/mem16,imm8 83 AND reg/mem32,imm8 83 AND reg/mem64,imm8 83 AND reg/mem8,reg8 20 AND reg/mem16,reg16 21 AND reg/mem32,reg32 2
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode BSF reg64,reg/mmem64 0F BC /r BSR reg16,reg/mmem8 0F BD /r BSR reg32,reg/mmem32 0F BD /r BSR reg64,reg/mmem64 0F BD /r BSWAP reg32 BSWAP reg64 0F C8 +rd 0F C8 +rd BT reg/mem16,reg16 0F A3 /r BT reg/mem32,reg32 0F A3 /r BT reg/mem64,reg64 0F A3 /r BT reg/mem16,imm8 0F BA /4 ib BT reg/mem32,imm8 0F BA /4 ib BT reg/mem64,imm8 0F BA /4 ib BTC mem/mem16,reg16 0F BB /r BTC mem/mem32,reg32 0F BB /r BTC mem/mem
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic AE /7 Description Copy the value of the selected bit to the carry flag, and then set the selected bit. Copy the value of the selected bit to the carry flag, and then set the selected bit. Copy the value of the selected bit to the carry flag, and then set the selected bit. Near call with the target specified by a 16-bit relative displacement. Near call with the target specified by a 32-bit relative displacement.
AMD Confidential November 21st, 2008 User Manual Mnemonic CMOVNC reg32,reg/mem32 CMOVNC reg64,reg/mem64 CMOVAE reg16,reg/mem16 CMOVAE reg32,reg/mem32 CMOVAE reg64,reg/mem64 CMOVZ reg16,reg/mem16 CMOVZ reg32,reg/mem32 CMOVZ reg64,reg/mem64 CMOVE reg16,reg/mem16 CMOVE reg32,reg/mem32 CMOVE reg64,reg/mem64 CMOVNZ reg16,reg/mem16 CMOVNZ reg32,reg/mem32 CMOVNZ reg64,reg/mem64 CMOVNE reg16,reg/mem16 CMOVNE reg32,reg/mem32 CMOVNE reg64,reg/mem64 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F 0F CMOVBE reg16,re
AMD Confidential November 21st, 2008 User Manual Mnemonic CMOVL reg64,reg/mem64 0F CMOVNGE reg16,reg/mem16 0F CMOVNGE reg32,reg/mem32 0F CMOVNGE reg64,reg/mem64 0F CMOVNL CMOVNL CMOVNL CMOVGE CMOVGE CMOVGE reg16,reg/mem16 reg32,reg/mem32 reg64,reg/mem64 reg16,reg/mem16 reg32,reg/mem32 reg64,reg/mem64 0F 0F 0F 0F 0F 0F CMOVLE reg16,reg/mem16 0F CMOVLE reg32,reg/mem32 0F CMOVLE reg64,reg/mem64 0F CMOVNG reg16,reg/mem16 0F CMOVNG reg32,reg/mem32 0F CMOVNG reg64,reg/mem64 0F CMOVNLE reg1
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic CMP reg/mem8,reg8 38 /r CMP reg/mem16,reg16 39 /r CMP reg/mem32,reg32 39 /r CMP reg/mem64,reg64 39 /r CMP reg8,reg/mem8 3A /r CMP reg16,reg/mem16 3B /r CMP reg32,reg/mem32 3B /r CMP reg64,reg/mem64 3B /r CMPS mem8,mem8 A6 CMPS mem16,mem16 A7 CMPS mem32,mem32 A7 CMPS mem64,mem64 A7 CMPSB A6 CMPSW A7 CMPSD A7 CMPSQ A7 CMPXCHG reg/mem8,reg8 0F B0 /r CMPXCHG reg/mem16,reg16 0F B1 /r CMPXCHG reg/mem
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic CMPXCHG8B 0F C7 /1 m64 CPUID 0F A2 DAA DAS 27 2F DEC reg/mem8 FE /1 DEC reg/mem16 FF /1 DEC reg/mem32 FF /1 DEC reg/mem64 FF /1 DEC reg16 48 +rw DEC reg32 48 +rd DIV reg/mem8 F6 /6 DIV reg/mem16 F7 /6 DIV reg/mem32 F7 /6 DIV reg/mem64 F7 /6 ENTER imm16,0 CB iw 00 ENTER imm16,1 CB iw 01 ENTER imm16,imm8 CB iw ib IDIV reg/mem8 F6 /7 IDIV reg/mem16 F7 /7 IDIV reg/mem32 F7 /7 196 Description Co
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode IDIV reg/mem64 F7 /7 IMUL reg/mem8 F6 /5 IMUL reg/mem16 F7 /5 IMUL reg/mem32 F7 /5 IMUL reg/mem64 F7 /5 IMUL reg16,reg/mem16 OF AF /r IMUL reg32,reg/mem32 OF AF /r IMUL reg64,reg/mem64 OF AF /r IMUL reg16,reg/mem16,imm8 6B /r ib IMUL reg32,reg/mem32,imm8 6B /r ib IMUL reg64,reg/mem64,imm8 6B /r ib IMUL reg16,reg/mem16,imm16 69 /r iw IMUL reg32,reg/mem32,imm32 69 /r id IMUL reg64,reg/mem64,imm32 69 /r i
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic IN AL,imm8 E4 ib IN AX,imm8 E5 ib IN EAX,imm8 E5 ib IN AL,DX EC IN AX,DX ED IN EAX,EDX ED INC reg/mem8 FE /0 INC reg/mem16 FF /0 INC reg/mem32 FF /0 INC reg/mem64 FF /0 INC reg16 40 +rw INC reg32 40 +rd INS mem8,DX 6C INS mem16,DX 6D INS mem32,DX 6D INSB 6C INSW 6D INSD 6D INT imm8 CD ib INTO CE JO rel8off JO rel16off JO rel32off JNO rel8off JNO rel16off JNO rel32off 80 0F 0F 71 0F 0F 198
AMD Confidential November 21st, 2008 User Manual Mnemonic JB rel8off JB rel16off JB rel32off JC rel8off JC rel16off JC rel32off JNAE rel8off JNAE rel16off JNAE rel32off JNB rel8off JNB rel16off JNB rel32off JNC rel8off JNC rel16off JNC rel32off JAE rel8off JAE rel16off JAE rel32off JZ rel8off JZ rel16off JZ rel32off JE rel8off JE rel16off JE rel32off JNZ rel8off JNZ rel16off JNZ rel32off JNE rel8off JNE rel16off JNE rel32off 72 0F 0F 72 0F 0F 72 0F 0F 73 0F 0F 73 0F 0F 73 0F 0F 74 0F 0F 74 0F 0F 75 0F 0F
AMD Confidential November 21st, 2008 User Manual Mnemonic JP rel16off JP rel32off JPE rel8off JPE rel16off JPE rel32off JNP rel8off JNP rel16off JNP rel32off JPO rel8off JPO rel16off JPO rel32off JL rel8off JL rel16off JL rel32off 0F 0F 7A 0F 0F 7B 0F 0F 7B 0F 0F 7C 0F 0F JNGE rel8off 7C JNGE rel16off 0F JNGE rel32off 0F JNL JNL JNL JGE JGE JGE 7D 0F 0F 7D 0F 0F rel8off rel16off rel32off rel8off rel16off rel32off JLE rel8off 7E JLE rel16off 0F JLE rel32off 0F JNG rel8off 7E JNG rel16off
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic JMP reg/mem16 FF /4 JMP reg/mem32 FF /4 JMP reg/mem64 FF /4 JMP FAR pntr16:16 EA cd JMP FAR pntr16:32 EA cp JMP FAR mem16:16 FF /5 JMP FAR mem16:32 FF /5 LAHF 9F LDS reg16,mem16:16 C5 /r LDS reg32,mem16:32 C5 /r LES reg16,mem16:16 C4 /r LES reg32,mem16:32 C4 /r LFS reg16,mem16:16 0F B4 /r LFS reg32,mem16:32 0F B4 /r LGS reg16,mem16:16 0F B5 /r LGS reg32,mem16:32 0F B5 /r LSS reg16,mem16:16 0F B2 /
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic LODSD AD LODSQ AD LOOP rel8off E2 cb LOOPE rel8off E1 cb LOOPNE rel8off E0 cb LOOPNZ rel8off E0 cb LOOPZ rel8off E1 cb MFENCE 0F AE F0 MOV reg/mem8,reg8 88 /r MOV reg/mem16,reg16 89 /r MOV reg/mem32,reg32 89 /r MOV reg/mem64,reg64 89 /r MOV reg8,reg/mem8 8A /r MOV reg16,reg/mem16 8B /r MOV reg32,reg/mem32 8B /r MOV reg64,reg/mem64 8B /r MOV reg16/32/64/mem16,segReg 8C /r MOV segReg,reg/mem16 8E
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic MOV reg32,imm32 B8 +rd MOV reg64,imm64 B8 +rq MOV reg/mem8,imm8 C6 /0 MOV reg/mem16,imm16 C7 /0 MOV reg/mem32,imm32 C7 /0 MOV reg/mem64,imm64 C7 /0 MOVD xmm,reg/mem32 66 0F 6E /r MOVD xmm,reg/mem64 66 0F 6E /r MOVD reg/mem32,xmm 66 0F 7E /r MOVD reg/mem64,xmm 66 0F 7E /r MOVD mmx,reg/mem32 0F 6E /r MOVD mmx,reg/mem64 0F 6E /r MOVD reg/mem32,mmx 0F 7E /r MOVD reg/mem64,mmx 0F 7E /r MOVMSKPD reg32,xmm 6
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic MOVSD A5 MOVSQ A5 MOVSX reg16,reg/mem8 0F BE /r MOVSX reg32,reg/mem8 0F BE /r MOVSX reg64,reg/mem8 0F BE /r MOVSX reg32,reg/mem16 0F BF /r MOVSX reg64,reg/mem16 0F BF /r MOVSXD reg64,reg/mem32 63 /r MOVZX reg16,reg/mem8 0F B6 /r MOVZX reg32,reg/mem8 0F B6 /r MOVZX reg64,reg/mem8 0F B6 /r MOVZX reg32,reg/mem16 0F B7 /r MOVZX reg64,reg/mem16 0F B7 /r MUL reg/mem8 F6 /4 MUL reg/mem16 F7 /4 MUL reg/mem32
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic NOP 90 NOT reg/mem8 F6 /2 NOT reg/mem16 F7 /2 NOT reg/mem32 F7 /2 NOT reg/mem64 F7 /2 OR AL,imm8 0C ib OR AX,imm16 0D iw OR EAX,imm32 0D id OR RAX,imm64 0D id OR reg/mem8,imm8 80 /1 ib OR reg/mem16,imm16 81 /1 iw OR reg/mem32,imm32 81 /1 id OR reg/mem64,imm32 81 /1 id OR reg/mem16,imm8 83 /1 ib OR reg/mem32,imm8 83 /1 ib OR reg/mem64,imm8 83 /1 ib OR reg/mem8,reg8 08 /r OR reg/mem16,reg16 09 /r
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic OUT imm8,AX E7 ib OUT imm8,EAX E7 ib OUT DX,AL EE OUT DX,AX EE OUT DX,EAX EE OUTS DX,mem8 6E OUTS DX,mem16 6F OUTS DX,mem32 6F OUTSB 6E OUTSW 6F OUTSD 6F POP reg/mem16 8F /0 POP reg/mem32 8F /0 POP reg/mem64 8F /0 POP reg16 58 +rw POP reg32 58 +rd POP reg64 58 +rq POP DS 1F POP ES 07 POP SS 17 POP FS 0F A1 POP GS 0F A9 POPA 61 POPAD 61 POPF 9D POPFD 9D POPFQ 9D PREFETCH mem8
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic PREFETCHNTA mem8 0F 18 /0 PREFETCHT0 mem8 0F 18 /1 PREFETCHT1 mem8 0F 18 /2 PREFETCHT2 mem8 0F 18 /3 PUSH reg/mem16 FF /6 PUSH reg/mem32 FF /6 PUSH reg/mem64 FF /6 PUSH reg16 50 +rw PUSH reg32 50 +rd PUSH reg64 50 +rq PUSH imm8 6A PUSH imm16 68 PUSH imm32 68 PUSH imm64 68 PUSH CS PUSH SS PUSH DS PUSH ES PUSH FS PUSH GS PUSHF PUSHFD PUSHFQ 0E 16 1E 06 0F A0 0F A8 9C 9C 9C RCL reg/mem8,1 D0 /2 RCL re
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode RCL reg/mem32,1 D1 /2 RCL reg/mem32,CL D3 /2 RCL reg/mem32,imm8 C1 /2 ib RCL reg/mem64,1 D1 /2 RCL reg/mem64,CL D3 /2 RCL reg/mem64,imm8 C1 /2 ib RCR reg/mem8,1 D0 /3 RCR reg/mem8,CL D2 /3 RCR reg/mem8,imm8 C0 /3 ib RCR reg/mem16,1 D1 /3 RCR reg/mem16,CL D3 /3 RCR reg/mem16,imm8 C1 /3 ib RCR reg/mem32,1 D1 /3 RCR reg/mem32,CL D3 /3 RCR reg/mem32,imm8 C1 /3 ib RCL reg/mem64,1 D1 /3 Rotate the 65 bit
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic RCR reg/mem64,imm8 C1 /3 ib RET C3 RET imm16 C2 iw RETF CB RETF imm16 CA iw ROL reg/imm8,1 D0 /0 ROL reg/mem8,CL D2 /0 ROL reg/mem8,imm8 C0 /0 ib ROL reg/imm16,1 D1 /0 ROL reg/mem16,CL D3 /0 ROL reg/mem16,imm8 C1 /0 ib ROL reg/imm32,1 D1 /0 ROL reg/mem32,CL D3 /0 ROL reg/mem32,imm8 C1 /0 ib ROL reg/imm64,1 D1 /0 ROL reg/mem64,CL D3 /0 ROL reg/mem64,imm8 C1 /0 ib ROR reg/imm8,1 D0 /0 ROR reg/mem
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic ROR reg/imm32,1 D1 /0 ROR reg/mem32,CL D3 /0 ROR reg/mem32,imm8 C1 /0 ib ROR reg/imm64,1 D1 /0 ROR reg/mem64,CL D3 /0 ROR reg/mem64,imm8 C1 /0 ib SAHF 9E SAL reg/mem8,1 D0 /4 SAL reg/mem8,CL D2 /4 SAL reg/mem8,imm8 C0 /4 ib SAL reg/mem16,1 D1 /4 SAL reg/mem16,CL D3 /4 SAL reg/mem16,imm8 C1 /4 ib SAL reg/mem32,1 D1 /4 SAL reg/mem32,CL D3 /4 SAL reg/mem32,imm8 C1 /4 ib SAL reg/mem64,1 D1 /4 SAL reg
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode SHL reg/mem16,1 D1 /4 SHL reg/mem16,CL D3 /4 SHL reg/mem16,imm8 C1 /4 ib SHL reg/mem32,1 D1 /4 SHL reg/mem32,CL D3 /4 SHL reg/mem32,imm8 C1 /4 ib SHL reg/mem64,1 D1 /4 SHL reg/mem64,CL D3 /4 SHL reg/mem64,imm8 C1 /4 ib SAR reg/mem8,1 D0 /7 SAR reg/mem8,CL D2 /7 SAR reg/mem8,imm8 C0 /7 ib SAR reg/mem16,1 D1 /7 SAR reg/mem16,CL D3 /7 SAR reg/mem16,imm8 C1 /7 ib SAR reg/mem32,1 D1 /7 SAR reg/mem32,CL
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic SBB EAX,imm32 1D id SBB RAX,imm32 1D id SBB reg/mem8,imm8 80 /3 ib SBB reg/mem16,imm16 80 /3 iw SBB reg/mem32,imm32 81 /3 id SBB reg/mem64,imm32 81 /3 id SBB reg/mem16,imm8 83 /3 ib SBB reg/mem32,imm8 83 /3 ib SBB reg/mem64,imm8 83 /3 ib SBB reg/mem8,reg8 18 /r SBB reg/mem16,reg16 19 /r SBB reg/mem32,reg32 19 /r SBB reg/mem64,reg64 19 /r SBB reg8,reg/mem8 1A /r SBB reg16,reg/mem16 1B /r SBB reg32,reg
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic SCAS mem64 AF SCASB AE SCASW AF SCASD AF SCASQ AF SETO reg/mem8 SETNO reg/mem8 SETB reg/mem8 SETC reg/mem8 0F 0F 0F 0F SETNAE reg/mem8 0F 92 SETNB reg/mem8 SETNC reg/mem8 SETAE reg/mem8 SETZ reg/mem8 SETE reg/mem8 SETNZ reg/mem8 SETNE reg/mem8 0F 0F 0F 0F 0F 0F 0F SETBE reg/mem8 0F 96 SETNA reg/mem8 0F 96 SETNBE reg/mem8 0F 97 SETA reg/mem8 0F 97 SETS reg/mem8 SETNS reg/mem8 SETP reg/mem8 SETPE reg/mem8 SE
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode SHL reg/mem8,CL D2 /4 SHL reg/mem8,imm8 C0 /4 ib SHL reg/mem16,1 D1 /4 SHL reg/mem16,CL D3 /4 SHL reg/mem16,imm8 C1 /4 ib SHL reg/mem32,1 D1 /4 SHL reg/mem32,CL D3 /4 SHL reg/mem32,imm8 C1 /4 ib SHL reg/mem64,1 D1 /4 SHL reg/mem64,CL D3 /4 SHL reg/mem64,imm8 C1 /4 ib SHLD reg/mem16,reg16,imm8 0F A4 /r ib SHLD reg/mem16,reg16,CL 0F A5 /r SHLD reg/mem32,reg32,imm8 0F A4 /r ib SHLD reg/me326,reg32,CL 0F
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode SHR reg/mem8,1 D0 /5 SHR reg/mem8,CL D2 /5 SHR reg/mem8,imm8 C0 /5 ib SHR reg/mem16,1 D1 /5 SHR reg/mem16,CL D3 /5 SHR reg/mem16,imm8 C1 /5 ib SHR reg/mem32,1 D1 /5 SHR reg/mem32,CL D3 /5 SHR reg/mem32,imm8 C1 /5 ib SHR reg/mem64,1 D1 /5 SHR reg/mem64,CL D3 /5 SHR reg/mem64,imm8 C1 /5 ib SHRD reg/mem16,reg16,imm8 0F AC /r ib SHRD reg/mem16,reg16,CL 0F AD /r SHRD reg/mem32,reg32,imm8 0F AC /r ib SHRD
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic SHRD reg/mem16,reg16,CL 0F AD /r STC STD F9 FD STOS reg8 AA STOS reg16 AB STOS reg32 AB STOS reg64 AB STOSB AA STOSW AB STOSD AB STOSQ AB SUB AL,imm8 2C ib SUB AX,imm16 2D iw SUB EAX,imm32 2D id SUB RAX,imm32 2D id SUB reg/mem8,imm8 80 /5 ib SUB reg/mem16,imm16 81 /5 iw SUB reg/mem32,imm32 81 /5 id SUB reg/mem64,imm32 81 /5 id SUB reg/mem16,imm8 83 /5 ib SUB reg/mem32,imm8 83 /5 ib SUB reg/
AMD Confidential November 21st, 2008 User Manual Mnemonic Instruction Opcode SUB reg/mem8,reg8 28 /r SUB reg/mem16,reg16 29 /r SUB reg/mem32,reg32 29 /r SUB reg/mem64,reg64 29 /r SUB reg8,reg/mem8 2A /r SUB reg16,reg/mem16 2B /r SUB reg32,reg/mem32 2B /r SUB reg64,reg/mem64 2B /r TEST AL,imm8 AB ib TEST AX,imm16 A9 iw TEST EAX,imm32 A9 id TEST RAX,imm32 A9 id TEST reg/mem8,imm8 F6 /0 ib TEST reg/mem16,imm16 F7 /0 iw TEST reg/mem32,imm32 F7 /0 id TEST reg/mem64,imm32 F7 /0 i
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic TEST reg/mem64,reg64 85 /r XADD reg/mem8,reg8 0F C0 /r XADD reg/mem16,reg16 0F C1 /r XADD reg/mem32,reg32 0F C1 /r XADD reg/mem64,reg64 0F C1 /r XCHG AX,reg16 90 +rw XCHG reg16,AX 90 +rw XCHG AX,reg32 90 +rd XCHG reg32,AX 90 +rd XCHG RAX,reg64 90 +rq XCHG reg64,RAX 90 +rq XCHG reg/mem8,reg8 86 /r XCHG reg8,reg/mem8 86 /r XCHG reg/mem16,reg16 87 /r XCHG reg16,reg/mem16 87 /r XCHG reg/mem32,reg32 87 /
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic XLATB D7 XOR AL,imm8 34 ib XOR AX,imm16 35 iw XOR EAX,imm32 35 id XOR RAX,imm32 35 id XOR reg/mem8,imm8 80 /6 ib XOR reg/mem16,imm16 81 /6 iw XOR reg/mem32,imm32 81 /6 id XOR reg/mem64,imm32 81 /6 id XOR reg/mem16,imm8 83 /6 ib XOR reg/mem32,imm8 83 /6 ib XOR reg/mem64,imm8 83 /6 ib XOR reg/mem8,reg8 30 /r XOR reg/mem16,reg16 31 /r XOR reg/mem32,reg32 31 /r Appendix A Description Set AL to the conte
AMD Confidential November 21st, 2008 User Manual Instruction Opcode Mnemonic XOR reg/mem64,reg64 31 /r XOR reg8,reg/mem8 32 /r XOR reg16,reg/mem16 33 /r XOR reg32,reg/mem32 33 /r XOR reg64,reg/mem64 33 /r Description XOR the contents of a 64-bit destination register or memory operand with the contents of a 64-bit register and store the result in the destination.
AMD Confidential November 21st, 2008 User Manual Instruction Mnemonic IRETD Opcode CF Description Return from interrupt (32-bit operand size).
AMD Confidential November 21st, 2008 User Manual Instruction Mnemonic Opcode SGDT mem16:32 0F 01 /0 SGDT mem16:64 0F 01 /0 SIDT mem16:32 0F 01 /1 SIDT mem16:64 0F 01 /1 SLDT reg16 0F 00 /0 SLDT reg32 0F 00 /0 SLDT reg64 0F 00 /0 SLDT mem16 0F 00 /0 SMSW reg16 0F 01 /4 SMSW reg32 0F 01 /4 SMSW reg64 0F 01 /4 SMSW mem16 STI 0F 01 /4 FB STR reg16 0F 00 /1 STR reg32 0F 00 /1 STR reg64 0F 00 /1 STR mem16 0F 00 /1 SWAPGS SYSCALL SYSENTER SYSEXIT SYSRET UD2 0F 0F 0F 0F 0F 0F VE
AMD Confidential November 21st, 2008 User Manual Interrupt to task-gate is not implemented. An attempt to execute an interrupt to task-gate results in a „FeatureNotImplemented‟ exception and the simulation will be stopped. When delivering an exception in an attempt to deliver a hardware interrupt the simulation will not push the resume-flag (RF) onto the stack. Always clears VM, NT, TF, and RF bits in rFLAGS. A.6.3.
AMD Confidential November 21st, 2008 User Manual Instruction Mnemonic Opcode CVTPD2PI mmx,xmm2/m128 66 0F 2D /r CVTPI2PD xmm,mmx/m64 66 0F 2A /r CVTPI2PS mmx,xmm2/m128 0F 2A /r Description Converts packed double-precision floating-point values in an XMM register or 128-bit memory location to packed doubleword integers values in the destination MMX™ register.
AMD Confidential November 21st, 2008 User Manual A.6.7 Extension to the 3DNow! Instruction Set This section describes the five new DSP instructions added to the 3DNow! Instruction set. Instruction Opcode Description Packed floating-point to integer 0F 0F /1C word conversion with sign extend. Packed floating-point negative 0F 0F /8A accumulate. Packed floating-point mixed 0F 0F /8E positive-negative accumulate. Packed 16-bit integer to floating0F 0F /0C point conversion. 0F 0F /BB Packed swap double word.
AMD Confidential November 21st, 2008 User Manual Mnemonic MONITOR EAX,ECX,EDX 0F MOVDDUP xmm1,xmm2/m64 F2 MOVSHDUP xmm1,xmm2/m128 F3 MOVSLDUP xmm1,xmm2/m128 F3 MWAIT EAX,ECX 0F Instruction Opcode Description Sets up a linear address range to be monitored by hardware and activates 01 C8 the monitor. The address range should be of a write-back memory caching type. Move 64 bits representing the lower double-precision data element from 0F 12 /r XMM2/Mem to XMM1 register and duplicate.
AMD Confidential November 21st, 2008 User Manual A.7 Automation Commands The simulator can be controlled externally through a scripting interface by issuing automation commands. These commands are directed toward either the shell, or toward any device that is part of the currently loaded BSD. Automation commands are plain ASCII text, and are sent to the simulator‟s automation interface.
AMD Confidential November 21st, 2008 User Manual 1 simnow> ide:0.DVDROMStatus 0 1 simnow> ide.DVDROMStatus 0 In addition to the commands supported by the various devices, detailed below, all devices support the usage and ausage command. These commands return a brief description of each of the commands supported by a specific device. For example, to get a nonalphabetic ordered list of the commands supported by the shell, you could send the command: 1 simnow> shell.
AMD Confidential User Manual Automation Command Quit Go Stop Close Open Modules Running Save [] RunTimeDuration
AMD Confidential User Manual Automation Command Memdump Reset CreatedDevices AddDevice [ ]] Connections Connect [connect point1] [Device Name2] [connect point2] AvailablePorts Disconnect DeleteDevice KnownDevices MoveDevice New Location DumpRegistry SetMPQuantum
AMD Confidential User Manual Automation Command Swap {X86Sim Processor | AweSim Processor} HasModule GetDisplayIndex SetDisplayIndex Wait NGo DisplayScreenShot GetScreenShotFormats LogConsoleStdErr SetLogConsoleStdErr <0 | 1> ForceSingleStep <0 | 1> XTRInstDmpFile LogIO | | reset <0 | 1> Appendix A November 21st, 2008 Description Switches CPU model from X86Sim to AweSim or the other way around.
AMD Confidential November 21st, 2008 User Manual Automation Command GetLogIO Fastpath | GetFastpath | all SetVGAQuantum
AMD Confidential November 21st, 2008 User Manual Automation Command JournalStatus {master|slave|0|1} JournalSize {master|slave|0|1} JournalSave {master|slave|0|1} JournalLoad {master|slave|0|1} JournalCommit {master|slave|0|1} JournalClear {master|slave|0|1} JournalDebug {master|slave|0|1} DVDROMStatus {master|slave|0|1} SetDVDROM {master|slave|0|1} {off|on|0|1} Eject {master|slave|0|1} {off|} DMADelay {master|slave|0|1} Noise {off|on|0|1} SetImageType {mast
AMD Confidential November 21st, 2008 User Manual A.7.4 CMOS 1 simnow> cmos.usage Automation Command Load Save SetTime GetByte SetByte GetData GetRamSize ClearTo Description Loads CMOS data stored at „filepath‟. For example „cmos.load c:\cmos.dat‟. Saves CMOS data to „filepath‟, e.g. „cmos.save c:\cmos.dat‟ Sets CMOS Time to specified time.
AMD Confidential November 21st, 2008 User Manual Disable Attach ExecCmd MemDump DisDump RegDump MsgDump WhichProc EnableStatus GetConfig Disables the Debugger and closes debug dialog window, if GUI is enabled. Attaches debugger to specified processor. Executes the debug command specified in „command‟, see Section 10.2, “Debugger Command Reference”, on page 151. Dumps 128-bytes of memory. Dumps disassembly. Dumps all CPU registers. Dumps debug messages.
AMD Confidential November 21st, 2008 User Manual Automation Command SetLoopback (0|1) GetLoopback Description 0 disables loop back, 1 enables loop back. Returns „true‟ if loop back is enabled; otherwise it returns „false‟. Returns information regarding how the simulated serial port is configured. The result will be either: \\.\pipe\SimNow.COMn This indicates that data is being transported through a named-pipe with the given name.
AMD Confidential November 21st, 2008 User Manual Automation Command Description Sets the mode of communication you want to use with the simulated serial port. pipe Tells the simulator to use a named-pipe as the method of transport for serial data to/from the simulated machine. The pipe name will be of the form "\\.\pipe\SimNow.COMn", where "n" will be 1 for serial port 1 and 2 for serial port 2. The name is not user configurable.
AMD Confidential November 21st, 2008 User Manual Returns „enabled‟ if logging is enabled otherwise it returns „disabled‟. DMALogStatus A.7.12 8th Generation Northbridge 1 simnow> sledgenb.usage Automation Command LogHT (0|1) HTLogStatus LogPCIConfig (0|1) PCILogStatus GetConfig ProductFile A.7.13 Description Enables (1) or disables (0) logging. Returns „enabled‟ if logging is enabled otherwise it returns „disabled‟. Enables (1) or disables (0) PCI Config logging.
AMD Confidential November 21st, 2008 User Manual GetConfig Displays the current AMD-8111 configuration. A.7.15 EHC 1 simnow> ehc.usage Automation Command log (enable | disable) {mp} A.7.16 Description Enables or disables Memory (m) and PCI Configuration (p) logging. Journal 1 simnow> journal.usage Automation Command Description GetParam Returns „Super Block Size‟, „Index Block Size‟, „Index Levels‟, „Disk Block Size‟ and „Maximum Disk Size‟.
AMD Confidential User Manual November 21st, 2008 1 simnow> dumpprofile 3 34962861.000000 instructions executed since the last epoch ------------------------------------------------------------------Executed 3571672 times CS.D=0 LongBit=0 physical_addr=00000000000e41de eip=00000000000041de 00000000000041de: cmp [04f0h],aah 00000000000041e3: jnz $-05h 0000000000000000: This block's execution was 20.431234 percent of the total since the last epoch.
AMD Confidential November 21st, 2008 User Manual The simulator works by translating guest x86 instructions to long-mode user-mode instructions which it then executes. These translated instructions are grouped into blocks called translations. These translations exist in a translation buffer, which is typically about 64 MB. When the translation buffer is full and space for another translation is needed, the simulator disposes of the contents of the translation buffer and starts a new epoch.
AMD Confidential November 21st, 2008 User Manual Automation Command GetVBE Description Returns true if VESA BIOS Extensions is enabled; otherwise it returns false. A.7.19 Matrox MGA-G400 Graphics 1 simnow> mgag400.usage Automation Command SetTexmap (0 | 1) SetCardType CARDID GetCardType Description Enables (1) or disables (0) the texture units. By default the texture units are disabled. Sets the MGA-G400 type to CARDID. Valid values for CARDID are: 6648, 888, 6616, and 824.
AMD Confidential November 21st, 2008 User Manual A.7.22 Memory Device 1 simnow> memdevice.usage Automation Command Save Load BaseAddress GetBaseAddress SizeInBlocks GetSizeInBlocks InitFile GetInitFile ReadOnly <0|1> GetReadOnly SystemBios <0|1> GetSystemBios MemAddrMask <0|1> GetAddrMask InitValEnable <0|1> InitVal Appendix A Description Creates file „filename‟ and saves the contents of the currently loaded ROM „to filename‟.
AMD Confidential November 21st, 2008 User Manual Automation Command InitValStatus DisableCache < 0 | 1 > GetCacheDisabled GetConfig FlashMode < 0 | 1 > FlashUpdateFile < 0 | 1 > ncHTMode < 0 | 1 > ForceInitFile GetCommandSequence CommandSequence < 0 | 1 > GetFlashMode FlashMode < 0 | 1 > Description Displays information if the initializer is used and if the memory initialization is activated. Sets memory region to cacheable (0) or non-cacheable (1).
AMD Confidential November 21st, 2008 User Manual Automation Command Journal {0|1} AddJournal [ ] ResizeJournal [ ] Commit Clear Flatten Status [ ] [-v | -r] SetDBC SetJournalParameters GetJournalParameters Description Enables (1) or disables journaling for specified volume.
AMD Confidential November 21st, 2008 User Manual Automation Command Description ExportSPD ExportSPD provides the option of saving SPD ROM data from DimmNo to the file specified by “fullpath”. The file format is an unformatted binary image, with an extension of ”.spd”. ResetPDLs ResetPDL sets all 16 PDL response ranges to their maximum range (0 - 255).
AMD Confidential November 21st, 2008 User Manual MouseMove MouseLeftDown MouseRightDown MouseLeftUp MouseRightUp MouseMoveAbs Log enable|disable id Text Moves the mouse cursor to relative position DeltaX and DeltaY. Generates a left-mouse-button-down event. Generates a right-mouse-button-down event. Generates a left-mouse-button-up event. Generates a right-mouse-button-up event. Moves the mouse cursor to absolute x-y position. Enables or disables logging.
AMD Confidential November 21st, 2008 User Manual Automation Command Initialize ImportDir ExportDir < ImagePathName> Dir Free Size Description Initialize the jump drive image with a single partition of the requested size specified by . The JumpDrive supports image-sizes from 64-Mbytes to 8192-Mbytes (8-Gbytes). Imports a directory from the host system into the jump drive.
AMD Confidential November 21st, 2008 User Manual 1 simnow> This copies all files from “C:\tmp“ into the root of the JumpDrive. Any subdirectories are also copied. 1 simnow>jumpdrive.importdir c:\tmp \ Importing c:\tmp\test.bin ---> \test1.bin 62.89 Mbytes Available This example shows how to import all “*.exe” files from “C:\tmp” into the root of the JumpDrive. 1 simnow>jumpdrive.importdir c:\tmp\*.exe \ Importing c:\tmp\app1.exe ---> \app1.exe Importing c:\tmp\app2.exe ---> \app2.exe 62.
AMD Confidential November 21st, 2008 User Manual 1 simnow>jumpdrive.loadimage c:\test.img A.7.27 E1000 The NIC device provides the following automation commands that can be used to configure the device. 1 simnow> e1000.
AMD Confidential November 21st, 2008 User Manual Automation Command Description Sets name of the log file where XTR messages should be logged. This is optional and if not used the log is directed to the simulators log. Displays the status of XTR playback xtrlogfile status 1 simnow> xtrsvc.usage Automation Command Description Enables (1) or Disables (0) XTR Record. All other values are invalid. Sets the XTR-XML file for XTR Record. Sets number of bits for memory address bits to scan.
AMD Confidential November 21st, 2008 User Manual Automation Command SetRev GetRev Description Sets the internal chip revision number of RS480 device to . Displays the internal chip revision number of the RS480 device. A.7.31 ATI RS780 1 simnow> rs780.usage Automation Command SetRev GetRev Version Description Sets the internal chip revision number of RS780 device to . Displays the internal chip revision number of the RS780 device. Displays the binary revision of the RS780 model.
AMD Confidential User Manual Appendix A November 21st, 2008 253
AMD Confidential User Manual November 21st, 2008 This page is intentionally blank.
AMD Confidential November 21st, 2008 User Manual Index * *.ROM ............................................................ 180 *.SPD.............................................................. 180 A A20 ................................................................... 78 ACPI ...................................................................8 Address-Translation Cache............................... 30 AGP ............................................................ 65, 69 AMD 3DNow!™ Technology ....
AMD Confidential November 21st, 2008 User Manual J Journaling ................................................... 92, 93 Journals........................................................... 104 Joystick ............................................................. 78 K Kernel Debugger .................................... 108, 155 L Linux Loopback Device ......................................... 44 Log CPU Cycles................................................ 170 Dissassembly ...............................
AMD Confidential User Manual X XTR ................................................................ 110 Playback..................................................... 111 Index November 21st, 2008 Recording ...................................................111 Stop Recording ..........................................111 XVGA ........................................................