Stage2: Add exception handlers

This commit is contained in:
TuxSH
2018-05-21 03:50:53 +02:00
parent c1687905a3
commit bf2c6dff25
5 changed files with 195 additions and 5 deletions

View File

@@ -5,6 +5,7 @@
#include <malloc.h>
#include "utils.h"
#include "panic.h"
#include "exception_handlers.h"
#include "loader.h"
#include "chainloader.h"
#include "stage2.h"
@@ -26,9 +27,11 @@ static void setup_env(void) {
generic_panic();
}
/* Set up exception handlers. */
setup_exception_handlers();
if(switchfs_mount_all() == -1) {
perror("Failed to mount at least one parition");
generic_panic();
fatal_error("Failed to mount at least one parition: %s\n", strerror(errno));
}
/* TODO: What other hardware init should we do here? */