/*
    Exception.c, 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.
*/

#include "Exception.h"
#include "Error.h"
#include "TMHal.h"
#include "tm-include.h"
#include "Support.h"
#include "TMScheduler.h"
#include "SupportSA1100.h"

void UND_exception()
{
  /* Here you may enter the handler for the "undefined instructions" exception. */
  printRegisters();
  PANIC("No UND_exception handler defined yet!");
}

void APF_exception()
{
  /* Here you may enter the handler for the "prefetch abort (instruction fetch memory abort)". */
  /* This exception is also used for the instruction breakpoint! */
  printRegisters();
  ioConsolePutString("\nBreakpoint hit!!");

  while(1)
  {}
}

void ADA_exception()
{
  /* Here you may enter the handler for the "data abort (data access memory abort)". */
  printRegisters();
  PANIC("No ADA_exception handler defined yet!");
}

/* [SD] Experiment!! */
void dummyMBZ()
{
  printf("\nMBZ-Handler!!\n");
}
void dummyUART()
{
  printf("\nUART-Handler!!\n");
}
void dummySDRAM()
{
  printf("\nSDRAM-Handler!!\n");
}
void dummyRTC()
{
  printf("\nRTC-Handler!!\n");
}
void dummySRAM()
{
  printf("\nSRAM-Handler!!\n");
}
void dummyUENG()
{
  printf("\nUENG-Handler!!\n");
}
void dummyCINT()
{
  printf("\nCINT-Handler!!\n");
}
void dummyPCI()
{
  printf("\nPCI-Handler!!\n");
}









