Re: [PATCH] Athlon Prefetch workaround for 2.6.0test6

From: Jamie Lokier
Date: Mon Sep 29 2003 - 17:16:09 EST


Andi Kleen wrote:
> I guess they should be added to the AMD64 version too. It ignores
> all bases, but I'm not sure if the CPU catches the case where the linear
> address computation wraps.

The linear address is _allowed_ to wrap on x86, and there are real
DOS-era programs which take advantage of this. It is used to create
the illusion of access to high addresses, by making them wrap to low
ones which can be mapped.

Some DOS extenders did this so that 32-bit programs could access BIOS
and video memory in the same DS segment as normal code, despite having
a large segment base address so that null pointers would be trapped by
page protection.

Of course no linux programs do this :)
(Well, maybe some do under DOSEMU?)

So it seems quite likely that the AMD64 CPU simply allows wrapping in
the linear address calculation.

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