Index: kernel/genarch/src/acpi/acpi.c
===================================================================
--- kernel/genarch/src/acpi/acpi.c	(revision cfdeedc55a55b7c1fc8de8b3faea55104ff3f641)
+++ kernel/genarch/src/acpi/acpi.c	(revision 889cdb1c2046af9d31d314fa691773fa2e4f9119)
@@ -43,4 +43,5 @@
 #include <mm/km.h>
 #include <log.h>
+#include <mem.h>
 
 #define RSDP_SIGNATURE      "RSD PTR "
@@ -170,12 +171,17 @@
 }
 
+static uint8_t *search_rsdp(uint8_t *base, size_t len)
+{
+	for (size_t i = 0; i < len; i += 16) {
+		if (memcmp(&base[i], RSDP_SIGNATURE, sizeof(RSDP_SIGNATURE)) == 0 &&
+		    rsdp_check(&base[i]))
+			return &base[i];
+	}
+
+	return NULL;
+}
+
 void acpi_init(void)
 {
-	uint8_t *addr[2] = { NULL, (uint8_t *) PA2KA(0xe0000) };
-	unsigned int i;
-	unsigned int j;
-	unsigned int length[2] = { 1024, 128 * 1024 };
-	uint64_t *sig = (uint64_t *) RSDP_SIGNATURE;
-
 	/*
 	 * Find Root System Description Pointer
@@ -184,18 +190,17 @@
 	 */
 
-	addr[0] = (uint8_t *) PA2KA(ebda);
-	for (i = (ebda ? 0 : 1); i < 2; i++) {
-		for (j = 0; j < length[i]; j += 16) {
-			if ((*((uint64_t *) &addr[i][j]) == *sig) &&
-			    (rsdp_check(&addr[i][j]))) {
-				acpi_rsdp = (struct acpi_rsdp *) &addr[i][j];
-				goto rsdp_found;
-			}
-		}
-	}
-
-	return;
-
-rsdp_found:
+	uint8_t *rsdp = NULL;
+
+	if (ebda)
+		rsdp = search_rsdp((uint8_t *) PA2KA(ebda), 1024);
+
+	if (!rsdp)
+		rsdp = search_rsdp((uint8_t *) PA2KA(0xe0000), 128 * 1024);
+
+	if (!rsdp)
+		return;
+
+	acpi_rsdp = (struct acpi_rsdp *) rsdp;
+
 	LOG("%p: ACPI Root System Description Pointer", acpi_rsdp);
 
Index: kernel/generic/src/lib/ubsan.c
===================================================================
--- kernel/generic/src/lib/ubsan.c	(revision cfdeedc55a55b7c1fc8de8b3faea55104ff3f641)
+++ kernel/generic/src/lib/ubsan.c	(revision 889cdb1c2046af9d31d314fa691773fa2e4f9119)
@@ -34,4 +34,11 @@
 };
 
+struct type_mismatch_data_v1 {
+	struct source_location loc;
+	struct type_descriptor *type;
+	unsigned char log_alignment;
+	unsigned char type_check_kind;
+};
+
 struct overflow_data {
 	struct source_location loc;
@@ -72,4 +79,8 @@
 	struct source_location loc;
 	struct source_location attr_loc;
+};
+
+struct pointer_overflow_data {
+	struct source_location loc;
 };
 
@@ -80,4 +91,5 @@
  */
 void __ubsan_handle_type_mismatch(struct type_mismatch_data *data, unsigned long ptr);
+void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data, unsigned long ptr);
 void __ubsan_handle_add_overflow(struct overflow_data *data, unsigned long lhs, unsigned long rhs);
 void __ubsan_handle_sub_overflow(struct overflow_data *data, unsigned long lhs, unsigned long rhs);
@@ -97,4 +109,8 @@
 #endif
 void __ubsan_handle_nonnull_return(struct nonnull_return_data *data);
+void __ubsan_handle_nonnull_return_v1(struct nonnull_return_data *data,
+    struct source_location *loc);
+void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data,
+    unsigned long base, unsigned long result);
 
 static void print_loc(const char *func, struct source_location *loc)
@@ -218,2 +234,23 @@
 	ubsan_panic();
 }
+
+void __ubsan_handle_nonnull_return_v1(struct nonnull_return_data *data,
+    struct source_location *loc)
+{
+	print_loc(__func__, &data->loc);
+	ubsan_panic();
+}
+
+void __ubsan_handle_pointer_overflow(struct pointer_overflow_data *data,
+    unsigned long base, unsigned long result)
+{
+	print_loc(__func__, &data->loc);
+	ubsan_panic();
+}
+
+void __ubsan_handle_type_mismatch_v1(struct type_mismatch_data_v1 *data,
+    unsigned long ptr)
+{
+	print_loc(__func__, &data->loc);
+	ubsan_panic();
+}
