[comp.os.minix] DMA overrun bug in wini.c

brucee@runx.ips.oz (Bruce Evans) (04/08/88)

Newsgroups: comp.os.minix
Subject: DMA overrun bug in wini.c


The PRIVATE disk buffer 'buf' in xtwini.c and atwini.c is put wherever the
linker feels like it and may cross a 64K boundary.  The kernel becomes exposed
to this as soon as  0x600 + kernel size > 64K.  My kernel has extra screen
buffers in it which take it 9K over the limit.

For a quick fix, I put 'buf' in the initialised data segment instead of bss.
A slightly better solution is to declare 'buf' in mpx88.s so it is right at
the start of the kernel data.  A sure solution is to declare a buffer twice
the necessary size and use a good half of it.  But the buffer is used only
for initialization and already wastes 1K.

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