Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ edtp(1M) — Motorola System V 88k Release 4 Version 4.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

make(1)

boot(1M)

edt_data(4)

edtp(1M)  —  ADMINISTRATOR COMMANDS

NAME

edtp − Equipped Device Table Probe procedures

DESCRIPTION

The construction of the Equipped Device Table (EDT) is achieved by standalone programs probing for hardware devices on the system bus.  These programs are referred to as the EDT Probe (EDTP) software. 

The bootstrap procedure consists of the following basic phases. 

On powerup, the boot process is generally begun automatically: a small boot program is loaded and executed, and the process moves into the second phase. 

Then, it will locate any EDTP programs on the Boot File System (/stand).  If there are any file names commencing with the letters EDTP. the boot program will load the file and then pass control to the loaded program. 

The program will then attempt to probe for the particular board it was designed to find.  If the probe is successful, the program adds the device to the EDT constructed by the boot program.  The program adds the EDT data corresponding to the device found in /stand/edt_data.  The EDTP program then passes control back to the boot program. 

When the boot program has run all EDTP programs, it then checks to see whether all boards have corresponding drivers and also if all drivers have corresponding boards.  If not, then a reconfiguration flag is passed to the kernel and /stand/mUNIX is loaded instead.  Otherwise, /stand/unix is loaded. 

The probe function will access the address specified by addr and return whether the access caused an exception.  size can be one of CHARSZ, SHORTSZ, INTSZ or LONGSZ (sizeof(char), sizeof(short), sizeof(int) and sizeof(long) respectively).  The rwflag can be set to R_ONLY, W_ONLY, WR_RD and RD_WR for read only, write only, write then read and read then write, where the contents of value_ptr contain the value to write or will contain the value read after success.  It is preferable to use probe to access the address than to do so directly because the probe function will clean up the pipeline and return cleanly after an exception. 

M88000 family of processors only:

The function will return 0 for a successful access or return the exception number that occurred when accessing addr.  Note that on System V/88 only bus errors and interrupts are valid exceptions. 

M68000 family of processors only:

The function will return 0 for a successful access or −1 for a bus error that occurred when accessing addr.  Note that on System V/68 only bus errors are valid exceptions. 

M68000 or M88000 family of processors

Standard support functions. 

Some standard library functions will also be supplied.  The list includes printf(), strcpy(), strncpy(), strcmp() and strncmp(). 

EXAMPLE

/∗
 ∗ Example EDT probe program, that tries to probe for all MVME328
 ∗ device entries in the EDT data.
 ∗/
 #include <sys/types.h>
#include <sys/iosystm.h>
#include <sys/edt.h>
#include <sys/edtp.h>
char∗name = "MVME328";
 /∗
 ∗edtmessage
 ∗/
 static void
edtmessage(struct edt ∗edtp, char ∗string)
{
printf("Probe for %s [%d] @ (0x%x) %s0, edtp -> dev_name,
edtp -> board, edtp -> io_addr, string);
 return;
}
 /∗
 ∗main
 ∗/
 main(struct edt ∗edt_data, struct edt ∗newedt, int debug)
{
register struct edt∗e;
register struct edt∗newe;
charres;
unsigned longval;
 /∗ Find first free slot at end of new edt table ∗/
 for (newe = newedt; newe -> dev_name[0] != ’\0’; newe++)
;
 /∗
∗ Search parsed copy of /stand/edt_data and probe for
∗ devices we are interested in. If the device is there
∗ add it to the table.
∗/
 for (e = edt_data; e -> dev_name[0] != ’\0’; e++)
{
if (strncmp(e -> dev_name, name, E_NAMLEN) != 0)
{
continue;
}
 if (e -> flags & E_PAD)
{
if (debug & EDTP_SKIPPED)
{
edtmessage(e, "skipped");
}
 continue;
}
 if (probe(e -> io_addr, CHARSZ, R_ONLY, &val) == 0)
{
if ((newe - newedt) > MAXEDT)
{
edtmessage(e, "successful but no EDT space");
 continue;
}
 if (debug & EDTP_FOUND)
{
edtmessage(e, "successful");
}
 ∗newe++ = ∗e;
}
else
{
if (debug & EDTP_NOTFOUND)
{
edtmessage(e, "unsuccessful");
}
}
}
 return;
}

NOTES

The probe routine must be used to access devices that may or may not be in the system address space.  If the probe function is not used unpredictable behavior can occur.  Currently boards that generate interrupts upon probing are not catered for. 

A skeleton Makefile for building probe routines, /usr/lib/probe/splprobe.mk is provided to simplify the process.  After the source for a probe routine is built following the above example, edit a copy of the Makefile and add the name of the probe routine to the line starting with the word PROBE.  The make(1) utility can then be used to have the probe built. 

FILES

/usr/lib/probe/splprobe.mk

SEE ALSO

make(1), boot(1M), edt_data(4). 

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