tb.h 1.29 KB
/*
 * Copyright (C) 1998 by the Board of Trustees
 *    of Leland Stanford Junior University.
 * Copyright (C) 1998 Digital Equipment Corporation
 *
 * This file is part of the SimOS distribution.
 * See LICENSE file for terms of the license.
 *
 */



/*
 * tb.h
 */

#ifndef TB_H
#define TB_H

#include "checkpoint.h"


typedef struct TBEntry {
   int           index; 
   Reg           reg;
   unsigned int  valid;
   unsigned long tag;
   unsigned long pfn;
   unsigned int  xre;
   unsigned int  xwe;
   unsigned int  asma;
   unsigned int  ford;
   unsigned int  fow;
   unsigned int  asn;
   unsigned int  gh;
} TBEntry;

struct TBState;

typedef enum TBType {TB_NONE,TB_INSTR,TB_DATA} TBType;


extern TBEntry *TBLookup(struct TBState *, TBType , Reg pfn, 
			 Reg currentASN );

extern void TBInsert(struct TBState *, TBType, int index, 
		     Reg pte, Reg tag, Reg asn);

extern void TBRemove(struct TBState *, TBType, int index);

extern TBEntry *TBIndex(struct TBState *, TBType, int index);

extern struct TBState *TBInit();


extern struct QCTable *TBNewMode(struct TBState *, TBType type, int newMode);
extern void TBNewASN(struct TBState *, TBType type, int oldASN);

extern char *TBPrint(struct TBState *tb, TBType type );
extern void TBCheckpoint( CptDescriptor *cptd, int cpu, struct TBState *);

#endif