tc_coherence.h 1.23 KB
/*
 * Copyright (C) 1996-1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * 
 * This file is part of the SimOS distribution. 
 * See LICENSE file for terms of the license. 
 *
 */

/***
   NAME
     icache_coherence
   PURPOSE
     This maintains a bitmap so we can detect when chunks (pages or
	 lines are obvious candidates) that have
	 code executed off of them are written to.  Eventually we may have
	 cacheflush system calls routed here.
	 When a write is detected, all translation state is flushed.
   NOTES

***/
#ifndef TC_COHERENCE_H
#define TC_COHERENCE_H

#if 0

/* #define CODE 4*/
/*#define DATA 7*/
typedef enum { ICHECK_FULL = 19,
               ICHECK_MOST = 17,
               ICHECK_SOME = 13,
               ICHECK_NONE = 11 } Icheck_t;
extern Icheck_t ICheckLevel;




/* One bit for each line of physical memory */
/* Both MP and MP_IN_UP lay out consecutive cpus consecutively */

#endif

extern void TCcoherence_init(MA startAddr);
extern void TCcoherence_flush(void);
extern void TCcoherence_mark_code( MA  start, MA finish );
/* 0 - return normally, 1 - return via set_pc... */


extern int TCcoherence_check( MA start, MA finish );

extern int TCcoherence_is_code(MA pAddr );

#endif /* TC_COHERENCE */