Start of public OpenTitan development history

Code contributors:
Alex Bradbury <asb@lowrisc.org>
Cindy Chen <chencindy@google.com>
Eunchan Kim <eunchan@google.com>
Gaurang Chitroda <gaurangg@google.com>
Mark Hayter <mark.hayter@gmail.com>
Michael Schaffner <msf@google.com>
Miguel Osorio <miguelosorio@google.com>
Nils Graf <nilsg@google.com>
Philipp Wagner <phw@lowrisc.org>
Pirmin Vogel <vogelpi@lowrisc.org>
Ram Babu Penugonda <rampenugonda@google.com>
Scott Johnson <scottdj@google.com>
Shail Kushwah <kushwahs@google.com>
Srikrishna Iyer <sriyer@google.com>
Steve Nelson <Steve.Nelson@wdc.com>
Tao Liu <taliu@google.com>
Timothy Chen <timothytim@google.com>
Tobias Wölfel <tobias.woelfel@mailbox.org>
Weicai Yang <weicai@google.com>
diff --git a/sw/lib/handler.c b/sw/lib/handler.c
new file mode 100644
index 0000000..cefe4e5
--- /dev/null
+++ b/sw/lib/handler.c
@@ -0,0 +1,46 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#include "common.h"
+
+/**
+ * Default exception handler. Can be overidden.
+ */
+void handler_exception(void) __attribute__((aligned(4), interrupt, weak));
+
+/**
+ * SW IRQ handler. Can be overidden.
+ */
+void handler_irq_software(void) __attribute__((aligned(4), interrupt, weak));
+
+/**
+ * Timer IRQ handler. Can be overidden.
+ */
+void handler_irq_timer(void) __attribute__((aligned(4), interrupt, weak));
+
+/**
+ * external IRQ handler. Can be overidden.
+ */
+void handler_irq_external(void) __attribute__((aligned(4), interrupt, weak));
+
+// Below functions are default weak exception handlers meant to be overriden
+void handler_exception(void) {
+  while (1) {
+  }
+}
+
+void handler_irq_software(void) {
+  while (1) {
+  }
+}
+
+void handler_irq_timer(void) {
+  while (1) {
+  }
+}
+
+void handler_irq_external(void) {
+  while (1) {
+  }
+}