/**
 * \file    : exceptions.c
 * \date    : December 2012
 * \author  : Manuel Bouyer
 *
 * This file defines a simple exeptions handler
 */

#include <boot_tty.h>

void handle_except(int status, int cause, int epc)
{
	boot_puts("boot (default) exeption handler called: \r\n    status ");
	boot_putx(status);
	boot_puts("\r\n    cause  ");
	boot_putx(cause);
	boot_puts(" (exeption ");
	boot_putx((cause >> 2) & 0x1f);
	boot_puts(")\r\n    epc    ");
	boot_putx(epc);
	boot_puts("\r\n");
	while (1);
}
