Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (8) — UMIPS/BSD System Programmer's Package 2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

\" -----------------------------------------------------
\" | Copyright MIPS Computer Systems, Inc.  All Rights |
\" | Reserved.                                         |
\" -----------------------------------------------------
.TH TPD 5
.ds ]W MIPS Computer Systems
.SH NAME
tpd \- format of MIPS boot tape directories
.SH SYNOPSIS
.B #include <saio/tpd.h>
.SH DESCRIPTION
.PP
Boot tapes that can be read by the MIPS prom monitor contain a directory
that allows the commands and records on the tape to
load by name rather than by physical record number.
Boot tape are produced by the command
.IR mkboottape (8).
.PP
A boot tape consists of a number of physical tape files,
where each file may optionally contain a
.I tpd
directory describing the contents of that physical file.
The prom monitor provides a syntax for referencing a named record on
a boot tape (see the MIPS PROM MONITOR documentation).
.PP
All binary values in the tpd directory are 2's complement, big-endian
regardless of target machine.
The tpd checksum is calculated by first zeroing the
td_cksum field, then 2's complement summing all
32 bit words in the struct tp_dir and then
assigning the 2's complement of the cksum to
td_cksum.  Thus the checksum is verified by
resumming the header and verifing the sum to be
zero.
Each tape record is TP_BLKSIZE bytes long,
trailing bytes in a tape block (after the end
of the directory or an end of file) are
unspecified (although they should be zero).
All files start on a tape block boundry, the
start of a particular file may be found by
skipping backward to the beginning of the file
containing the tape directory and then skipping
forward tp_lbn records.
.PP
The format of the
.I tpd
directory is:
.sp 1
.nf
#define TP_NAMESIZE     16
#define TP_NENTRIES     20
#define TP_BLKSIZE      512
#define TP_MAGIC        0xaced1234

#ifdef LANGUAGE_C
/*
 * tape directory entry
 */
struct tp_entry {
        char            te_name[TP_NAMESIZE]; /* file name */
        unsigned        te_lbn;         /* tp record num */
                                        /* 0 is tp_dir */
        unsigned        te_nbytes;      /* file byte count */
};

/*
 * boot tape directory block
 * WARNING: must not be larger than 512 bytes!
 */
struct tp_dir {
        unsigned        td_magic;
        unsigned        td_cksum;       /* csum of tp_dir */
        unsigned        td_spare1;
        unsigned        td_spare2;
        unsigned        td_spare3;
        unsigned        td_spare4;
        unsigned        td_spare5;
        unsigned        td_spare6;
        struct tp_entry td_entry[TP_NENTRIES];  /* directory */
};

union tp_header {
        char    th_block[TP_BLKSIZE];
        struct  tp_dir th_td;
};
#endif LANGUAGE_C
.fi
.LP
te_name is a null-terminated string.
The
.I td_magic
field contains TP_MAGIC to help verify the presence of a header.
.PP
.SH RESTRICTIONS
.SH "SEE ALSO"
mkboottape(8)
.br
MIPS System Programmers Guide

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026