Re: Breaking the 64MB barrier

david parsons (o.r.c@p.e.l.l.p.o.r.t.l.a.n.d.o.r.u.s)
18 Oct 1998 23:13:51 -0700


In article <linux.kernel.Pine.LNX.3.96.981018175236.1862Q-100000@ps.cus.umist.ac.uk>,
Riley Williams <rhw@bigfoot.com> wrote:
>Hi Alan.
>
>On Sun, 18 Oct 1998, Alan Cox wrote:
>
> >> We could check memory by writing some bytes ( hexadecimal values
> >> FF, AA, 55, 00 ) into each byte at addresses above 64MB RAM and
> >> then reading and comparing. If these addresses contain memory,
> >> these bytes will be stored and the comparison will be successfull.
>
> >> If we enter adresses without memory the values written will be
> >> lost and we will read some garbage, so the comparison will fail.
> >> Thus we can detect the right memory_end.
>
> >> Maybe there are some difficulties as the processor uses cache so
> >> we have to prevent that we read back only from processor-cache.
>
> > That is an understatement. You have to deal with mirroring of
> > devices, two devices decoding at the same invalid address, bus
> > capacitance making you read back what you wrote, devices that
> > partially mirror or misdecode in high space and more.
>
> > The x86 bios fixed the problem a long time ago. 2.0.x in the 36
> > series has caught up.
>
>There's still the problem of what to do with machines where the BIOS
>doesnae support the extended call in question...

That's a good point to (a: if not very many machines fail) fall
back to the lilo hack, or (b: if many machines fail) either redo
the detection code or kick the worthless author of the existing
code[1] into redoing it so it works properly.

So far the only class of PC's that I've seen that systematically
don't support 0xe801 are Compaq EISA bus machines; It's possible
that other EISA machines don't work either, but they are pretty thin
on the ground these days.

A brute-force memory scan might be useful, but it could get unhappily
bitten by memory holes, and until Linux supports sparse memory, it's
somewhat pointless to look above a memory hole.

____
david parsons \bi/ Who would be pleased to find that 2.1 is proving this
\/ wrong.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/