Subject: Re: tftp boot
To: Ted Lemon <mellon@hoffman.vix.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 07/05/1997 18:11:55
>Actually, the FCO was technically so that the 5000/200 could boot NT -
>I happen to know because I had to hand-carry a pair of the FCO'd
>systems up to Redmond.   But all that still happened before the
>5000/25.


Oh.  I'm still pretty certain the FCO didn't get installed to the
Stanford machines until after other groups had installed 5000/25s.
But I'm sure you know more about the details of what happened when at
WSE than I do :).

Regardless, the PROMS in at least some KMINs and MAXINEs can tftp-load
the text and data, but die after loading text+data, that but before
starting the kernel.  I'm guessing the PROM is trying to zero the
kernel BSS, but can't find it.  Since the NetBSD kernel zeros its own
BSS anyway, the kernel boots if you just type "go 0x8003000" after the
error reported Greg McGarry.  At least it does on my 5000/150, I
haven't heard from Greg McGarry yet.


Ted, any idea what's going on inside the PROM?

I'm guessing it's something to do with the following header comment,
from Ultrix's <sys/exec.h>, which I'm quoting under fair use:

/*
 *                                                                      *
 *                      Copyright (c) 1986 by                           *
 *              Digital Equipment Corporation, Maynard, MA              *
 *                      All rights reserved.                            *
 *                                                                      *
 *                                                                      *
 *   This software is furnished under a license and may be used and     *
 *   copied  only  in accordance with the terms of such license and     *
 *   with the  inclusion  of  the  above  copyright  notice.   This     *
 *   software  or  any  other copies thereof may not be provided or     *
 *   otherwise made available to any other person.  No title to and     *
 *   ownership of the software is hereby transferred.                   *

[...]


/*
 * Coff files produced by the mips loader are guaranteed to have the raw data
 * for the sections follow the headers in this order: .text, .rdata, .data and
 * .sdata the sum of the sizes of last three is the value in dsize in the
 * optional header.  This is all done for the benefit of the programs that
 * have to load these objects so only the file header and optional header
 * have to be inspected.  The macro N_TXTOFF() takes pointers to file header
 * and optional header and returns the file offset to the start of the raw
 * data for the .text section.  The raw data for the three data sections
 * follows the start of the .text section by the value of tsize in the optional
 * header.
 */

That can't be quite correct, because it doesn't allow for .sbss.

I've tried refrobbing elf2ecoff to emit six sections, in order:
	.text .rdata .data .sdata .sbss .bss

using text, data, and bss from the ELF psects for text and data, and
zero-sized .rdata, .sdata and .sbss segments.  in the former 5000/120
I have, that makes no difference whatsoever.