Subject: grfmmap bug?
To: None <>
From: maximum entropy <>
List: port-atari
Date: 12/16/1998 03:39:21
I don't understand how grfmmap() can possibly work for devices such as
the et4000 which have memory-mapped configuration registers.

        if (off >= 0 && off < gi->gd_regsize)
                return(((u_int)gi->gd_regaddr + off) >> PGSHIFT);

        if ((off >= 0) && (off < gi->gd_fbsize))
                return (((u_int)gi->gd_fbaddr + off) >> PGSHIFT);

Shouldn't there be something between these two blocks of code along
the lines of "off -= m68k_round_page(gi->gd_regsize);"?  Otherwise how
can the first page or so of frame buffer memory ever get mapped?

For the normal atari frame buffer this shouldn't be a problem because
gi->gd_regsize is always 0.

I don't have an et4000, so I can't test this, but it does look really
suspicious.  Am I just confused or is there something very wrong
with this code as it stands?


entropy -- it's not just a good idea, it's the second law.