washington washington university in st louis june 17, 2002 msr tutorial msr tutorial: msr_config and...

16
Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington University, Applied Research Lab [email protected] http://www.arl.wustl.edu/arl/

Upload: anthony-york

Post on 02-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

June 17, 2002 MSR Tutorial

MSR Tutorial:MSR_Config

and theAAL5_Download Utilitiy

John DeHartWashington University, Applied Research Lab

[email protected]://www.arl.wustl.edu/arl/

Page 2: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

June 17, 2002 MSR Tutorial

MSR_Config

The MSR Configuration module and the beginnings of the MSR Control

Processor Software

Page 3: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

3WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

MSR Control Processor (CP)• PC connected to MSR Port 0• CP Software runs on Linux or NetBSD

– Will use threads in the future

– Eventually it will probably be only Linux

• newGBNSC and Jammer– newGBNSC: WUGS Switch Controller

• Replaces old GBNSC

– Jammer: WUGS scripting language interpreter

– Not part of the CP

– Can still be used for monitoring

– CP takes care of its own WUGS connections• it formulates and sends WUGS control cells directly

Page 4: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

4WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Current CP: MSR_Config• Phases of Operation

– Switch Reset (resets WUGS, SPCs and FPXs)– Switch Configuration

• Build connections needed by MSR

– Discovery• Determine what is on each port (SPC, FPX, Glink, …)

– SPC• Configure connections for Download• Download

– system(3) and shell script to invoke SPC utility: AAL5_Download– AAL5_Download to be discussed separately

• MSR Kernel Initialization– uses sendcmd API library

– Run• Currently: exit()• Eventually: thread invocation

Page 5: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

5WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Source and Executables• source location: wu_arl/msr/cp/configuration• executable location:

– wu_arl/msr/bin/$OSTYPE/MSR_Config• Actually, probably doesn’t work from here right now because it is

dependent on a few scripts which are kept in the source directory.• For now, run it from the source directory:

cd wu_arl/msr/cp/configuration Linux/MSR_Config –f config.MSR

• This is how we will do it in the exercises

• Scripts used (located in wu_arl/msr/cp/configuration)– msrDownload.sh (invokes AAL5_download…)– INITIALIZATION: uses libcmd APIC:

• wu_arl/msr/utils/command/cmdAPI.[ch]

• When you get idle time during exercises, look through the various scripts and source code.

Page 6: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

6WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

MSR_Config Usage• Typical usage:

cd wu_arl/msr/cp/configuration ./$OSTYPE/MSR_Config –f <configuration file>

• other options–drr: turn on DRR

–dq: turn on Distributed Queueing

-fipl: Turn on FIPL

-d: turn on debug info

-p: turn on WUGS read port test

Page 7: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

7WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

AAL5_Download• Replaces old download_APIC utility• Can “shotgun” download to <= 8 SPCs at once

– Puts exactly same kernel on all 8– This works fine for MSR where we want same kernel– May not be good for all uses– “Shotgun” number controlled from command line

• Can download kernel and file system separately– no need to load file system into kernel before download– still need to load symbol version of kernel into file

system before downloading

• Takes about 1 minute for the whole download and boot process.

Page 8: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

8WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

AAL5_Download• Implemented and runs in Stages:

– Stage1 uses APIC Control cells to:• reset the SPC(s)

• download Stage2 to run on the SPC(s)

– Stage2 (boot.out) runs on the SPC• runs SPC boot code to configure CPU and Northbridge

• configures APIC on SPC to use AAL5 descriptors

• sends pings back to CP, waiting for Stage3

• receives AAL5 frames from Stage3 and sends ACK/NACK

– Stage3 runs on PC• syncs with Stage2

• downloads the kernel or FS via 36KB AAL5 frames

• retransmits if any errors

Page 9: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

9WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Simple View

VCI=21

PC SPC

VCI=25

VCI=0x321

VCI=21

VCI=23VCI=24

Stage1

Stage1 APIC

Stage3 Stage2

Page 10: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

10WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Sequential ViewPC

Stage1

Stage3

SPC

APIC

Stage2

0x0Boot andStage2

0x0100000

Kernel andFilesystem

0x0FFE00

Boot ROM0xFFFFFFF0

0 0 0 0 0 0 0 00 0 0 0 0 0 0 1

SPC Memory

Controlcells

AAL5Frames

RESET

Resetcell

Page 11: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

11WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Source and Executables• source location:

