From acea60e3d628f498d468fb1e2a92b75cfd1becb2 Mon Sep 17 00:00:00 2001 From: amrzar Date: Sun, 15 Jan 2017 09:44:25 +1100 Subject: [PATCH] ARM: Prepare hikey for aarch64 --- .../plat/hikey/plat/32/plat_mode/machine.h | 18 +++++++++++++++ .../hikey/plat/32/plat_mode/machine/devices.h | 22 +++++++++++++++++++ .../plat/32/plat_mode/machine/hardware.h | 18 +++++++++++++++ include/plat/hikey/plat/machine.h | 3 +-- include/plat/hikey/plat/machine/devices.h | 6 +---- include/plat/hikey/plat/machine/hardware.h | 4 ++-- src/plat/hikey/machine/Makefile | 8 +------ 7 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 include/plat/hikey/plat/32/plat_mode/machine.h create mode 100644 include/plat/hikey/plat/32/plat_mode/machine/devices.h create mode 100644 include/plat/hikey/plat/32/plat_mode/machine/hardware.h diff --git a/include/plat/hikey/plat/32/plat_mode/machine.h b/include/plat/hikey/plat/32/plat_mode/machine.h new file mode 100644 index 000000000..34e307e5f --- /dev/null +++ b/include/plat/hikey/plat/32/plat_mode/machine.h @@ -0,0 +1,18 @@ +/* + * Copyright 2016, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the GNU General Public License version 2. Note that NO WARRANTY is provided. + * See "LICENSE_GPLv2.txt" for details. + * + * @TAG(D61_GPL) + */ + +#ifndef __PLAT_MODE_MACHINE_H +#define __PLAT_MODE_MACHINE_H + +#define IRQ_CNODE_BITS 12 + +#endif /* __PLAT_MODE_MACHINE_H */ diff --git a/include/plat/hikey/plat/32/plat_mode/machine/devices.h b/include/plat/hikey/plat/32/plat_mode/machine/devices.h new file mode 100644 index 000000000..d47017318 --- /dev/null +++ b/include/plat/hikey/plat/32/plat_mode/machine/devices.h @@ -0,0 +1,22 @@ +/* + * Copyright 2016, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the GNU General Public License version 2. Note that NO WARRANTY is provided. + * See "LICENSE_GPLv2.txt" for details. + * + * @TAG(D61_GPL) + */ + +#ifndef __PLAT_MODE_MACHINE_DEVICES_H +#define __PLAT_MODE_MACHINE_DEVICES_H + +/* These devices are used by the seL4 kernel. */ +#define UART0_PPTR 0xfff01000 +#define GIC_DISTRIBUTOR_PPTR 0xfff03000 +#define GIC_CONTROLLER_PPTR 0xfff04000 +#define ARM_DEBUG_MMAPPING_PPTR 0xfff05000 + +#endif /* __PLAT_MODE_MACHINE_DEVICES_H */ diff --git a/include/plat/hikey/plat/32/plat_mode/machine/hardware.h b/include/plat/hikey/plat/32/plat_mode/machine/hardware.h new file mode 100644 index 000000000..536aeeca4 --- /dev/null +++ b/include/plat/hikey/plat/32/plat_mode/machine/hardware.h @@ -0,0 +1,18 @@ +/* + * Copyright 2016, Data61 + * Commonwealth Scientific and Industrial Research Organisation (CSIRO) + * ABN 41 687 119 230. + * + * This software may be distributed and modified according to the terms of + * the GNU General Public License version 2. Note that NO WARRANTY is provided. + * See "LICENSE_GPLv2.txt" for details. + * + * @TAG(D61_GPL) + */ + +#ifndef __PLAT_MODE_MACHINE_HARDWARE_H +#define __PLAT_MODE_MACHINE_HARDWARE_H + +#define kernelBase 0xe0000000 + +#endif /* __PLAT_MODE_MACHINE_HARDWARE_H */ diff --git a/include/plat/hikey/plat/machine.h b/include/plat/hikey/plat/machine.h index be8bc3fa3..80cf96b6a 100644 --- a/include/plat/hikey/plat/machine.h +++ b/include/plat/hikey/plat/machine.h @@ -11,6 +11,7 @@ #ifndef __PLAT_MACHINE_H #define __PLAT_MACHINE_H +#include #define N_INTERRUPTS 160 @@ -178,8 +179,6 @@ enum IRQConstants { maxIRQ = 159 } platform_interrupt_t; -#define IRQ_CNODE_BITS 12 - #define KERNEL_TIMER_IRQ INTERRUPT_COREINTER0 #include diff --git a/include/plat/hikey/plat/machine/devices.h b/include/plat/hikey/plat/machine/devices.h index 83e113774..b6899ce01 100644 --- a/include/plat/hikey/plat/machine/devices.h +++ b/include/plat/hikey/plat/machine/devices.h @@ -17,11 +17,7 @@ #ifndef __PLAT_MACHINE_DEVICES_H #define __PLAT_MACHINE_DEVICES_H -/* These devices are used by the seL4 kernel. */ -#define UART0_PPTR 0xfff01000 -#define GIC_DISTRIBUTOR_PPTR 0xfff03000 -#define GIC_CONTROLLER_PPTR 0xfff04000 -#define ARM_DEBUG_MMAPPING_PPTR 0xfff05000 +#include #define GIC_PL390_CONTROLLER_PPTR GIC_CONTROLLER_PPTR #define GIC_PL390_DISTRIBUTOR_PPTR GIC_DISTRIBUTOR_PPTR diff --git a/include/plat/hikey/plat/machine/hardware.h b/include/plat/hikey/plat/machine/hardware.h index 6eae0b86e..bd300a8f3 100755 --- a/include/plat/hikey/plat/machine/hardware.h +++ b/include/plat/hikey/plat/machine/hardware.h @@ -16,11 +16,11 @@ #include #include #include +#include #define TIMER_CLOCK_HZ 1200000llu -#define physBase 0x20000000 -#define kernelBase 0xe0000000 +#define physBase 0x20000000 static const kernel_frame_t BOOT_RODATA kernel_devices[] = { { diff --git a/src/plat/hikey/machine/Makefile b/src/plat/hikey/machine/Makefile index 6e6566e1e..46f1fceb5 100755 --- a/src/plat/hikey/machine/Makefile +++ b/src/plat/hikey/machine/Makefile @@ -10,11 +10,5 @@ DIRECTORIES += src/plat/hikey/machine -PLAT_C_SOURCES += machine/hardware.c +PLAT_C_SOURCES += machine/hardware.c machine/io.c -ifdef DEBUG - PLAT_C_SOURCES += machine/io.c -endif -ifdef RELEASE_PRINTF - PLAT_C_SOURCES += machine/io.c -endif