/*
    SupportSA1100.h, Copyright (c) by Silvio Dragone & David Reist,
    Swiss Federal Institute of Technology,
    Computer Engineering and Networks Laboratory.
 
    TOPSY -- A Teachable Operating System.
             Implementation of a tiny and simple
             micro kernel for teaching purposes.
 
    For further information, please visit http://www.tik.ee.ethz.ch/~topsy
 
    This software is provided under the terms of the GNU General Public Licence.
 
    A full copy of the GNU GPL is provided in the file COPYING found in the 
    development root of Topsy.
*/

#ifndef __SUPPORT_SA1100_H
#define __SUPPORT_SA1100_H

#include "Topsy.h"
#include "cpu.h"

#define REG_WRITE(adr, val) (*(volatile int *)(adr) = (val))

Register getPRID(void);
Register getBADVM(void);		// get virtual address wich cause fault
Register getFSTATE(void);		// get the associated fault status

void flush_tlb(void);

void setInstrBrkPt(unsigned int adr);
void unsetInstrBrkPt(void);

void cygmon_return(void);
void cygmon_reboot(void);
void cygmon_mmu(void);
void cygmon_char(unsigned int value);

int take_sp(void);

void printRegisters(void);

#endif
