Ver código fonte

Added missing procedures

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6646 8c9fc860-2736-0410-a75d-ab315db34111
felixf 9 anos atrás
pai
commit
17b4ea12c6
1 arquivos alterados com 19 adições e 0 exclusões
  1. 19 0
      source/Generic.I386.Machine.Mod

+ 19 - 0
source/Generic.I386.Machine.Mod

@@ -441,6 +441,25 @@ CODE {SYSTEM.i386}
 	MOV AL, [EBX+EAX]
 END ID;
 
+(**
+	Disable data cache for the memory range [adr, adr + len). Repeated cache disabling is recorded. A maximum of 127 successive disabling is supported.
+	Cache disabling is allowed for heap and stack memory ranges only.
+*)
+PROCEDURE DisableDCacheRange * (adr: ADDRESS; len: LONGINT);
+END DisableDCacheRange;
+
+(**
+	Enable data cache for the memory range [adr, adr + len).
+	The memory range must have been previously disabled.
+	It is the responsibility of client software to re-enable cache for the regions that it disabled.
+*)
+PROCEDURE EnableDCacheRange * (adr: ADDRESS; len: LONGINT);
+END EnableDCacheRange;
+
+(* InvalidateICache - invalidates the ICache. Works only in a priviledged mode. *)
+PROCEDURE InvalidateICache*;
+END InvalidateICache;
+
 (** -- Miscellaneous -- *)
 
 (** This procedure should be called in all spin loops as a hint to the processor (e.g. Pentium 4). *)