Re: [PATCH] New: AMD K6 write allocate

Alexey Vyskubov (alexey@alv.stud.pu.ru)
Mon, 18 Jan 1999 23:58:23 +0300 (MSK)


Hello!

On 18-Jan-99 Chuck Lever wrote:
>
> i've installed your k6-patch on a 2.2.0-pre7-ac6 kernel, running on a
> 233Mhz AMD-K6 model 6 with 64M (Via VP3 chipset, Award 4.51PG BIOS).
>
> here's dmesg output:
>
> Memory: 62684k/65528k available (1384k kernel code, 412k reserved, 988k
> data, 60k init)
> CPU: AMD AMD-K6tm w/ multimedia extensions stepping 02
> AMD K6 processor, model 6 found.
> Checking write allocate state... Write allocate is enabled for 64
> MB of memory
> Trying to enable write alocate for 63 MB of memory
> Failed!!!
> Write allocate is enabled for 60 MB of memory
> Checking 386/387 coupling... OK, FPU using exception 16 error
> reporting.
> Checking 'hlt' instruction... OK.
>
> apparently the BIOS automatically enables write allocate. however, is
> it
> correct to reset then re-enable it if the BIOS has already set it up?

Well, looks like I know where is the problem. You have 64 MB of RAM, and
shadow RAM is enabled in BIOS setup. So Linux kernel sees just 65528k of
memory (which is < 64Mb). When my patch tris to determine memory size in
Mb, it gets 63. Because write allocate is enabled for 64 != 63 Mb memory,
it tries to re-enable write allocate. Write allocate can be enabled only in
4Mb chunks, so it can enable write allocate only for 60Mb of memory.

I can fix this, but I have two options:

(1) Do not re-enable write allocate if it's already enabled for memory
size >= memory, available for kernel (= now) - maybe with the warning

(2) Try to determine physical memory size and re-enable write allocate if
and only if it's not enabled for this memory size - maybe with warning
about shadow memory.

What to do?

P.S. Turning shadow memory off probably will fix the problem. (Write
allocate should not be re-enabled int his case. You'll see just first
message: "Write allocate is enabled for 64 MB of memory".) Could you try
this for me, please?

--
With best wishes,
Alexey Vyskubov.
This is a message. Or something silly like that.

- 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/