Index: kernel/arch/arm64/include/arch/barrier.h
===================================================================
--- kernel/arch/arm64/include/arch/barrier.h	(revision 128359ebc085c950da1f7e34c3928f12654b438f)
+++ kernel/arch/arm64/include/arch/barrier.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -37,44 +37,4 @@
 #define KERN_arm64_BARRIER_H_
 
-#include <stddef.h>
-
-#define COHERENCE_INVAL_MIN  4
-
-/** Ensure visibility of instruction updates for a multiprocessor.
- *
- * @param addr Address of the first instruction.
- * @param size Size of the instruction block (in bytes).
- */
-static inline void ensure_visibility(void *addr, size_t len)
-{
-	size_t i;
-
-	/*
-	 * Clean to Point of Unification to make the new instructions visible to
-	 * the instruction cache.
-	 */
-	for (i = 0; i < len; i += COHERENCE_INVAL_MIN)
-		asm volatile (
-		    "dc cvau, %[addr]\n"
-		    : : [addr] "r" ((char *) addr + i)
-		);
-
-	/* Ensure completion on all PEs. */
-	asm volatile ("dsb ish" ::: "memory");
-
-	/* Ensure instruction cache/branch predictor discards stale data. */
-	for (i = 0; i < len; i += COHERENCE_INVAL_MIN)
-		asm volatile (
-		    "ic ivau, %[addr]\n"
-		    : : [addr] "r" ((char *) addr + i)
-		);
-
-	/* Ensure completion on all PEs. */
-	asm volatile ("dsb ish" ::: "memory");
-
-	/* Synchronize context on this PE. */
-	asm volatile ("isb");
-}
-
 #endif
 
Index: kernel/arch/arm64/include/arch/istate_struct.h
===================================================================
--- kernel/arch/arm64/include/arch/istate_struct.h	(revision 128359ebc085c950da1f7e34c3928f12654b438f)
+++ kernel/arch/arm64/include/arch/istate_struct.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -65,5 +65,6 @@
 #define ISTATE_OFFSET_X29    0x108
 #define ISTATE_OFFSET_X30    0x110
-#define ISTATE_SIZE          0x118
+#define ISTATE_OFFSET_PAD0   0x118
+#define ISTATE_SIZE          0x120
 
 #ifndef __ASSEMBLER__
@@ -109,6 +110,15 @@
 	/* Link Register. */
 	uint64_t x30;
+
+	/*
+	 * ARM64 mandates that the stack pointer is always aligned to
+	 * a 16-byte boundary. To satisfy this condition, the size of
+	 * this data structure needs to be also a multiple of 16 bytes.
+	 * This is the reason for this padding.
+	 */
+	uint64_t pad0;
 } istate_t;
 
 #endif
+
 #endif
Index: kernel/arch/arm64/include/arch/mach/hikey960/hikey960.h
===================================================================
--- kernel/arch/arm64/include/arch/mach/hikey960/hikey960.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
+++ kernel/arch/arm64/include/arch/mach/hikey960/hikey960.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2021 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup kernel_arm64_hikey960
+ * @brief HiKey 960 platform.
+ * @ingroup kernel_arm64
+ * @{
+ */
+/** @file
+ * @brief HiKey 960 platform driver.
+ */
+
+#ifndef KERN_arm64_mach_hikey960_H_
+#define KERN_arm64_mach_hikey960_H_
+
+#include <arch/machine_func.h>
+
+extern struct arm_machine_ops hikey960_machine_ops;
+
+#endif
+
+/** @}
+ */
Index: kernel/arch/arm64/include/arch/mach/virt/virt.h
===================================================================
--- kernel/arch/arm64/include/arch/mach/virt/virt.h	(revision 128359ebc085c950da1f7e34c3928f12654b438f)
+++ kernel/arch/arm64/include/arch/mach/virt/virt.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -36,6 +36,6 @@
  */
 
-#ifndef KERN_arm64_virt_H_
-#define KERN_arm64_virt_H_
+#ifndef KERN_arm64_mach_virt_H_
+#define KERN_arm64_mach_virt_H_
 
 #include <arch/machine_func.h>
Index: kernel/arch/arm64/include/arch/mm/km.h
===================================================================
--- kernel/arch/arm64/include/arch/mm/km.h	(revision 128359ebc085c950da1f7e34c3928f12654b438f)
+++ kernel/arch/arm64/include/arch/mm/km.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -41,9 +41,9 @@
 #include <typedefs.h>
 
-#define KM_ARM64_IDENTITY_START  UINT64_C(0xffffffff80000000)
-#define KM_ARM64_IDENTITY_SIZE   UINT64_C(0x0000000080000000)
+#define KM_ARM64_IDENTITY_START  UINT64_C(0xffffffff00000000)
+#define KM_ARM64_IDENTITY_SIZE   UINT64_C(0x0000000100000000)
 
 #define KM_ARM64_NON_IDENTITY_START  UINT64_C(0xffff000000000000)
-#define KM_ARM64_NON_IDENTITY_SIZE   UINT64_C(0x0000ffff80000000)
+#define KM_ARM64_NON_IDENTITY_SIZE   UINT64_C(0x0000ffff00000000)
 
 extern void km_identity_arch_init(void);
@@ -53,9 +53,9 @@
 #else /* __ASSEMBLER__ */
 
-#define KM_ARM64_IDENTITY_START  0xffffffff80000000
-#define KM_ARM64_IDENTITY_SIZE   0x0000000080000000
+#define KM_ARM64_IDENTITY_START  0xffffffff00000000
+#define KM_ARM64_IDENTITY_SIZE   0x0000000100000000
 
 #define KM_ARM64_NON_IDENTITY_START  0xffff000000000000
-#define KM_ARM64_NON_IDENTITY_SIZE   0x0000ffff80000000
+#define KM_ARM64_NON_IDENTITY_SIZE   0x0000ffff00000000
 
 #endif /* __ASSEMBLER__ */
Index: kernel/arch/arm64/include/arch/mm/page.h
===================================================================
--- kernel/arch/arm64/include/arch/mm/page.h	(revision 128359ebc085c950da1f7e34c3928f12654b438f)
+++ kernel/arch/arm64/include/arch/mm/page.h	(revision 3c3657c839d290bbff8acf285476858b027d8657)
@@ -53,7 +53,7 @@
 
 #define KA2PA(x) \
-	(((uintptr_t) (x)) - UINT64_C(0xffffffff80000000) + physmem_base)
+	(((uintptr_t) (x)) - UINT64_C(0xffffffff00000000) + physmem_base)
 #define PA2KA(x) \
-	(((uintptr_t) (x)) + UINT64_C(0xffffffff80000000) - physmem_base)
+	(((uintptr_t) (x)) + UINT64_C(0xffffffff00000000) - physmem_base)
 
 #endif /* __ASSEMBLER__ */