wu_arl/utilities/SPC/AAL5Download

• binary location:– wu_arl/utilities/bin/$OSTYPE/Stage1

– wu_arl/utilities/bin/$OSTYPE/Stage3

– wu_arl/utilities/bin/$OSTYPE/AAL5_download.sh

– wu_arl/utilities/bin/$OSTYPE/boot.out

– wu_arl/utilities/bin/$OSTYPE/FindNM

Page 12: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

12WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Usage• Individual command line commands

– ./Stage1 –shotgun 8 –svci 21 –rvci 21 –dvci 23 –uvci 24 –cvci 25

– ./Stage3 –shotgun 8 –native netbsd.MSR –both 24

– ./Stage3 –shotgun 8 –bss SPC24MB.fs –address 0x0196434 –both 24 -go

• AAL5download.sh script– ./AAL5download 8 netbsd.MSR SCP24MB.fs 21 21 23 24 25

• Use from MSR Configuration Module– system(msrDownload.sh);

Page 13: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

13WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Special Usage Note on Linux• AAL5download.sh script:

– needs to be able to determine the start location for the File System

– NetBSD uses nm(1)– Linux nm(1) won’t work on a NetBSD binary– We have written a version of nm specifically

for AAL5_download.sh: FindNM– FindNM is used automatically when

AAL5_download.sh is run on Linux

Page 14: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

14WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

AAL5_download.sh Usage• > ./AAL5_download.sh

• Usage: ./AAL5_download.sh <netbsd_file> <filesystem_file> <start_vci> [<second_vci>] [<third_vci>][<fourth_vci>] [<fifth_vci>]

Page 15: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

15WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Stage1 Usage• > ./Stage1• ./Stage1: [vpi/vci data] [load info]• ./Stage1: [-svpi #] (VPI for local sending of AAL5 control cells (0))• ./Stage1: [-svci #] (VCI for local sending of AAL5 control cells)• ./Stage1: [-rvpi #] (VPI for local reading of AAL5 control cells (0))• ./Stage1: [-rvci #] (VCI for local reading of AAL5 control cells)• ./Stage1: [-cvpi #] (VPI for remote CC writes of AAL5 control cells (0))• ./Stage1: [-cvci #] (VCI for remote CC writes of AAL5 control cells)• ./Stage1: [-dvpi #] (VPI for local write of AAL5 data frames (0))• ./Stage1: [-dvci #] (VCI for local write of AAL5 data frames)• ./Stage1: [-uvpi #] (VPI for local read of AAL5 data frames (0))• ./Stage1: [-uvci #] (VCI for local read of AAL5 data frames)• ./Stage1: [-resp #] (Response port of AAL5 control cells)• ./Stage1: [-start #] (Initial VCI sequence (41, 42, 43, 44))• ./Stage1: [-watch 0x#] (Monitor location for changes)• ./Stage1: [-apic #] (Linux: Apic Id (0 <= X <= 3))• ./Stage1: [-abit #] (Alternating bit setting)• ./Stage1: [-file <path>] (Name of boot loader (boot.out))• ./Stage1: [-swap] (use htonl() on output)• ./Stage1: [-shotgun #] (multicast loading 8X)• ./Stage1: [-msr #] (VCI for MSR ONLY AAL5 data frames)• ./Stage1: [-address #] (Physical data write address (0))• ./Stage1: [-noreset] (do not write reset register)

Page 16: Washington WASHINGTON UNIVERSITY IN ST LOUIS June 17, 2002 MSR Tutorial MSR Tutorial: MSR_Config and the AAL5_Download Utilitiy John DeHart Washington

16WashingtonWASHINGTON UNIVERSITY IN ST LOUIS

John DeHart June 17, 2002 MSR Tutorial

Stage3 Usage• > ./Stage3 -help

• [-switches] (-help) args

• -bss <file> Load .bss format file

• -native <file> Load native uncompressed file

• -strip Remove Symbols from kernel

• -debug print lots of stuff

• -verbose Dump Elf headers

• -elf Elf format execution

• -rvpi <VPI> Load VPI number

• -rvci <VCI> Load VCI number

• -svpi <VPI> Load VCI number

• -svci <VCI> Load VCI number

• -both <VCI> Set both VCI numbers

• -address <PhysAddr> Load file at <addr>

• -start <PhysAddr> Start file at <addr>

• -go Start kernel

• -shotgun <count> Multicast loading 8X