Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!munnari!otc!metro!ipso!runx!brucee From: brucee@runx.ips.oz (Bruce Evans) Newsgroups: comp.os.minix Subject: PC FS initial stack insufficient for separate I&D Message-ID: <1877@runx.ips.oz> Date: 17 Dec 88 06:48:25 GMT Organization: RUNX Un*x Timeshare. Sydney, Australia. Lines: 18 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