source: trunk/softs/tsar_boot/src/exceptions.c @ 295

Last change on this file since 295 was 292, checked in by cfuguet, 12 years ago

Changing directory structure of the TSAR boot loader.
A README.txt file has been included to explain the new structure
and the MAKEFILE parameters.

Erasing the heap segment for the boot elf loader. All the work space
is allocated in the stack.

The stack size is defined in the include/defs.h.

Important modification in the reset.S file. The non-boot
processors (processor id != 0) wait in a low comsumption energy
mode to be wake up by processor 0 using an IPI. Each processor
has a private mailbox in the local XICU. The value written in
the mailbox will be used as address to jump by the processors.

The waking up of non-boot processors is not done in this boot loader
so it must be done in the application loaded.

The boot_loader_elf function loads into memory an executable .elf file
which must be placed in the BOOT_LOADER_LBA block of the disk. This
constant can be defined in the include/defs.h file.

File size: 503 bytes
Line 
1/**
2 * \file    : exceptions.c
3 * \date    : December 2012
4 * \author  : Manuel Bouyer
5 *
6 * This file defines a simple exeptions handler
7 */
8
9#include <boot_tty.h>
10
11void handle_except(int status, int cause, int epc)
12{
13        boot_puts("boot (default) exeption handler called: \r\n    status ");
14        boot_putx(status);
15        boot_puts("\r\n    cause  ");
16        boot_putx(cause);
17        boot_puts(" (exeption ");
18        boot_putx((cause >> 2) & 0x1f);
19        boot_puts(")\r\n    epc    ");
20        boot_putx(epc);
21        boot_puts("\r\n");
22        while (1);
23}
Note: See TracBrowser for help on using the repository browser.