[comp.os.minix] PC FS initial stack insufficient for separate I&D

brucee@runx.ips.oz (Bruce Evans) (12/17/88)

The initial stack allocated for FS in lib/head.s and kernel/const.h is
insufficient when FS is separate I&D. The initial stack pointer is
INIT_SP == 0x10. Of this, the bottom 4 bytes are reserved (would be code
for common I&D) and the next 6 bytes hold data_org[] for FS. So the stack
is really only 6 bytes. If an interrupt happens during the first two
instructions in FS (not unlikely), these bytes are all used for the
interrupt stack frame. But the "call save" pushes 2 more bytes and save()
pushes 4 more, wiping out data_org[].

There is no bug for common I&D since data_org[] is in the data segment
which doesn't overlap the initial stack.

See my debugger source for the changes (kernel/const.h.cdif and lib/head.s).
These allocate another 6 bytes for debugger interrupts. More could be
required for "impossible" non maskable interrupts.

Bruce Evans
Internet: brucee@runx.ips.oz.au    UUCP: uunet!runx.ips.oz.au!brucee