<div dir="ltr">Phil, that's really cool, thanks for it!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 18, 2024 at 8:34 AM Phil Budne <<a href="mailto:phil@ultimate.com">phil@ultimate.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ron minnich wrote:<br>
> But I'm wondering: is Ed's work in 1977 the first "kernel boots kernel" or<br>
> was there something before?<br>
<br>
There was!  The PDP-7 UNIX listings contain a program trysys.s<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/trysys.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/trysys.s</a><br>
that reboots the system by reading a.out into user memory (in the high<br>
4K of core), then copies it to low memory and jumping to the entry<br>
point.  The name suggests its original intended use was to test a new<br>
system (kernel).<br>
<br>
P.S.<br>
Normal bootable system images seem to have been stored in reserved<br>
tracks of the (fixed head) disk (that are inacessible via system calls):<br>
<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/maksys.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/maksys.s</a><br>
reads a.out and uses I/O instructions to write it out.<br>
<br>
P.P.S.<br>
Accordingly, I put together a "paper tape" for booting the system:<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/other/pbboot.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/other/pbboot.s</a><br>
<br>
P.P.P.S.<br>
The system (kernel) is 3K words, the last 1K of low memory<br>
used for the character table for the vector graphics controller.<br>
<br>
The definitions for the table are compiled by<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/cas.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/cas.s</a><br>
from definition file<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/cas.in" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/sys/cas.in</a><br>
(after, ISTR, figuring out the ordering of the listing pages!)<br>
<br>
I don't think we ever figured out how the initial character table<br>
is loaded into core.  One thing that was missing from the table<br>
was the dispatch array, which I recreated:<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/other/chrtbl.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/other/chrtbl.s</a><br>
<br>
The system (kernel) could be built for a "cold start", reloading the<br>
disk (prone to head crashes?) from paper tape? But I don't think<br>
anyone ever reconstructed the procedure for rebuilding a disk that way.<br>
<br>
The disk was two sided, and the running system only used one side:<br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/dsksav.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/dsksav.s</a><br>
<a href="https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/dskres.s" rel="noreferrer" target="_blank">https://github.com/DoctorWkt/pdp7-unix/blob/master/src/cmd/dskres.s</a><br>
appear to be programs to save and restore the filesystem from the<br>
"other" side of the disk.<br>
</blockquote></div>