1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-02-01 22:42:59 +00:00
Files
DoctorWkt.pdp7-unix/build/Notes.md
2016-03-13 21:14:16 +10:00

69 lines
2.6 KiB
Markdown

# Bringing up the Kernel
Add notes on what you've tried w.r.t bringing up the kernel
## wkt Sun Mar 13 12:26:06 AEST 2016
We can make at the top level to assemble the kernel, some utilities
and build the filesystem with the utilities, dd and system directories.
In the build directory, make run starts Simh running, loads the
kernel into memory and sets the PC to 0100.
I'm sure that Phil has got further than this, but by setting a
breakpoint at 01000 (set br 1000) and doiing a c(ontinue), we see:
```
simh> show cpu history
...
003351 1 000072 000000 JMP 3361
003361 1 000072 000000 LAC 4257
003362 1 000454 000000 JMP I 3272
004544 1 000454 000000 JMP 10000
```
which is the end of coldboot in s8.s. The first few instructions
are definitely from init.s. By breaking at 001115 (fork from a.lst),
we can see two forks, which correspond to the two in init.s.
We do get to the 010052: 020005 sys write; m1; m1s
code in init to write "\nlogin:" on the terminal, but this
isn't being displayed.
We make it to 01363, the first instruction in wttyo, so the
write syscall is hitting the right device. We do get into
dsprestart at 03516, and we do make it to the dpcf instruction
at 03527, but we don't get past here. We don't make it down
to the sma instruction at 03531 or the ksf instruction at
03537,
## wkt Sun Mar 13 14:41:30 AEST 2016
I've commented out some of the Graphics-2 code around dsprestart and
pibreak in s7.s. With this code removed, I now see the login: prompt
being written by the init child. It's not responding to keyboard
characters, but I haven't traced the code yet.
## wkt Sun Mar 13 15:06:53 AEST 2016
Using the modified kernel and the normal init.s, I've set breakpoints
at 0352, the dac after krb in dsprestart, and at 10253 the lac char
straight after the sys read in init.s.
I'm seeing breaks at 0352 for the four characters "ken\r", but I'm not
seeing any breaks after the sys read in init.s. The read only reads one
word, so I was expecting to see it react after one or perhaps two characters
typed at the keyboard, or even the \r character.
## Sun Mar 13 21:11:26 AEST 2016
Phil made essentially the same change. He noted in an e-mail: entering
dmr<CTRL/J> at the login: prompt got me a password: prompt. Entering
dmr<CTRL/J> there gave me a question mark. Which may be either: I was wrong
in my guess about "password" file format, or where home directories should
be located...
So the next step is to dissect init.s in more detail. I've changed the as7
assembler so that we can #ifdef the code around dsprestart in s7.s but keep
the Graphics-2 code still in the file.