Mail Archives: djgpp/1997/07/09/03:44:43
From: | Johan Karlsson <k AT sm DOT luth DOT se>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Disabling cache?
|
Date: | Tue, 08 Jul 1997 12:21:02 +0200
|
Organization: | Luleå University of Technology
|
Lines: | 37
|
Message-ID: | <33C2148E.3F54BC7E@sm.luth.se>
|
NNTP-Posting-Host: | my21.sm.luth.se
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hello,
I need to be able to turn the cache off for a specific memory area.
The memory board I'm using is a bit special, when I write to a specific
address I will affect all other addresses on the board. Therefor when I
read from the board a value stored in cache will not be valid.
Is there any way of turning the caching of for a specific address area?
I have found a way using asm to invalidate the cache but this costs to
much (15 cycles)
__asm__("invd\n")
I need an efficent way to do this.
I don't want to turn the cache off completely, since this will slow
other parts of the program to down much.
Some background info.
I'm using a PC 486 with an ISA Bus, msdos 6.20, dpmi version 0.9
So far I have with help from this group written a program that reads the
board. Using:
allocate an LDT descriptor (Int 31h/AX=0);
map selector to physical address (Int 31h/AX=0800h);
lock linear address (Int 31h/AX=0600h);
set segment base address (Int 31h/AX=7);
set segment limit (Int 31h/AX=8).
and farptr
I'm thankful for all help I can get.
MVH
Johan Karlsson
mailto:k AT sm DOT luth DOT se
Department of Computer Science and Electrical Engineering
Luleå University of Technology, SWEDEN
- Raw text -