Coop.MemCache.Mod 973 B

12345678910111213141516171819202122232425262728293031
  1. (* Aos, Copyright 2001, Pieter Muller, ETH Zurich *)
  2. MODULE MemCache; (** AUTHOR "pjm"; PURPOSE "Memory cache control"; *)
  3. IMPORT SYSTEM, Machine;
  4. CONST
  5. (** cache properties *)
  6. UC* = 0; WC* = 1; WT* = 4; WP* = 5; WB* = 6;
  7. (** Set the cache properties of the specified physical memory area on the current processor. {physAdr, size MOD PS = 0} Must be called from supervisor mode. *)
  8. PROCEDURE LocalSetCacheProperties*(physAdr: ADDRESS; size, type: LONGINT; VAR res: WORD);
  9. VAR i, n, f: LONGINT; mask, base: SET; j, k: ADDRESS;
  10. BEGIN
  11. res := 1507 (* implementation restriction - fixed entries not supported *)
  12. END LocalSetCacheProperties;
  13. (** Broadcast a LocalSetCacheProperties operation to all processors. *)
  14. PROCEDURE GlobalSetCacheProperties*(physAdr: ADDRESS; size, type: LONGINT; VAR res: WORD);
  15. BEGIN
  16. res := 1507 (* implementation restriction - fixed entries not supported *)
  17. END GlobalSetCacheProperties;
  18. END MemCache.
  19. (*
  20. to do:
  21. o change error codes
  22. *)