Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / docs / SAMv5userguide1_2.0.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="CONTENT-TYPE"
content="text/html; charset=iso-8859-1">
<title>/import/archperf-www/Tools/Root_Image.html</title>
<meta name="GENERATOR" content="StarOffice 8 (Solaris Sparc)">
<meta name="CREATED" content="20030501;15353200">
<meta name="CHANGEDBY" content="Sreenivas Vadlapatla">
<meta name="CHANGED" content="20070427;14430500">
<style>
<!--
@page { size: 8.5in 11in }
-->
</style>
</head>
<body dir="ltr" lang="en-US">
<h1 align="center">SAM User Manual</h1>
<h1 align="center">Version 2.0</h1>
<p><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</p>
<h1 align="center">Sreenivas Vadlapatla</h1>
<h1 align="center">Last Updated: 25<sup>th</sup> April 2007</h1>
<p><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</p>
<h1 align="center"><a
name="5.HOWTO: setup run directory scsi init file|outline"></a><a
name="5.HOWTO: setup run directory scsi init file|outline"></a>
Advanced Technology Group</h1>
<p
style="border-style: none none double; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-width: medium medium 1.1pt; padding: 0in 0in 0.03in; margin-bottom: 0in;">
<br>
</p>
<p
style="border-style: none none double; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-width: medium medium 1.1pt; padding: 0in 0in 0.03in; margin-bottom: 0in;">
==========================================================================================================================================</p>
<h1><a name="6.HOWTO: setup run directory fc init file|outline"></a><a
name="6.HOWTO: setup run directory fc init file|outline"></a>
Table of Contents</h1>
<ol>
<li>
<p><a href="#8.Purpose%7Coutline"><b><font size="5">Purpose</font></b></a></p>
</li>
<li>
<p><a href="#9.SAM%7Coutline"><b><font size="5">SAM</font></b></a></p>
<ol type="a">
<li>
<p><a href="#SAM%20Huron%7Coutline"><b><font size="5">SAM Huron</font></b></a></p>
</li>
</ol>
</li>
<li>
<p><a href="#10.SPARC%20CPU%7Coutline"><b><font size="5">SPARC CPU</font></b></a></p>
<ol type="a">
<li>
<p><a href="#Riesling%7Coutline"><b><font size="5">Riesling</font></b></a></p>
</li>
<li>
<p><a href="#Vonk%7Coutline"><b><font size="5">Vonk</font></b></a></p>
</li>
<li>
<p><a href="#Vcpu%20Interface%7Coutline"><b><font size="5">Vcpu
Interface</font></b></a></p>
</li>
</ol>
</li>
<li>
<p><a href="#10.Running%20SAM%20Chplus%7Coutline"><b><font size="5">Running
SAM Chplus</font></b></a></p>
<ol type="a">
<li>
<p><a href="#Getting%20Started%7Coutline"><b><font size="5">Getting
Started</font></b></a></p>
</li>
<li>
<p><a href="#Creating%20a%20Root%20Image%7Coutline"><b><font
size="5">Creating a Root Image</font></b></a></p>
</li>
<li>
<p><a href="#Data%20Disk%20Images%7Coutline"><b><font size="5">Data
Disk Images</font></b></a></p>
</li>
<li>
<p><a href="#Data%20Disk%20Images%7Coutline"><b><font size="5">Getting
and running SAM</font></b></a></p>
</li>
<li>
<p><a href="#RC%20file%20Setup%7Coutline"><b><font size="5">RC
file Setup</font></b></a></p>
</li>
<li>
<p><a href="#SCSI%20init%20file%20Setup%7Coutline"><b><font
size="5">SCSI init file Setup</font></b></a></p>
</li>
<li>
<p><a href="#FC%20init%20file%20Setup%7Coutline"><b><font
size="5">FC init file Setup</font></b></a></p>
</li>
<li>
<p><a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline"><b><font
size="5">Disk Image file from a Reference System</font></b></a></p>
</li>
<li>
<p><a
href="#Modifying%20root%20image%20to%20boot%20on%20SAM%7Coutline"><b><font
size="5">Modifying root image to boot on SAM</font></b></a></p>
</li>
<li>
<p><a href="#Check-pointing%20using%20Dump/Restore%7Coutline"><b><font
size="5">Check-pointing using Dump/Restore</font></b></a></p>
<ul>
<li>
<p><a href="#Lazy%20Restore%7Coutline"><b><font size="5">Lazy
Restore</font></b></a></p>
</li>
</ul>
</li>
</ol>
</li>
<li>
<p><a href="#11.Running%20SAM%20Huron%7Coutline"><b><font size="5">Running
SAM Huron</font></b></a></p>
<ol type="a">
<li>
<p><a href="#Getting%20and%20running%20SAM%20Huron%7Coutline"><b><font
size="5">Getting and running SAM Huron</font></b></a></p>
</li>
<li>
<p><a href="#Huron%20RC%20file%20Setup%7Coutline"><b><font
size="5">Huron RC file Setup</font></b></a></p>
</li>
<li>
<p><a
href="#Modifying%20root%20image%20to%20boot%20on%20SAM%20Huron%7Coutline"><b><font
size="5">Modifying root image to boot on SAM Huron</font></b></a></p>
</li>
</ol>
</li>
<li>
<p><a href="#12.Tracing%7Coutline"><b><font size="5">Tracing</font></b></a></p>
<ol type="a">
<li>
<p><a href="#Trace%20Collection%20and%20Validation%7Coutline"><b><font
size="5">Trace Collection and Validation</font></b></a></p>
</li>
</ol>
</li>
<li>
<p><a href="#14.HOWTOs%7Coutline"><b><font size="5">HOWTOs</font></b></a></p>
<ol type="a">
<li>
<p><a href="#Open%20extra%20Console%20Windows%7Coutline"><b><font
size="5">Open extra Console Windows</font></b></a></p>
</li>
</ol>
</li>
</ol>
<p><font size="4">================================================================================================================</font></p>
<h1><a name="8.Purpose|outline"></a>Purpose</h1>
<p>The purpose of this document is to create a &#8220;cook book&#8221;
for SAM setup and tracing. This document will go over all the
necessary steps on how to get SAM up and running so you can start
tracing. Also note that SAM and blaze refer to the same thing and are
used interchangeably in this document. The document describes SAM and
it's features followed by descriptions on how to run SAM. Tracing and
validation guidelines are explained in great detail followed by
execution driven simulation. SAM combined with ValueSim can be hooked
up to a cycle accurate simulator and used in execution driven mode.</p>
<p>==========================================================================================================================================</p>
<h1><a name="9.SAM|outline"></a>SAM</h1>
<p>SAM is a full system (CPU, memory, network, hard disk, timer)
simulator developed at SUN and currently maintained by the Advanced
Technology group (ATG). It simulates various SPARC V9-based systems
running the Solaris operating system. It is primarily used for
collecting architectural traces from workloads such as TPCC, SPECWeb,
ICPERF, SPECJAppServer, ICPERF, SPECJbb, SPEC CPU, etc. SAM is also
being used in RTL verification and in system bringup. It boots a fake
boot prom or Sun-Fire OBP, and then the real OS. Since SAM-v5 runs
off-the-shelf OS, most high-level functionality built on top is
available in the simulation including TCP/IP, file systems, kernel
modules, multiple-users, NIS, etc.</p>
<p>SAM simulates a system consisting of the following:</p>
<ul>
<li>
<p>One or more SPARC CPUs.</p>
</li>
<li>
<p>Physical memory (RAM)</p>
</li>
<li>
<p>Bridge</p>
</li>
<li>
<p>Switch</p>
</li>
<li>
<p>A serial console device</p>
</li>
<li>
<p>The disk subsystem (e.g. SCSI or FibreChannel)</p>
</li>
<li>
<p>The network cards (e.g. gem or cassini)</p>
</li>
</ul>
<p>SAM-v5 is a new SAM revision with enhanced user interface for
system configuration and new expandable and flexible infrastructure.
Note that some devices are system specific and so are modeled
accordingly and used in that particular SAM system. Further details
in the sections that follow.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2>SAM Huron</h2>
<p>SAM-Huron (Sun Fire T2000) system configuration uses the Niagara
(UltraSPARC-T2) chip as the CPU. SAM Huron consists of SAM system
simulator plus the <a href="#Vonk%7Coutline">Vonk</a> processor
reference model. The following is the component list of modules in
SAM Huron:</p>
<ul>
<li>
<p>Vonk &#8211; Niagara 2 Processor Model</p>
</li>
<li>
<p>PCIE-PCIE Switch</p>
</li>
<li>
<p>PCIE-PCI Bridge</p>
</li>
<li>
<p>SCSI Controller</p>
</li>
<li>
<p>FC Controller</p>
</li>
<li>
<p>SCSI Disk</p>
</li>
<li>
<p>FC Disk</p>
</li>
<li>
<p>Networking &#8211; GE/CE/E1000g adapters</p>
</li>
<li>
<p>Miscellaneous &#8211; LL, RTC, Serial etc. </p>
</li>
</ul>
<p>For further details please refer to
<a
href="https://systemsweb.sfbay.sun.com/archperf/TOI/talk-2007/qe-sam-toi.odp">https://systemsweb.sfbay.sun.com/archperf/TOI/talk-2007/qe-sam-toi.odp</a></p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<p>==========================================================================================================================================</p>
<h1><a name="10.SPARC CPU|outline"></a>SPARC CPU</h1>
<p>We have the following four SPARC CPU models currently modelled in
SAM:</p>
<ul>
<li>
<p>Niagara II, Huron Systems (Vonk N2)</p>
</li>
</ul>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Riesling|outline"></a><a name="Riesling|outline"></a>Riesling/Vonk</h2>
<p>Riesling is the SPARC CPU architecture model in the SAM Ontario
(T1) full-system simulator. Vonk is used for both Niagara II and ROCK
CPU models. Vonk N2 is the SPARC CPU architecture model in the SAM
Huron (T2) full-system simulator. Vonk ROCK is the SPARC CPU
architecture model in the SAM Supernova full-system simulator.
Riesling/Vonk is the overall name for the Sun UltraSPARC processor
golden reference model product, it implements the full UltraSPARC
architecture specification. On top of the UltraSPARC specification,
Riesling/Vonk implements the deltas from that specification as
mentioned in each product specific PRM (Programming Reference
Manual), but usually only the parts that are related to processor
functions. </p>
<p>Riesling/Vonk always implements a full system model in turn of CPU
architecture. A Riesling/Vonk system consists of a number of
Riesling/Vonk CPUs. A Riesling/Vonk CPU consists of a number of
Riesling/Vonk cores. A Riesling/Vonk core consists of a number of
Riesling/Vonk strands. The structure and functionality of the
Riesling/Vonk system that is provided in the Riesling/Vonk library
reflects the hardware it functionally models. Riesling/Vonk also
provides a simple memory model. A system is a combination of CPU
model(s) and memory model(s). Together the CPU models and memory
model(s) in the Riesling/Vonk library allow for a standalone
simulator of CPUs with memory to be built out of the box.
Riesling/Vonk itself does not provide device model functionality. </p>
<p>Riesling/Vonk does not model time. A single step (cycle) in
Riesling/Vonk means: Fetch, Decode, Execute, and Retire the
architectural state, in one single operation. In essence,
Riesling/Vonk is a functional simulator, it does not provide any
performance indication of the modeled CPU architecture. Caches are
not modeled in Riesling/Vonk. Caches are functionally not required by
the UltraSPARC specification. This means that cache coherency is also
not modeled in Riesling/Vonk. Riesling/Vonk generally does not model
functions related to errors and diagnostics. However, some functions
related to those areas are implemented due to special modeling
requirements. </p>
<p>Riesling/Vonk library is a collection of C++ classes. The classes
are constructed in a way that mimics hardware structure. For
Riesling, default UltraSPARC Ontario system configuration (one CPU,
eight cores per CPU, four strands per core) is implemented in the
library, users have the capability to extend the classes to create
their own T1-like systems. For Vonk N2, default UltraSPARC Huron
system configuration (one CPU, eight cores per CPU, eight strands per
core) is implemented in the library, users have the capability to
extend the classes to create their own T2-like systems.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Vcpu Interface|outline"></a>Vcpu Interface</h2>
<p>Vcpu hides the details of the cpu specific implementation. It
presents an abstract interface to the "virtual cpu".</p>
<ul>
<li>
<p>for cpu with multiple strands it represents each strands</p>
</li>
</ul>
<ul>
<li>
<p>for cpu without strands it represent the cpu</p>
</li>
</ul>
<p>Vcpu interface has a few components:</p>
<ul>
<li>
<p>control interface</p>
</li>
<li>
<p>system interface ( Memory and IO )</p>
</li>
<li>
<p>trace interface</p>
</li>
</ul>
<p>For further details on usage and other features refer to
<a
href="https://systemsweb.sfbay.sun.com/archperf/TOI/Oct2006/VcpuInterface.html">https://systemsweb.sfbay.sun.com/archperf/TOI/Oct2006/VcpuInterface.html</a></p>
<p>==========================================================================================================================================</p>
<h1><a name="10.Running SAM Chplus|outline"></a>Running SAM Chplus</h1>
<p>To run SAM, launch the SAM binary from the SAM run directory.
Ofcourse before running SAM Chplus we need a solaris root image,
configuration files etc. The following sections explain in detail the
steps that need to be done. Most of the steps are common to running
SAM irrespective of whether it is SAM Chplus or SAM Huron etc.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Getting Started|outline"></a><a
name="Getting Started|outline"></a>
Getting Started</h2>
<p>You will need at least Solaris 2.8 and above with at least 512 MB
of RAM on each machine. However, to simulate machine the host side
would consume about &frac34;<sup>th</sup> of the total memory size.
So, size accordingly. Some planning and set-up is necessary before
running SAM. This involves specifying the system configuration,
setting up all necessary input files, and making sure the host
machine and the working directory on which the simulation is run are
adequate for the task. <br>
<br>
There are two principle ways to run
SAM: restore from a pre-existing checkpoint, and start a fresh run
from scratch. Most often, you will restore from existing checkpoints
in order to collect traces or run simulations. Restoring from a
checkpoint is easiest because the system configuration is
pre-determined and you simply need to sym-link or copy over the
necessary files into the working directory before running the
simulation. For a run from scratch, it is advisable to start with an
existing configuration as a template, and modify the necessary
configuration parameters (such as cpu count and frequency, device
hierarchy etc.). When restoring from a checkpoint, there are other
considerations that apply (see Lazy Restore).<br>
<br>
In both cases,
the system-configuration file (usually called config.rc) is a good
starting point. This file specifies the type and number of simulated
CPUs, the amount of simulated memory, the number of simulated
devices, pointers to the mapping of real disk images to simulated
disks etc. This file also specifies the number of host threads onto
which the simulated CPUs are mapped. You should always ensure that
the number of host threads used is at least equal to the number of
real available CPUs on the host system. Furthermore, some
applications like execution-driven simulation may require a single
host thread for all the simulated CPUs. <br>
<br>
By default, SAM will
try to allocate as much real memory as the simulated RAM. If you
decide to go with this default, ensure that the host machine has
enough RAM+SWAP (and also enough free swap) to accommodate this
amount. It is possible to map simulated memory to a disk file rather
than physical memory, in which case you need to allow enough space in
the working directory for the memory-mapped file. When the simulated
application writes to the simulated disks, the updates are written to
files called "overlays" in the working directory. You need
to anticipate the needs of the program and allow enough free space in
the working directory for the overlays. <br>
<br>
For example, if the
simulated application is a database that performs 1000 writes of 8KB
per simulated second and you are simulating 1200 seconds, you need
enough space for 1.2M updates, or 1.2M x 8KB = 9.6 GB of free space
for overlays. <br>
<br>
The latest release is in
/import/archperf/pkgs/sam/latest</p>
<p>For insturctions on how to bringover sam and build it yourself
refer to: <a href="#Getting%20and%20running%20SAM%7Coutline">Getting
and
running SAM</a></p>
<p>For the list of files needed for SAM Chplus run directory refer
to: <a href="#Getting%20and%20running%20SAM%7Coutline">Getting and
running
SAM</a></p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Creating a Root Image|outline"></a><a
name="Creating a Root Image|outline"></a>
Creating a Root Image</h2>
<p>You will need to do serveral steps to create the root image before
running Blaze. Also, you will need to login as root before
proceeding. Note that root.img and swap.img are part of the file list
needed to run SAM. </p>
<p>For further details on creating a root image refer to: <a
href="#HOWTO:%20create%20a%20root%20disk%20image%20file%20from%20a%20reference%20system%7Coutline">#HOWTO:
create a root disk image file from a reference system|outline</a></p>
<p>When we use fakeprom to build the SAM device tree we need to make
modifications to the root image and for details on modifying the root
image refer to: <a
href="#HOWTO:%20modify%20reference%20root%20image%20into%20SAM%20root%20image%7Coutline">#HOWTO:
modify reference root image into SAM root image|outline</a></p>
<p>When you modify root image you will notice a driver by name ll
being loaded. This driver is used to give access to local host file
system from SAM simulated environment.</p>
<p>Blaze supports LLFS (localhost lookup file system) letting you
read/write files on your host machine directly from the simulated
host. Thus, the simhost can access /import/arch-trace25,
/import/arch-trace30/ and /tmp/logman on your host. More importantly,
LLFS lets you run SAM as a user program and have access to all NFS
files on SWAN, which is where your benchmark programs probably
reside. </p>
<p>We map / on the host to /ll/root in simhost via LLFS. E.g. to
access your home directory from /home/xyz. You would go to
/ll/root/home/xyz in SAM. </p>
<p>As a added convenience, we (use symbolic links to) map the
following directories in the sim host to the same directory on the
underlying host: </p>
<p>/home, /net, /vol, /ws, /import, /usr/ccs, /usr/share,
/usr/shared, /usr/dist</p>
<p>Thus, in the simhost, you can get to your home directory via
/home/xyz as well as /ll/root/home/xyz. Tycho wrote the nifty LLFS
(local lookup file system). Tycho implemented LLFS correctly, by
implementing the Solaris LL file system, the Solaris LL device driver
and the LL device (in SAM). /home /net /vol /ws /import /usr/ccs
/usr/share /usr/shared /usr/dist.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Data Disk Images|outline"></a><a
name="Data Disk Images|outline"></a><a name="Data Disk Images|outline"></a>
Data Disk Images</h2>
<p>We use the same dd procedure for collecting data disk images. The
database disks can be under SVM (Solaris Volume Manager) or under
Veritas. For SVM you can use metadb to get a listing. For Veritas you
can use vxprint to get a list of all disks under Veritas. You can
then select the disks you want to take disk images of i.e. only those
belonging to the database of interest.</p>
<p>For information on setting scsidisk.init with respect to SVM and
Veritas refer to: <a href="#SCSI%20init%20file%20Setup%7Coutline">SCSI
init
file Setup</a></p>
<p>For information on setting fcdisk.init with respect to SVM and
Veritas refer to: <a href="#FC%20init%20file%20Setup%7Coutline">FC
init file
Setup</a></p>
<p>Also during root image modification note that SVM requires
/etc/path_to_inst file entries for the database disks. The disks
should also have the same minor numbers as they had on the host
reference machine. For further details on this refer to: <a
href="#HOWTO:%20modify%20reference%20root%20image%20into%20SAM%20root%20image%7Coutline">#HOWTO:
modify reference root image into SAM root image|outline</a></p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Getting and running SAM|outline"></a><a
name="Getting and running SAM|outline"></a>
Getting and running SAM</h2>
<p>Go to the directory where you want the SAM to be installed and run
the following command. Note that SAM chplus, SAM vonk etc. are all in
one workspace.</p>
<p><i><b># bringover -p /import/archperf/ws/sam -w ./&lt;samdir&gt; .</b></i></p>
<p><i><b># cd &lt;samdir&gt;</b></i></p>
<p><i><b># make install-chplus</b></i></p>
<p style="font-style: normal;">The above command
will build the Chplus version of SAM. Similarly you can build for N2
using make install-n2 command. Refer to Makefile.targetspecs for a
list of all target builds. The above command will create a directory
install-chplus. You will find the following directories under
install-chplus directory: bin, doc, etc, lib, man, pfe, rtl. The bin
directory has the sam binary and the lib directory has all the
loadable modules for devices. </p>
<p style="font-style: normal;">Before you can run
SAM the run directory must contain the following files:</p>
<ol>
<li>
<p><font face="Thorndale, serif"><font size="3"><b>bin/sam:</b> sam
binary</font></font></p>
</li>
<li>
<p><font face="Thorndale, serif"><font size="3"><b>lib/*.so:</b>
the lib directory contains all the loadable modules (*.so)</font></font></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>config.rc:</b> the rc file
where system configuration is specified. </font><a
href="#RC%20file%20Setup%7Coutline">RC file Setup</a></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>scsidisk.init:</b> there could
be more than one of these files. </font><a
href="#SCSI%20init%20file%20Setup%7Coutline">SCSI init file Setup</a></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>fcdisk.init:</b> there could be
more than one of these files. </font><a
href="#FC%20init%20file%20Setup%7Coutline">FC init file Setup</a></p>
</li>
<li>
<p><b>fakeprom or samprom:</b> this file is needed when we use the
fakeprom device tree (only used in sam chplus based systems), not
needed if we boot using OBP</p>
</li>
<li>
<p><b>ufsboot:</b> this file has to be copied from the root image
/tmp/root-image/platform/sun4u/ufsboot</p>
</li>
<li>
<p><b>root.img:</b> link to or a copy of the modified root image. <a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline">Disk
Image file from a Reference System</a></p>
</li>
<li>
<p><b>swap.img:</b> link to or a copy of swap image. <a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline">Disk
Image file from a Reference System</a></p>
</li>
</ol>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><u><b>Without
networking:</b></u></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><i><b>#
bin/sam -w -c config.rc</b></i></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">The
-w automatically brings up the console window of the simulated
machine. Make sure you have set your DISPLAY environment variable
correctly.</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">At
blaze prompt: run</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><u><b>With
networking:</b></u></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Make
sure you have created a file called hostname.ge0 in /etc/system
directory on root image and the file should have the machine name in
it.</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">It
could be ge0 or ce0 depending the NIC card gem or cassini being used.
It could be ge0 or ge1 depending on the name specified in rc file for
the device.</font></font></font></p>
<ol>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">Start switchsim on any machine using command: <b><i>#
/import/blaze-trace/blz-binaries/switch-v1.6 -r ip</i></b>. Switch does
the following:</font></font></font></p>
<ol>
<ol type="a">
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">connects multiple blaze simulated environments together</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">models network delay</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">sync multiple blazes on time boundaries</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">behaves as a traditional switch in a real network</font></font></font></p>
</li>
</ol>
</ol>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">Start blaze and connect to switch</font></font></font></p>
</li>
</ol>
<pre style="margin-left: 0.5in;"><i><b># bin/sam -w -c config.rc</b></i>
At blaze prompt: &#8220;simge connect &lt;machine name&gt;&#8221; where &lt;machine name&gt; is the machine on which switchsim is running
At blaze prompt: &#8220;sync connect &lt;machine name&gt;&#8221; where &lt;machine name&gt; is the machine on which switchsim is running
<font color="#000000"><font face="Cumberland, monospace"><font size="2">At blaze prompt: &#8220;conf&#8221; ensure correct values for all parameters, if not, change using &#8220;conf &lt;parameter&gt; &lt;value&gt;&#8221;</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">At blaze prompt: run</font></font></font></pre>
<ol start="3">
<li>
<pre style="margin-bottom: 0.2in;"><font color="#000000"><font
face="Thorndale, serif"><font size="3">Bringup ge/ce NIC</font></font></font></pre>
</li>
</ol>
<pre style="margin-left: 0.5in;">After boot login as root in the simulated machine and then run the following commands in the simulated machine:<br>devfsadm -i ge<br>ifconfig ge0 plumb<br>ifconfig ge0 inet &lt;ip address&gt; netmask &lt;net mask&gt;<br>ifconfig ge0 ether &lt;mac address&gt;, mac address is currently not being used in SAM<br>ifconfig ge0 up</pre>
<ol start="4">
<li>
<p>Start other blazes and connect them using steps 2 and 3 above.</p>
</li>
<li>
<p>Check to see if the simulated machines are communicating using
traditional ping etc.</p>
</li>
</ol>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="RC file Setup|outline"></a><a name="RC file Setup|outline"></a><a
name="RC file Setup|outline"></a>
RC file Setup</h2>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Here
is a sample TPCC rc file. I included TPCC because it covers all the
facets of the setup.</font></font></font></p>
<pre>############################################### start of rc file ###########################################################<br><br>conf ramsize 65536M<br><br>conf mmutype cheetahplus<br><br>conf bootpath /pci@1f,600000/scsi@1/disk@d,0:a<br><br>conf cpu_per_thread 1<br><br>conf stickfreq 12500000<br><br>load 0x0e00000 fakeprom 0xffd00000<br>load 0x00120000 ufsboot 0x00120000<br><br>write word 0x00 0x120000<br>write word 0x04 0x120000<br>write word 0x08 0x34ffff<br>write word 0x0c 0x120000<br>write word 0x10 0x2<br>write word 0x38 0x1234<br>write byte 0x3c 0x80<br><br>sysconf -p ./<br><br>sysconf cpu name=cpu0 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu1 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu2 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu3 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu4 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu5 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu6 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br>sysconf cpu name=cpu7 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32<br><br>conf mips 300<br><br>setreg pc 0xe00020<br>setreg npc 0xe00024<br><br>sysconf excalibur excalibur0<br><br>sysconf pci_bus pciA31 bridge=schizo31 -d0<br>sysconf pci_bus pciB31 bridge=schizo31 -d0<br>sysconf pci_bus pciA30 bridge=schizo30 -d0<br>sysconf pci_bus pciB30 bridge=schizo30 -d0<br>sysconf pci_bus pciA29 bridge=schizo29 -d0<br>sysconf pci_bus pciB29 bridge=schizo29 -d0<br>sysconf pci_bus pciA28 bridge=schizo28 -d0<br>sysconf pci_bus pciB28 bridge=schizo28 -d0<br><br>sysconf schizo schizo31 aid=31 pciA=pciA31 pciB=pciB31 -d0<br>sysconf schizo schizo30 aid=30 pciA=pciA30 pciB=pciB30 -d0<br>sysconf schizo schizo29 aid=29 pciA=pciA29 pciB=pciB29 -d0<br>sysconf schizo schizo28 aid=28 pciA=pciA28 pciB=pciB28 -d0<br><br>sysconf scsi scsi0 bus=pciA31 schizo=schizo31 dev=1 targets=scsidisk.init boothba -d0<br><br>sysconf rtc rtc0 bus=pciA31 dev=3 fun=0 <br><br>sysconf gem ge1 bus=pciB31 dev=4 fun=0 <br><br>sysconf serial console bus=pciB31 dev=5 fun=0 sam-console<br><br>sysconf ll PBBll bus=pciB31 dev=6 fun=0 <br><br>sysconf fc PBBfc01 bus=pciA30 schizo=schizo30 dev=1 targets=fcdisk1.multi1.init<br>sysconf fc PBBfc02 bus=pciA30 schizo=schizo30 dev=2 targets=fcdisk1.multi2.init<br>sysconf fc PBBfc03 bus=pciA30 schizo=schizo30 dev=3 targets=fcdisk1.multi3.init<br>sysconf fc PBBfc04 bus=pciA30 schizo=schizo30 dev=4 targets=fcdisk1.multi4.init<br>sysconf fc PBBfc05 bus=pciB30 schizo=schizo30 dev=5 targets=fcdisk1.multi5.init<br>sysconf fc PBBfc06 bus=pciB30 schizo=schizo30 dev=6 targets=fcdisk1.multi6.init<br>sysconf fc PBBfc07 bus=pciB30 schizo=schizo30 dev=7 targets=fcdisk1.multi7.init<br>sysconf fc PBBfc08 bus=pciB30 schizo=schizo30 dev=8 targets=fcdisk1.multi8.init<br><br>sysconf fc PBBfc09 bus=pciA29 schizo=schizo29 dev=1 targets=fcdisk1.multi9.init<br>sysconf fc PBBfc10 bus=pciA29 schizo=schizo29 dev=2 targets=fcdisk2.multi1.init<br>sysconf fc PBBfc11 bus=pciA29 schizo=schizo29 dev=3 targets=fcdisk2.multi2.init<br>sysconf fc PBBfc12 bus=pciA29 schizo=schizo29 dev=4 targets=fcdisk2.multi3.init<br>sysconf fc PBBfc13 bus=pciB29 schizo=schizo29 dev=5 targets=fcdisk2.multi4.init<br>sysconf fc PBBfc14 bus=pciB29 schizo=schizo29 dev=6 targets=fcdisk2.multi5.init<br>sysconf fc PBBfc15 bus=pciB29 schizo=schizo29 dev=7 targets=fcdisk2.multi6.init<br>sysconf fc PBBfc17 bus=pciB29 schizo=schizo29 dev=8 targets=fcdisk2.multi7.init<br><br>sysconf fc PBBfc18 bus=pciA28 schizo=schizo28 dev=1 targets=fcdisk2.multi8.init<br>sysconf fc PBBfc19 bus=pciA28 schizo=schizo28 dev=2 targets=fcdisk3.multi1.init<br>sysconf fc PBBfc20 bus=pciA28 schizo=schizo28 dev=3 targets=fcdisk3.multi2.init<br>sysconf fc PBBfc21 bus=pciA28 schizo=schizo28 dev=4 targets=fcdisk3.multi3.init<br>sysconf fc PBBfc22 bus=pciB28 schizo=schizo28 dev=5 targets=fcdisk3.multi4.init<br>sysconf fc PBBfc23 bus=pciB28 schizo=schizo28 dev=6 targets=fcdisk3.multi5.init<br>sysconf fc PBBfc24 bus=pciB28 schizo=schizo28 dev=7 targets=fcdisk3.multi6.init<br>sysconf fc PBBfc25 bus=pciB28 schizo=schizo28 dev=8 targets=fcdisk3.multi7.init<br><br>sysconf fc PBBfc26 bus=pciB31 schizo=schizo31 dev=8 targets=fcdisk3.multi8.init<br><br>console-send "kernel/sparcv9/unix -vV\n"<br><br>################################################### end of rc file ###########################################################</pre>
<p><br>
<br>
</p>
<p><font face="Thorndale, serif">Here is an explanation of each of
the above lines:</font></p>
<pre><b>conf ramsize 65536M</b> &#8211; size of RAM or Memory on simulated machine<br><br><font
face="Cumberland, monospace"><font size="2"><b>conf mmutype cheetahplus</b> &#8211; mmu type for simulated machine</font></font>
<b>conf bootpath /pci@1f,600000/scsi@1/disk@d,0:a</b> &#8211; specifies the path of the boot device (root image), in this case c1t13d0s0<br><br><b>conf cpu_per_thread 1</b> &#8211; blaze is a multi-threaded (MP-on_MP) application. In this case the rc file specifies 8 cpus and the <br>cpu_per_thread of 1 means blaze creates 8 threads for 8 cpus i.e. 1 thread to handle each cpu. If the cpu_per_thread value <br>were 2 blaze will create 4 threads to handle 8 cpus i.e. 2 cpus per thread. Apart from the cpu threads blaze creates 1 thread <br>per disk controller (scsi and/or fc). The UI in blaze runs on a separate thread.<br><br><b>conf stickfreq 12500000</b> &#8211; run the binary /home/vsreeni/bin/stick on the reference machine and the output is the stick frequency.<br>Solaris uses STICK and STICK_COMPARE registers to keep track of time. stickfreq value defines the frequency at which the STICK<br>register update happens.<br><br><b>load 0x0e00000 fakeprom 0xffd00000</b> &#8211; where 0xffd00000 is the start adress in fakeprom (always verify this using <br>dis fakeprom, if different then change this. Fakeprom is loaded at address 0x0e00000 in memory of simulated machine.<br><br><b>load 0x00120000 ufsboot 0x00120000</b> &#8211; explanation same as for fakeprom. Just as for fakeprom you need to verify <br>start address of ufsboot by doing dis ufsboot.<br><br><b>sysconf -p ./</b> - indicates the directory in which the loadable modules are present in this case ./ i.e. current directory. In <br>latest blaze I think this is not changeable i.e. the search path for loadable modules is hard-coded to ./lib<br><br><b>sysconf cpu name=cpu0 cpu-type=SUNW,UltraSPARC-III+ clock-frequency=3000000000 dtlb-entries=32 itlb-entries=32</b> &#8211; cpu specification<br><br><b>conf mips 300</b> &#8211; Make sure this conf line is always specified after the cpu specification lines in the rc file. Useful in cpi <br>calculation. CPI is calculated by the formula: CPU clock frequency in Mhz / mips. For example in the above rc file the CPI will be<br>3000 / 300 = 10.<br><br><b>setreg pc 0xe00020</b> &#8211; this does not change unless for some reason fakeprom had to be loaded at an address different from 0x0e00000 <br>in memory of simulated machine <br><br><b>setreg npc 0xe00024</b> &#8211; explanation same as for setreg pc above.<br><br><font
face="Cumberland, monospace"><font size="2"><b>sysconf excalibur excalibur0</b> &#8211; loading of excalibur module</font></font>
<b>sysconf pci_bus pciA31 bridge=schizo31 -d0</b> &#8211; pci bus specification and the bridge it is attached. -d0 specifies the debug level.<br><br><b>sysconf schizo schizo31 aid=31 pciA=pciA31 pciB=pciB31 -d0</b> &#8211; specification for schizo bridge chip and the names of pci buses <br>attached to the bridge.<br><br><b>sysconf scsi scsi0 bus=pciA31 schizo=schizo31 dev=1 targets=scsidisk.init boothba -d0</b> &#8211; specification for scsi controller, states <br>that scsi controller scsi0 is on bus pciA31 of schizo31 bridge chip. All the disks attached to this controller are specified in <br>scsidisk.init. <a
href="#5.HOWTO:%20setup%20run%20directory%20scsi%20init%20file%7Coutline">#5.HOWTO: setup run directory scsi init file|outline</a>
<b>sysconf rtc rtc0 bus=pciA31 dev=3 fun=0</b> &#8211; specification for real time clock device module<br><br><b>sysconf gem ge1 bus=pciB31 dev=4 fun=0</b> &#8211; specification for gem device module which is ethernet card<br><br><b>sysconf serial console bus=pciB31 dev=5 fun=0 sam-console</b> &#8211; specification for serial console, the console of the simulated machine<br><br><b>sysconf ll PBBll bus=pciB31 dev=6 fun=0</b> &#8211; specification for access to local file system, ll module<br><br><b>sysconf fc PBBfc01 bus=pciA30 schizo=schizo30 dev=1 targets=fcdisk1.multi1.init</b> &#8211; similar to scsi controller this is a <br>specification fc controller PCCfc01 which is attached to bus pciA30 of schizo30 bridge chip. The fc disks attached to this <br>controller are in fcdisk1.multi1.init. <a
href="#6.HOWTO:%20setup%20run%20directory%20fc%20init%20file%7Coutline">#6.HOWTO: setup run directory fc init file|outline</a>
There can be a maximum of 8 devices attached to each bus of schizo bridge chip i.e. a total maximum of 16 devices per schizo.</pre>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="SCSI init file Setup|outline"></a><a
name="SCSI init file Setup|outline"></a><a
name="SCSI init file Setup|outline"></a><a
name="SCSI init file Setup|outline"></a><a
name="SCSI init file Setup|outline"></a>
SCSI init file Setup</h2>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Here
is a sample TPCC and a sample SAP scsi disk init file.</font></font></font></p>
<pre>################################## start of TPCC scsidisk.init file ##############################<br><br>t13d0s0 ./root.img.fc<br>t13d0s1 ./swap.img<br>t0d0s2 /net/cop4/Simics/install/import/pauly-girl1/pauly.home2.s0 vtoc<br>t0d0s3 /net/cop4/Simics/install/import/pauly-girl1/pauly.home.s3<br><font
color="#000000"><font face="Cumberland, monospace"><font size="2">t0d0s4 /net/cop4/Simics/install/import/pauly-girl1/pauly.rootdg.s4</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">################################# end of TPCC scsidisk.init file #################################</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">The controller number is assigned automatically. The format is: &lt;logical name without controller number&gt; &lt;path to disk image&gt; [,vtoc]</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">If vtoc is specified then blaze uses the vtoc to read the disk image. If you specify vtoc make sure the slice is always 2 in the logical name.</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">The above example does not work if any of the disks are under Solaris Volume Manager (SVM) control. The example below for SAP</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">takes care of SVM issues.</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">################################# start of SAP scsidisk.init file ################################</font></font></font>
<font face="Cumberland, monospace"><font size="2">t1d0s0 ./root.img</font></font>
<font face="Cumberland, monospace"><font size="2">t1d0s1 ./swap.img</font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">t2d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c2t5d0s0 vtoc serial-no="3BT0667C000010431BQJ" revision-id="5221" </font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">product-id="ST318404LSUN18G" vendor-id="SEAGATE"</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">################################ end of SAP scsidisk.init file ####################################</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">As you can see in the above SAP scsidisk.init file example the line for t2d0s2 has lots of extra parameters that are required for SVM to correctly</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">access disks under SVM control. The information needed can be gathered on the referenence machine using prtconf -v | grep c2t5d0s0. In this</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">case c2t5d0s0 is the logical name of the disk on the reference machine.</font></font></font></pre>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="FC init file Setup|outline"></a><a
name="FC init file Setup|outline"></a><a
name="FC init file Setup|outline"></a><a
name="FC init file Setup|outline"></a>
FC init file Setup</h2>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Here
is a sample TPCC and a sample fcdisk init file.</font></font></font></p>
<pre>################################# start of TPCC fcdisk1.multi1.init file ##################################<br><br>/dev/dsk/t0d0s2 /net/cop4/Simics/install/import/10k10g/c11t0d0s2 0 vtoc 21000004cf27c89e 21000004cf27c89e<br>/dev/dsk/t1d0s2 /net/cop4/Simics/install/import/10k10g/c11t10d0s2 0 vtoc 21000004cf27efd7 21000004cf27efd7<br>/dev/dsk/t2d0s2 /net/cop4/Simics/install/import/10k10g/c11t16d0s2 0 vtoc 21000004cf27c8e1 21000004cf27c8e1<br>/dev/dsk/t3d0s2 /net/cop4/Simics/install/import/10k10g/c11t17d0s2 0 vtoc 21000004cf27f29a 21000004cf27f29a<br>/dev/dsk/t4d0s2 /net/cop4/Simics/install/import/10k10g/c11t18d0s2 0 vtoc 21000004cf27c26c 21000004cf27c26c<br>/dev/dsk/t5d0s2 /net/cop4/Simics/install/import/10k10g/c11t19d0s2 0 vtoc 21000004cf27e26c 21000004cf27e26c<br>/dev/dsk/t6d0s2 /net/cop4/Simics/install/import/10k10g/c11t1d0s2 0 vtoc 21000004cf27c16f 21000004cf27c16f<br>/dev/dsk/t7d0s2 /net/cop4/Simics/install/import/10k10g/c11t20d0s2 0 vtoc 21000004cf27c74a 21000004cf27c74a<br>/dev/dsk/t8d0s2 /net/cop4/Simics/install/import/10k10g/c11t21d0s2 0 vtoc 21000004cf27cc06 21000004cf27cc06<br>/dev/dsk/t9d0s2 /net/cop4/Simics/install/import/10k10g/c11t22d0s2 0 vtoc 21000004cf27c64c 21000004cf27c64c<br>/dev/dsk/t10d0s2 /net/cop4/Simics/install/import/10k10g/c11t23d0s2 0 vtoc 21000004cf27c6ee 21000004cf27c6ee<br>/dev/dsk/t11d0s2 /net/cop4/Simics/install/import/10k10g/c11t24d0s2 0 vtoc 21000004cf27c5af 21000004cf27c5af<br>/dev/dsk/t12d0s2 /net/cop4/Simics/install/import/10k10g/c11t25d0s2 0 vtoc 21000004cf27f9dd 21000004cf27f9dd<br>/dev/dsk/t13d0s2 /net/cop4/Simics/install/import/10k10g/c11t26d0s2 0 vtoc 21000004cf27cd8b 21000004cf27cd8b<br><font
color="#000000"><font face="Cumberland, monospace"><font size="2">/dev/dsk/t14d0s2 /net/cop4/Simics/install/import/10k10g/c11t2d0s2 0 vtoc 21000004cf27e712 21000004cf27e712</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">################################ end of TPCC fcdisk1.multi1.init file ######################################</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">The controller is assigned automatically. The format is &lt;logical name without controller number&gt; &lt;path to disk image&gt; 0 vtoc &lt;portname&gt; &lt;nodename&gt;.</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">&lt;portname&gt; and &lt;nodename&gt; are identical and are obtained by doing a ls -al on the logical name in /dev/dsk directory for each of the data disks. For example:</font></font></font>
lrwxrwxrwx 1 root root 85 Jul 20 11:57 c12t1d0s2 -&gt; ../../devices/ssm@0,<font
size="3"><font face="Thorndale, serif"><font color="#000000">0/pci@19,700000/pci@3/</font></font></font>
<font size="3"><font face="Thorndale, serif"><font color="#000000">SUNW,qlc@4/fp@0,</font></font></font>0/ssd@w50020f2300006207,<font
size="3"><font face="Thorndale, serif"><font color="#000000">0:c</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">portname = nodename = 50020f2300006207</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">The above example works when the data disks are under Veritas control. We need extra data when data disks are under SVM control. Given below is an SAP</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">fc init file as an example.</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">############################################## start of SAP fcdisk.data1.init file ##########################################</font></font></font>
t0d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t2d0s0 0 vtoc 210000203733adb7 200000203733adb7 revision-id="0929" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.ad.b7 node-wwn=20.00.00.20.37.33.ad.b7
t1d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t3d0s0 0 vtoc 21000020372b7c40 20000020372b7c40 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.7c.40 node-wwn=20.00.00.20.37.2b.7c.40
t2d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t4d0s0 0 vtoc 21000020372b81f6 20000020372b81f6 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.81.f6 node-wwn=21.00.00.20.37.2b.81.f6
t3d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t5d0s0 0 vtoc 21000020372b77ad 20000020372b77ad revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.77.ad node-wwn=20.00.00.20.37.2b.77.ad
t4d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t6d0s0 0 vtoc 21000020372b806e 20000020372b806e revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.80.6e node-wwn=20.00.00.20.37.2b.80.6e
t5d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t7d0s0 0 vtoc 21000020372b6ee1 20000020372b6ee1 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.6e.e1 node-wwn=20.00.00.20.37.2b.6e.e1
t6d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t8d0s0 0 vtoc 21000020372b81cd 20000020372b81cd revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.81.cd node-wwn=20.00.00.20.37.2b.81.cd
t15d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c4t9d0s0 0 vtoc 21000020372b8284 20000020372b8284 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.2b.82.84 node-wwn=20.00.00.20.37.2b.82.84
t8d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t2d0s0 0 vtoc 2100002037331084 2000002037331084 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.10.84 node-wwn=20.00.00.20.37.33.10.84
t9d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t3d0s0 0 vtoc 210000203722e506 200000203722e506 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.22.e5.06 node-wwn=20.00.00.20.37.22.e5.06
t10d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t4d0s0 0 vtoc 2100002037330d60 2000002037330d60 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.0d.60 node-wwn=20.00.00.20.37.33.0d.60
t11d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t5d0s0 0 vtoc 2100002037330d78 2000002037330d78 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.0d.78 node-wwn=20.00.00.20.37.33.0d.78
t12d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t6d0s0 0 vtoc 2100002037330fef 2000002037330fef revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.0f.ef node-wwn=20.00.00.20.37.33.0f.ef
t13d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t7d0s0 0 vtoc 21000020373318c6 20000020373318c6 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.18.c6 node-wwn=20.00.00.20.37.33.18.c6
<font color="#000000"><font face="Cumberland, monospace"><font size="2">t14d0s2 /net/cop4/Simics/mnts/mnt24/sap_2005_new/c6t8d0s0 0 vtoc 2100002037330fb7 2000002037330fb7 revision-id="0728" product-id="ST39102FCSUN9.0G" vendor-id="SEAGATE" port-wwn=21.00.00.20.37.33.0f.b7 node-wwn=20.00.00.20.37.33.0f.b7</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">############################################ end of SAP fcdisk.data1.init file #############################################</font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">As you see above for SVM to correctly access data disks under SVM control we need extra parameters. The information needed can be gathered on the referenence </font></font></font>
<font color="#000000"><font face="Thorndale, serif"><font size="3">machine using prtconf -v | grep c6t8d0s0. In this case c6t8d0s0 is the logical name of the disk on the reference machine which is the last in the above list.</font></font></font></pre>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Disk Image file from a Reference System|outline"></a><a
name="Disk Image file from a Reference System|outline"></a><a
name="Disk Image file from a Reference System|outline"></a><a
name="Disk Image file from a Reference System|outline"></a><a
name="Disk Image file from a Reference System|outline"></a><a
name="Disk Image file from a Reference System|outline"></a>
Disk Image file from a Reference System</h2>
<p>You have to have root access to that host system -</p>
<ol>
<li>
<p>Login as root and run &#8221;prtvtoc&#8221; on the disk where the root
partition resides to get the disk configuration,</p>
</li>
</ol>
<p style="margin-left: 0.49in;">You can know where the root partition
is by looking at /etc/vfstab and see the device logical link that is
mounted at /. For example if the root partition is c0t1d0s0 do a
prtvtoc on slice 2 of the disk i.e. c0t1d0s2.</p>
<ol>
<p><font size="2">#prtvtoc /dev/rdsk/c0t1d0s2</font></p>
</ol>
<pre> * /dev/rdsk/c0t1d0s2 partition map<br> *<br> * Dimensions:<br> * 512 bytes/sector<br> * 248 sectors/track<br> * 19 tracks/cylinder<br> * 4712 sectors/cylinder<br> * 7508 cylinders<br> * 7506 accessible cylinders<br> *<br> * Flags:<br> * 1: unmountable<br> * 10: read-only<br> *<br> * First Sector Last<br> * Partition Tag Flags Sector Count Sector Mount Directory<br> 0 2 00 0 31273544 31273543 /<br> 1 3 01 31273544 4094728 35368271<br> 2 5 00 0 35368272 35368271</pre>
<ol start="2">
<li>
<p>From above vtoc table, the root partition starts from 0 (first
sector) and total in 31273544 sector counts. Slice 2 of a disk is a
special slice that points to the entire disk and so when you do dd your
input is slice 2 of the disk that holds the root partition. Using the
following command to create a root disk image:</p>
</li>
</ol>
<ol start="3">
<p>dd if=/dev/dsk/c0t1d0s2 of=/blaze/aa/lren/env09-root iseek=0
count=31273544</p>
<p>The general format is the following:</p>
<p>dd if=&#8221;partition 2 of the disk with root resides, partition 2
points to the entire disk&#8221; of=&#8221;disk image file name&#8221; iseek=&#8221;first
sector&#8221; count=&#8221;sector count&#8221;</p>
<li>
<p>Follow above steps 1 and 2 for the swap partition as well to
generate swap disk image file.</p>
</li>
</ol>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Modifying root image to boot on SAM|outline"></a>Modifying
root image to boot on SAM</h2>
<p>Before making following changes to your root disk image, mount the
disk file as a lofi device, by doing</p>
<pre> lofiadm -a "your root image file"<br> mount /lofi/dev/x /tmp/root-image </pre>
<p>where x is the lofi device number from "lofiadm -a" above
command and /tmp/root-image is where your root image will be mounted.
Be very careful when modifying root image because you are root on the
machine on which you have the root image mounted. For example if you
want to delete /etc/path_to_inst remember that it is
/tmp/root-image/etc/path_to_inst that needs to be deleted. Before
doing rm or mv or editing any file always do pwd to make sure you are
in /tmp/root-image/...</p>
<p>Please note, </p>
<ul>
<li>
<p style="margin-bottom: 0in;">you need to "umount" and "lofiadm
-d" after you are done with the changes </p>
</li>
<li>
<p>/tmp/root-image will be referenced in this document as the the
device your root image</p>
</li>
</ul>
<ol>
<li>
<p>Install drivers.</p>
</li>
</ol>
<p style="margin-left: 0.79in;">Copy following drivers from
/import/blazetrace/blz-binaries/drivers/ to
/tmp/root-image/kernel/drv/sparcv9,</p>
<ol>
<ol>
<pre>pcisimd<br>pcisimc<br>bid</pre>
</ol>
</ol>
<p style="margin-left: 0.79in;">Solaris 9</p>
<ol>
<ol start="0">
<pre style="margin-bottom: 0.2in;">Copy following drivers from /import/blazetrace/blz-binaries/drivers/ to /tmp/root-image/kernel/drv/sparcv9</pre>
</ol>
</ol>
<pre style="margin-left: 0.98in;">ll<br>Copy following driver from /import/blazetrace/blz-binaries/drivers/ to /tmp/root-image/kernel/fs/sparcv9<br>llfs<br>Create /tmp/root-image/usr/lib/fs/llfs directory and copy /import/blazetrace/blz-binaries/drivers/mount into that directory.</pre>
<p style="margin-left: 0.79in;">Solaris 10</p>
<ol>
<ol start="0">
<pre style="margin-bottom: 0.2in;">Copy following drivers from /import/blazetrace/blz-binaries/drivers/S10_63/ to /tmp/root-image/kernel/drv/sparcv9</pre>
</ol>
</ol>
<pre style="margin-left: 0.99in;">ll<br>Copy following driver from /import/blazetrace/blz-binaries/drivers/S10_63/ to /tmp/root-image/kernel/fs/sparcv9<br>llfs<br>Create /tmp/root-image/usr/lib/fs/llfs directory and copy /import/blazetrace/blz-binaries/drivers/S10_63/mount into that directory.</pre>
<ol start="2">
<li>
<p>Create device nodes</p>
</li>
</ol>
<pre style="margin-left: 0.48in; margin-bottom: 0.2in;">cd /tmp/root-image/devices</pre>
<ol start="2">
<pre>mkdir pci@1f,600000<br>cd pci@1f,600000</pre>
</ol>
<pre style="margin-left: 0.48in; margin-bottom: 0.2in;"><font
face="Thorndale, serif"><font size="3">You need to do the following for root and swap only. Let us assume here that root is at /dev/dsk/c0t0d0s0 and swap is at /dev/dsk/c0t0d0s1.</font></font></pre>
<ol start="2">
<pre>mkdir scsi@0<br>mknod scsi@0:devctl c 50 0<br>mknod scsi@0:scsi c 50 1<br>cd scsi@0<br>mknod sd@0,0:a b 32 0<br>mknod sd@0,0:a,raw c 32 0<br>mknod sd@0,0:b b 32 1<br>mknod sd@0,0:b,raw c 32 1</pre>
</ol>
<pre style="margin-left: 0.48in;"><font face="Thorndale, serif"><font
size="3">scsi@0 is for c0 and it stands for controller 0. sd@0,0 is for t0 and d0 i.e. target 0 and disk 0. The :a stands for s0 or slice 0 and :b stands for s1 or slice 1.</font></font>
<font face="Thorndale, serif"><font size="3">The 50 stands for major device number for scsi controller and this is used by solaris to load the appropriate device driver in this case glm. Look at /etc/name_to_major file and grep for 50. The 32 stands for major device number for scsi disk. You will find sd entry in /etc/name_to_major as well. Look at man pages for further details.</font></font>
<font face="Thorndale, serif"><font size="3">Minor number calculation:</font></font></pre>
<ol start="2">
<pre style="margin-bottom: 0.2in;">minor number = (controller_id * 120) + (target_id * 8) + (partition_id)</pre>
</ol>
<pre style="margin-left: 0.47in;">Examples:<br>c1t0d0s0: minor number = 1*120 + 0*0 + 0 = 120<br>c1t1d0s3: minor number = 1*120 + 1*8 + 3 = 131</pre>
<ol start="3">
<li>
<p>Create dev links<br>
Here is the example to link c0t0d0s0 and c0t0d0s1 to their device
nodes. If there are existing names, please do mkdir OFF and mv them
into that directory before performing the following links.</p>
</li>
</ol>
<pre> cd /tmp/root-image/dev/dsk<br> ln -s ../../devices/pci@1f,600000/scsi@0/sd@0,0:a c0t0d0s0<br> ln -s ../../devices/pci@1f,600000/scsi@0/sd@0,0:b c0t0d0s1<br> cd /tmp/root-image/dev/rdsk<br> ln -s ../../devices/pci@1f,600000/scsi@0/sd@0,0:a,raw c0t0d0s0<br> ln -s ../../devices/pci@1f,600000/scsi@0/sd@0,0:b,raw c0t0d0s1<br><br><font
face="Thorndale, serif"><font size="3">Note that although you only create device nodes in step 2 for root and image you have to create these /dev/dsk links or logical names for all disks that you need for simulation for example data disks from a database. We will talk about this later in this document.</font></font></pre>
<ol start="4">
<li>
<p>Create llfs file system mount point</p>
</li>
</ol>
<pre> cd /tmp/root-image/<br> mkdir ll<br> cd ll<br> mkdir root<br><br><font
face="Thorndale, serif"><font size="3">This is used to access the local file system which will get mounted under /ll/root on the simulated machine during boot.</font></font></pre>
<ol start="5">
<li>
<p>Administrative works in /etc directory</p>
</li>
</ol>
<p style="margin-left: 0.49in;">Save or remove host system specific
files.</p>
<p style="margin-left: 1in;">The list of files here is system
dependent. Your target system might not have more or less than what
are mentioned here.</p>
<pre style="margin-left: 0.99in;">cd /tmp/root-image/etc<br> mkdir OFF<br> mv defaultdomain dumpadm hostname* hosts mnttab path_to_inst OFF<br> cd /tmp/root-image/etc/rcS.d<br> mkdir OFF<br> mv S50devfsadm OFF<br> </pre>
<p style="margin-left: 0.5in;">Modifications for /etc files</p>
<pre> /tmp/root-image/etc/system - add following line <br> set pcisch:pci_buserr_interrupt=0<br> <br> /tmp/root-image/etc/vfstab - for example,<br> #device device mount FS fsck mount mount<br> #to mount to fsck point type pass at boot options<br> #<br> fd - /dev/fd fd - no -<br> /proc - /proc proc - no -<br> /dev/dsk/c0t0d0s1 - - swap - no -<br> /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -<br> %/ - /ll/root llfs - yes -<br> <br> And any additional disks you would like to map, for example<br> /dev/dsk/c0t2d0s0 - /export/apps ufs 1 no -<br> <br> /tmp/root-image/etc/name_to_major &#8211; find a available major number for Blaze specific devices and add<br> pcisimd 251<br> pcisimc 252<br> bid 253<br> ll 254<br><br>The device numbers assigned here need not be 251, 252 etc. Just go to the end of the file name_to_major<br>and start assigning numbers greater than the highest number you see in the file.<br><br> /tmp/root-image/etc/shadow &#8211; change the login password for root login<br> root::11431::::::<br> <br> /tmp/root-image/etc/minor_perm &#8211; add the following line<br> pcisimc:* 0660 root sys<br><br> /tmp/root-image/etc/iu.ap - add pcisimc here otherwise the text output wont line up on Blaze console.<br> pcisimc 0 0 ldterm ttcompat</pre>
<ol start="6">
<li>
<p>Blaze specific files</p>
</li>
</ol>
<pre> /tmp/root-image/etc/hosts &#8211; you need a unique name and IP address within the subnet where you are going to run Blaze<br> for example,<br> #<br> # Blaze internet hosts file<br> #<br> 127.0.0.1 localhost loghost<br> 129.144.10.170 moan<br><br> /tmp/root-image/etc/path_to_inst &#8211; the path_to_inst for blas&eacute; only need one line as following,<br> #path_to_inst_bootstrap_1<br><br>If you have database disks under SVM in your simulation setup then you need to refer to the following<br>section to modify path_to_inst file:<br><br> /tmp/root-image/etc/mnttab &#8211; make it a empty file for Blaze.</pre>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Check-pointing using Dump/Restore|outline"></a><a
name="Check-pointing using Dump/Restore|outline"></a>
Check-pointing using Dump/Restore</h2>
<p>Certain benchmarks takes weeks to run. It is always a good idea to
generate checkpoints along the way. If multiple SAM simulations are
connected using switchsim and they are running in time-sync mode do
the following to generate checkpoint:</p>
<p><i><b>At switchsim prompt: sync off</b></i></p>
<p><i><b>At each SAM prompt: stop</b></i></p>
<p><i><b>At each SAM prompt: dump &lt;checkpointdir&gt;</b></i></p>
<p>Where &lt;checkpointdir&gt; is the path to where the checkpoint
will be stored. Make sure you have enough disk space in the partition
of the &lt;checkpointdir&gt;. Once checkpoint is generated do the
following to continue running:</p>
<p><i><b>At each SAM prompt: sync on</b></i></p>
<p><i><b>At switchsim prompt: sync on</b></i></p>
<p>It is not advisable to run multiple SAMs without time-sync being
&#8220;on&#8221; in switchsim.</p>
<p>If your simulation involves only one SAM then to generate the
checkpoint do the following:</p>
<p><i><b>At SAM prompt: stop</b></i></p>
<p><i><b>At SAM prompt: dump &lt;checkpointdir&gt;</b></i></p>
<p>To restore SAM from a checkpoint add &#8220;<b><i>-R
&lt;checkpointdir&gt;</i></b>&#8221; to the SAM run command. Make
sure your config.rc is the same as what was used during checkpoint
generation.</p>
<p>Once your benchmark is warmed and ready to be traced you will
generate a pretracing checkpoint. This is a very important checkpoint
which will not only be used to generate traces but also to do
execution-driven simulation by attaching SAM to a cycle-accurate CPU
simulator which restores from the same checkpoint.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Lazy Restore|outline"></a><a name="Lazy Restore|outline"></a>
Lazy Restore</h2>
<p>Frequently, you will want to restore from a large checkpoint with
a huge amount of memory and built-up disk state, but only run for a
short amount of time. Because of the short simulation duration, you
will not read every memory page or every disk block. The lazy restore
feature allows you to restore from a large checkpoint and run the
simulation with a smaller memory and disk footprint. <br>
<br>
For
example, consider a realistic database simulation with 64GB of
simulated memory, and 10 TB of disk images with 500 GB of accumulated
disk updates (overlays). <br>
<br>
When this checkpoint is restored,
SAM does not make a copy of the entire accumulated overlay files.
Instead, it memory-maps the overlay from the checkpoint, and only
writes newer updates to the overlay files in the working directory.
This feature is always enabled on SAM. <br>
<br>
A similar optimization
is available for the simulated memory, where you can restore the
simulation on a machine with less available memory than simulated.
This is achieved by specifying the <b><i>-nonemreserve</i></b> option
to the SAM command-line. <br>
<br>
Keep in mind that in both these
cases, SAM does not reserve memory or disk space on the real machine
for the corresponding simulated RAM/disk, and if the simulation runs
long enough, a failure can happen as no more space is available to
simulate more updates to memory or disk. </p>
<p>==========================================================================================================================================</p>
<h1><a name="11.Running SAM Huron|outline"></a>Running SAM Huron</h1>
<p>To run SAM, launch the SAM binary from the SAM run directory.
Ofcourse before running SAM Chplus we need a solaris root image,
configuration files etc. The following sections explain in detail the
steps that need to be done. Most of the steps in here are the same as
for SAM Chplus. That is the reason you will links back to SAM Chplus
documentation in most places. I have provided explanation for steps
that are unique to SAM Huron in this section. For <a
href="#Getting%20Started%7Coutline"><b>Getting
Started</b></a>, <a href="#Creating%20a%20Root%20Image%7Coutline"><b>Creating
a Root Image</b></a>, <a href="#Data%20Disk%20Images%7Coutline"><b>Data
Disk Images</b></a>, <a href="#SCSI%20init%20file%20Setup%7Coutline"><b>SCSI
init file Setup</b></a>, <a href="#FC%20init%20file%20Setup%7Coutline"><b>FC
init file Setup</b></a>, <a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline"><b>Disk
Image file from a Reference System</b></a>, <a
href="#Check-pointing%20using%20Dump/Restore%7Coutline"><b>Check-pointing
using Dump/Restore</b></a><b> </b>and <a
href="#Lazy%20Restore%7Coutline"><b>Lazy
Restore</b></a> refer to SAM Chplus documentation.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Getting and running SAM Huron|outline"></a>Getting and
running SAM Huron</h2>
<p>Go to the directory where you want the SAM to be installed and run
the following command. Note that SAM chplus, SAM vonk etc. are all in
one workspace.</p>
<p><i><b># bringover -p /import/archperf/ws/sam -w ./&lt;samdir&gt; .</b></i></p>
<p><i><b># cd &lt;samdir&gt;</b></i></p>
<p><i><b># make install-n2</b></i></p>
<p style="font-style: normal;">The above command
will build the Huron version of SAM. The above command will create a
directory install-n2. You will find the following directories under
install-chplus directory: bin, doc, etc, lib, man, pfe, rtl. The bin
directory has the sam binary and the lib directory has all the
loadable modules for devices. </p>
<p style="font-style: normal;">Before you can run
SAM Huron the run directory must contain the following files:</p>
<ol>
<li value="1">
<p><font face="Thorndale, serif"><font size="3"><b>bin/sam:</b> sam
binary</font></font></p>
</li>
<li>
<p><font face="Thorndale, serif"><font size="3"><b>lib/*.so:</b>
the lib directory contains all the loadable modules (*.so)</font></font></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>config.rc:</b> the rc file
where system configuration is specified. </font><a
href="#RC%20file%20Setup%7Coutline">RC file Setup</a></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>scsidisk.init:</b> there could
be more than one of these files. </font><a
href="#SCSI%20init%20file%20Setup%7Coutline">SCSI init file Setup</a></p>
</li>
<li>
<p><font face="Thorndale, serif"><b>1c1t-hv.bin:</b> </font> </p>
</li>
<li>
<p><b>1c1t-md.bin:</b> </p>
</li>
<li>
<p><b>q.bin:</b> </p>
</li>
<li>
<p><b>reset.bin:</b> </p>
</li>
<li>
<p><b>openboot.bin:</b> </p>
</li>
<li>
<p><b>nvram.bin:</b> </p>
</li>
<li>
<p><b>root.img:</b> link to or a copy of the modified root image. <a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline">Disk
Image file from a Reference System</a></p>
</li>
<li>
<p><b>swap.img:</b> link to or a copy of swap image. <a
href="#Disk%20Image%20file%20from%20a%20Reference%20System%7Coutline">Disk
Image file from a Reference System</a></p>
</li>
</ol>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><u><b>Without
networking:</b></u></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><i><b>#
bin/sam -c config.rc</b></i></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">The
-w is not needed here because it is the default. The -w automatically
brings up the console window of the simulated machine. Make sure you
have set your DISPLAY environment variable correctly.</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">At
blaze prompt: run</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">In
the simulated window do the following:</font></font></font></p>
<pre style="margin-left: 0.5in;">After getting the ok prompt select ll device by typing<br>dev /pci@0/pci@0/pci108e,0@2<br><br>Type the following to create needed properties (spaces are important below) <br>" ll" encode-string " name" property<br>2 encode-int " #size-cells" property <br>3 encode-int " #address-cells" property<br><br>At ok prompt type to start booting<br><font
color="#000000"><font face="Thorndale, serif"><font size="3"><font
size="2"><font face="Cumberland, monospace">boot /pci@0/pci@0/scsi@1/disk -vV</font></font> </font></font></font></pre>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3"><u><b>With
networking:</b></u></font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Make
sure you have created a file called hostname.ge0 in /etc/system
directory on root image and the file should have the machine name in
it.</font></font></font></p>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">It
could be ge0 or ce0 depending the NIC card gem or cassini being used.
It could be ge0 or ge1 depending on the name specified in rc file for
the device.</font></font></font></p>
<ol>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">Start switchsim on any machine using command: <b><i>#
/import/blaze-trace/blz-binaries/switch-v1.6 -r ip</i></b>. Switch does
the following:</font></font></font></p>
<ol>
<ol type="a">
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">connects multiple blaze simulated environments together</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">models network delay</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">sync multiple blazes on time boundaries</font></font></font></p>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">behaves as a traditional switch in a real network</font></font></font></p>
</li>
</ol>
</ol>
</li>
<li>
<p><font color="#000000"><font face="Thorndale, serif"><font
size="3">Start blaze and connect to switch</font></font></font></p>
</li>
</ol>
<pre style="margin-left: 0.5in;"><i><b># bin/sam -c config.rc</b></i>
At blaze prompt: &#8220;simge connect &lt;machine name&gt;&#8221; where &lt;machine name&gt; is the machine on which switchsim is running
At blaze prompt: &#8220;sync connect &lt;machine name&gt;&#8221; where &lt;machine name&gt; is the machine on which switchsim is running
<font color="#000000"><font face="Cumberland, monospace"><font size="2">At blaze prompt: &#8220;conf&#8221; ensure correct values for all parameters, if not, change using &#8220;conf &lt;parameter&gt; &lt;value&gt;&#8221;</font></font></font>
<font color="#000000"><font face="Cumberland, monospace"><font size="2">At blaze prompt: run</font></font></font></pre>
<p style="margin-left: 0.49in;"><font color="#000000"><font
face="Thorndale, serif"><font size="3">In
the simulated window do the following:</font></font></font></p>
<pre style="margin-left: 0.5in;">After getting the ok prompt select ll device by typing<br>dev /pci@0/pci@0/pci108e,0@2<br><br>Type the following to create needed properties (spaces are important below) <br>" ll" encode-string " name" property<br>2 encode-int " #size-cells" property <br>3 encode-int " #address-cells" property<br><br>At ok prompt type to start booting<br><font
color="#000000"><font face="Cumberland, monospace"><font size="2">boot /pci@0/pci@0/scsi@1/disk -vV</font></font></font></pre>
<ol start="3">
<li>
<pre style="margin-bottom: 0.2in;"><font color="#000000"><font
face="Thorndale, serif"><font size="3">Bringup ge/ce NIC</font></font></font></pre>
</li>
</ol>
<pre style="margin-left: 0.5in;">After boot login as root in the simulated machine and then run the following commands in the simulated machine:<br>devfsadm -i ge<br>ifconfig ge0 plumb<br>ifconfig ge0 inet &lt;ip address&gt; netmask &lt;net mask&gt;<br>ifconfig ge0 ether &lt;mac address&gt;, mac address is currently not being used in SAM<br>ifconfig ge0 up</pre>
<ol start="4">
<li>
<p>Start other blazes and connect them using steps 2 and 3 above.</p>
</li>
<li>
<p>Check to see if the simulated machines are communicating using
traditional ping etc.</p>
</li>
</ol>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Huron RC file Setup|outline"></a>Huron RC file Setup</h2>
<p><font color="#000000"><font face="Thorndale, serif"><font size="3">Here
is a sample TPCE rc file. I included TPCE because it covers all the
facets of the setup.</font></font></font></p>
<pre>############################################### start of rc file ###########################################################<br><br>conf ramsize 65536M<br><br>conf mips 1000<br><br>conf cpu_per_thread 1<br><br>conf stickfreq 1417000000<br><br>load bin 1c2t-hv.bin 0x1f12080000<br>load bin 1c2t-md.bin 0x1f12000000<br><br>load bin ./nvram.bin 0x1f11000000<br><br>sysconf -p ./<br><br>sysconf cpu name=cpu0 cpu-type=SUNW,UltraSPARC-N2 clock-frequency=1417000000 id=0<br>sysconf cpu name=cpu1 cpu-type=SUNW,UltraSPARC-N2 clock-frequency=1417000000 id=1<br><br>sysconf ioram reset start_pa=0xfff0000000 size=0x10000 file=reset.bin sparse<br>sysconf ioram hv start_pa=0xfff0010000 size=0x70000 file=q.bin sparse<br>sysconf ioram obp start_pa=0xfff0080000 size=0x80000 file=openboot.bin sparse<br><br>sysconf serial_4v hypervisor-console base=0xfff0c2c000 size=0x1000<br><br>sysconf serial_4v guest-console base=0x9f10000000 size=0x51 pop log=1c2t.guest.log<br><br>sysconf tod_4v tod base=0xfff0c1fff8 size=0x8 tod=01010000002000 -d2<br><br>sysconf n2_ncu ncu<br>sysconf n2_piu piu bus=pciea ncu=ncu<br>sysconf pcie_bus pciea bridge=piu<br>sysconf bridge b0 bus=pciea dev=0 fun=0 secbus=pcia<br>sysconf bridge b2 bus=pciea dev=0 fun=2 secbus=pcib<br><br>sysconf pci_bus pcia bridge=b0<br>sysconf pci_bus pcib bridge=b2 <br><br>sysconf scsi scsi0 bus=pcia dev=1 fun=0 targets=scsidisk1.init <br>sysconf ll ll0 bus=pcia dev=2 fun=0<br>sysconf gem ge0 bus=pcia dev=3 fun=0 <br><br>sysconf fc fc1 bus=pcib dev=1 fun=0 targets=fcdisk2.1.init<br>sysconf fc fc2 bus=pcib dev=2 fun=0 targets=fcdisk2.2.init<br>sysconf fc fc3 bus=pcib dev=3 fun=0 targets=fcdisk2.3.init<br>sysconf fc fc4 bus=pcib dev=4 fun=0 targets=fcdisk2.4.init<br>sysconf fc fc5 bus=pcib dev=5 fun=0 targets=fcdisk2.5.init<br>sysconf fc fc6 bus=pcib dev=6 fun=0 targets=fcdisk2.6.init<br>sysconf fc fc7 bus=pcib dev=7 fun=0 targets=fcdisk2.7.init<br>sysconf fc fc8 bus=pcib dev=8 fun=0 targets=fcdisk2.8.init<br>sysconf fc fc9 bus=pcib dev=9 fun=0 targets=fcdisk2.9.init<br><br>################################################### end of rc file ###########################################################</pre>
<p><br>
<br>
</p>
<p><font face="Thorndale, serif">Here is an explanation of each of
the above lines:</font></p>
<pre><b>conf ramsize 65536M</b> &#8211; size of RAM or Memory on simulated machine<br><br><font
face="Cumberland, monospace"><b>conf mips 1000</b> &#8211; Useful in cpi </font>calculation. CPI is calculated by the formula: CPU clock frequency in Mhz / mips. For example <br>in the above rc file the CPI will be 1417 <font
face="Cumberland, monospace">/ 1000 = 1.417.</font>
<b>conf cpu_per_thread 1</b> &#8211; blaze is a multi-threaded (MP-on_MP) application. In this case the rc file specifies 8 cpus and the <br>cpu_per_thread of 1 means blaze creates 8 threads for 8 cpus i.e. 1 thread to handle each cpu. If the cpu_per_thread value <br>were 2 blaze will create 4 threads to handle 8 cpus i.e. 2 cpus per thread. Apart from the cpu threads blaze creates 1 thread <br>per disk controller (scsi and/or fc). The UI in blaze runs on a separate thread.<br><br><b>conf stickfreq 1417000000</b> &#8211; run the binary /home/vsreeni/bin/stick on the reference machine and the output is the stick frequency.<br>Solaris uses STICK and STICK_COMPARE registers to keep track of time. stickfreq value defines the frequency at which the STICK<br>register update happens. Note that for Huron based systems stickfreq and cpufreq are the same.<br><br><b>load bin 1c2t-hv.bin 0x1f12080000 </b>- guest partition description, currently from Legion workspace<br><br><b>load bin 1c2t-md.bin 0x1f12000000</b> &#8211; machine description, currently from Legion workspace<br><br><b>load bin ./nvram.bin 0x1f11000000</b> - a zero filled file, obtained by modifying an existing nvram file.<br><br><b>sysconf -p ./</b> - indicates the directory in which the loadable modules are present in this case ./ i.e. current directory. In <br>latest blaze I think this is not changeable i.e. the search path for loadable modules is hard-coded to ./lib<br><br><b>sysconf cpu name=cpu0 cpu-type=SUNW,UltraSPARC-N2 clock-frequency=1417000000 id=0</b> &#8211; cpu specification<br><br><b>sysconf ioram reset start_pa=0xfff0000000 size=0x10000 file=reset.bin sparse</b> - reset code, HV workspace<br><br><b>sysconf ioram hv start_pa=0xfff0010000 size=0x70000 file=q.bin sparse</b> - hypervisor, HV workspace<br><br><b>sysconf ioram obp start_pa=0xfff0080000 size=0x80000 file=openboot.bin sparse</b> - OBP, OBP workspace<br><br><b>sysconf serial_4v hypervisor-console base=0xfff0c2c000 size=0x1000</b> - specification for serial console, the hypervisor console <br>of the simulated machine<br><br><b>sysconf serial_4v guest-console base=0x9f10000000 size=0x51 pop log=1c2t.guest.log</b> - specification for serial console, the <br>console of the simulated machine<br><br><b>sysconf tod_4v tod base=0xfff0c1fff8 size=0x8 tod=01010000002000 -d2</b> - specification for time of day device module. -d2<br>specifies the debug level.<br><br><b>sysconf n2_ncu ncu</b> &#8211; non-cacheable unit<br><br><b>sysconf n2_piu piu bus=pciea ncu=ncu</b> &#8211; pcie interface unit<br><br><b>sysconf pcie_bus pciea bridge=piu</b> - pci bus specification and the bridge it is attached<br><br><b>sysconf bridge b0 bus=pciea dev=0 fun=0 secbus=pcia</b> - specification for bridge chip and the names of pci buses attached to <br>the bridge.<br><br><b>sysconf pci_bus pcia bridge=b0</b> - pci bus specification and the bridge it is attached. <br><br><b>sysconf scsi scsi0 bus=pcia dev=1 fun=0 targets=scsidisk1.init</b> - specification for scsi controller, states that scsi controller<br>scsi0 is on bus pcia. All the disks attached to this controller are specified in scsidisk.init. <br><a
href="#5.HOWTO:%20setup%20run%20directory%20scsi%20init%20file%7Coutline">#5.HOWTO: setup run directory scsi init file|outline</a>
<b>sysconf ll ll0 bus=pcia dev=2 fun=0</b> - specification for access to local file system, ll module<br><br><b>sysconf gem ge0 bus=pcia dev=3 fun=0</b> - specification for gem device module which is ethernet card<br><br><b>sysconf fc fc1 bus=pcib dev=1 fun=0 targets=fcdisk2.1.init</b> - similar to scsi controller this is a <br>specification fc controller PCCfc01 which is attached to bus pciA30 of schizo30 bridge chip. The fc disks attached to this <br>controller are in fcdisk1.multi1.init. <a
href="#6.HOWTO:%20setup%20run%20directory%20fc%20init%20file%7Coutline">#6.HOWTO: setup run directory fc init file|outline</a>
-----------------------------------------------------------------------------------------------------------------------------------------------------------</pre>
<h2><a name="Modifying root image to boot on SAM Huron|outline"></a>Modifying
root image to boot on SAM Huron</h2>
<p>Before making following changes to your root disk image, mount the
disk file as a lofi device, by doing</p>
<pre> lofiadm -a "your root image file"<br> mount /lofi/dev/x /tmp/root-image </pre>
<p>where x is the lofi device number from "lofiadm -a" above
command and /tmp/root-image is where your root image will be mounted.
Be very careful when modifying root image because you are root on the
machine on which you have the root image mounted. For example if you
want to delete /etc/path_to_inst remember that it is
/tmp/root-image/etc/path_to_inst that needs to be deleted. Before
doing rm or mv or editing any file always do pwd to make sure you are
in /tmp/root-image/...</p>
<p>Please note, </p>
<ul>
<li>
<p style="margin-bottom: 0in;">you need to "umount" and "lofiadm
-d" after you are done with the changes </p>
</li>
<li>
<p>/tmp/root-image will be referenced in this document as the the
device your root image</p>
</li>
</ul>
<ol>
<li>
<p>Install drivers.</p>
</li>
</ol>
<p style="margin-left: 0.79in;">Copy following drivers from
/import/blazetrace/blz-binaries/drivers/ to
/tmp/root-image/kernel/drv/sparcv9,</p>
<ol>
<ol>
<pre>pcisimd<br>pcisimc<br>bid</pre>
</ol>
</ol>
<p style="margin-left: 0.79in;">Solaris 11</p>
<ol>
<ol start="0">
<pre style="margin-bottom: 0.2in;">Copy following drivers from /import/blazetrace/blz-binaries/drivers/S11/ to /tmp/root-image/kernel/drv/sparcv9</pre>
</ol>
</ol>
<pre style="margin-left: 0.99in;">ll<br>Copy following driver from /import/blazetrace/blz-binaries/drivers/S11/ to /tmp/root-image/kernel/fs/sparcv9<br>llfs<br>Create /tmp/root-image/usr/lib/fs/llfs directory and copy /import/blazetrace/blz-binaries/drivers/S11/mount into that directory.</pre>
<ol start="2">
<li>
<p>Create llfs file system mount point</p>
</li>
</ol>
<pre> cd /tmp/root-image/<br> mkdir ll<br> cd ll<br> mkdir root<br><br><font
face="Thorndale, serif"><font size="3">This is used to access the local file system which will get mounted under /ll/root on the simulated machine during boot.</font></font></pre>
<ol start="3">
<li>
<p>Administrative works in /etc directory</p>
</li>
</ol>
<p style="margin-left: 0.49in;">Save or remove host system specific
files.</p>
<p style="margin-left: 1in;">The list of files here is system
dependent. Your target system might not have more or less than what
are mentioned here.</p>
<pre style="margin-left: 0.99in;">cd /tmp/root-image/etc<br> mkdir OFF<br> mv defaultdomain dumpadm hostname* hosts mnttab path_to_inst OFF<br> cd /tmp/root-image/etc/rcS.d<br> mkdir OFF<br> mv S50devfsadm OFF<br> </pre>
<p style="margin-left: 0.5in;">Modifications for /etc files</p>
<pre> /tmp/root-image/etc/system - add following line <br> set pcisch:pci_buserr_interrupt=0<br> <br> /tmp/root-image/etc/vfstab - for example,<br> #device device mount FS fsck mount mount<br> #to mount to fsck point type pass at boot options<br> #<br> fd - /dev/fd fd - no -<br> /proc - /proc proc - no -<br> /dev/dsk/c0t0d0s1 - - swap - no -<br> /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -<br> %/ - /ll/root llfs - yes -<br> <br> And any additional disks you would like to map, for example<br> /dev/dsk/c0t2d0s0 - /export/apps ufs 1 no -<br> <br> /tmp/root-image/etc/name_to_major &#8211; find a available major number for Blaze specific devices and add<br> pcisimd 251<br> pcisimc 252<br> bid 253<br> ll 254<br><br>The device numbers assigned here need not be 251, 252 etc. Just go to the end of the file name_to_major<br>and start assigning numbers greater than the highest number you see in the file.<br><br> /tmp/root-image/etc/shadow &#8211; change the login password for root login<br> root::11431::::::<br> <br> /tmp/root-image/etc/minor_perm &#8211; add the following line<br> pcisimc:* 0660 root sys<br><br> /tmp/root-image/etc/iu.ap - add pcisimc here otherwise the text output wont line up on Blaze console.<br> pcisimc 0 0 ldterm ttcompat</pre>
<ol start="4">
<li>
<p>Blaze specific files</p>
</li>
</ol>
<pre> /tmp/root-image/etc/hosts &#8211; you need a unique name and IP address within the subnet where you are going to run Blaze<br> for example,<br> #<br> # Blaze internet hosts file<br> #<br> 127.0.0.1 localhost loghost<br> 129.144.10.170 moan<br><br> /tmp/root-image/etc/path_to_inst &#8211; the path_to_inst for blas&eacute; only need one line as following,<br> #path_to_inst_bootstrap_1<br><br>If you have database disks under SVM in your simulation setup then you need to refer to the following<br>section to modify path_to_inst file:<br><br> /tmp/root-image/etc/mnttab &#8211; make it a empty file for Blaze.</pre>
<p><br>
<br>
</p>
<p>==========================================================================================================================================</p>
<h1><a name="12.Tracing|outline"></a>Tracing</h1>
<p>This is one of the primary functions of SAM i.e. to be able to
generate traces which contain both user and kernel instructions.
Traces are used by cycle accurate simulators to make performance
projections. This sections explains how to gather a trace, generate
and gather statistics, running various scripts as part of trace
validation and reporting of trace.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Trace Collection and Validation|outline"></a>Trace
Collection and Validation</h2>
<p>The RST tracer module rstracer.so is a shared object located in
the SAM directory. You must dynamically link/load it with SAM via.
RSTracer registers call back functions such as, instructions, Traps,
TLB update and DMAs. RST writes the record to an output trace file.</p>
<p>After you restore from pretracing checkpoint do the following at
SAM prompt:</p>
<p><i><b>sam: stop</b></i></p>
<p><i><b>sam: mod load analyzer ./rstracer.so</b></i></p>
<p><i><b>sam: run</b></i></p>
<p>Always make sure you stop before loading the RSTracer. Ofcourse
SAM is in stop state after you restore from pretracing checkpoint but
make it a habit to double-check everything.</p>
<p>Once we restore from pretracing checkpoint we are ready to start
tracing. It is not sufficient to just load the rstracer. We then have
to specify certain parameters to the rstracer. You can type &#8220;<b><i>help
rstrace</i></b>&#8221; at SAM prompt (once rstracer is loaded) to get
help on parameters. </p>
<p>You can collect either a single trace or a series of K sample
traces each NN instructions long, with each trace separated by PP
instructions. </p>
<p>The trace will be a compressed RST trace. We apply RST compression
and then gzip compression, which typically gives a 30X compression.
If you insist on consuming incredible amounts of disk space, you can
collect an uncompressed trace. Additionally, it is faster to collect
a compressed trace than an uncompressed trace. In SAM v5 by default a
value trace is collected.</p>
<p>By default, a trace name &#8220;bigeasy&#8221; will be the name of
your file. For example, bigeasy-2002-04-15_16-
16-12-10707-1:0.1.rz2.gz. Clearly, the date and time and the PID of
sam is put into the filename. Additionally, there is a tracing
request number, the current sample and the total number of samples to
the trace name in a format. Each time you specify a (set of samples)
trace, the trace request number is bumped.</p>
<p><i><b>rstrace -o &lt;file&gt; -n &lt;insts-per-cpu&gt; -d
&lt;initial-delay-per-cpu&gt; -x &lt;ntraces&gt; -p
&lt;period-per-cpu&gt;</b></i></p>
<p>All durations are in terms of per-cpu instruction counts.</p>
<p>For further details on tracing and validation of traces refer to:
<a
href="http://traces.sfbay/twiki/pub/Traces/Documentation/Tracing_doc041406.pdf">http://traces.sfbay/twiki/pub/Traces/Documentation/Tracing_doc041406.pdf</a></p>
<p>The pdf document also contains a sample validation report. You can
access a number of validation reports from <a
href="http://traces.sfbay/">http://traces.sfbay</a>.<br>
<br>
</p>
<p>==========================================================================================================================================</p>
<h1><a name="14.HOWTOs|outline"></a>HOWTOs</h1>
<p>This section has a few howto items and these are not needed for
the normal running and tracing in SAM simulation environment. These
are more like conveniences.</p>
<p>---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</p>
<h2><a name="Open extra Console Windows|outline"></a>Open extra
Console Windows</h2>
<p>In the default console window that opens up using the -w option do
the following:</p>
<p><i><b>#export TERM=vt100</b></i></p>
<p><i><b>#stty rows 24</b></i></p>
<p><i><b>#stty cols 80</b></i></p>
<p><i><b>#/ll/root/import/archperf/local/bin/screen</b></i></p>
<p>Once it starts, you can use "<b><i>ctrl-a c</i></b>" to
create new screens, and "<b><i>ctrl-a n</i></b>" to move to
the next one.</p>
<p>==========================================================================================================================================</p>
<p><br>
<br>
</p>
<p style="margin-bottom: 0in;"><br>
</p>
<p><br>
<br>
</p>
</body>
</html>