summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2016-02-03 23:44:36 +0000
committerAndre Przywara <andre.przywara@arm.com>2016-02-04 09:00:42 +0000
commit90fc243e9256775c85f8763e8fa1b2b59e67d0ce (patch)
tree4293050433bd6237830ec824e8334a90bf400af4 /include
parent14b6608c9a2eba27ef36cc3e0806c9fa6d5555b0 (diff)
Merge in files from Allwinners lichee BSP tarball
The Pine64 Wiki[1] links to a BSP tarball, among other things containing a dump of an ARM Trusted Firmware source tree with Allwinner changes on top. Since the tarball does not contain any version history information about the changes, this commit is just the diff between the ATF 1.0 release and the files from the Allwinner provided tarball. The executable flag from many source has been removed. [1] http://wiki.pine64.org/index.php/Pine_A64_Software_Release#Linux_BSP_Related
Diffstat (limited to 'include')
-rw-r--r--include/bl31/cpu_data.h5
-rw-r--r--include/bl31/head_data.h27
-rw-r--r--include/bl31/services/std_svc.h1
-rw-r--r--include/drivers/console.h1
-rw-r--r--include/lib/aarch64/arch_helpers.h26
-rw-r--r--include/plat/common/platform.h2
6 files changed, 49 insertions, 13 deletions
diff --git a/include/bl31/cpu_data.h b/include/bl31/cpu_data.h
index ba7ae06..859a8d4 100644
--- a/include/bl31/cpu_data.h
+++ b/include/bl31/cpu_data.h
@@ -104,6 +104,7 @@ static inline struct cpu_data *_cpu_data(void)
*************************************************************************/
void init_cpu_data_ptr(void);
+void init_cpu_ops(void);
#define get_cpu_data(_m) _cpu_data()->_m
#define set_cpu_data(_m, _v) _cpu_data()->_m = _v
@@ -115,6 +116,10 @@ void init_cpu_data_ptr(void);
#define flush_cpu_data(_m) flush_dcache_range((uint64_t) \
&(_cpu_data()->_m), \
sizeof(_cpu_data()->_m))
+#define flush_cpu_data_by_index(_ix, _m) \
+ flush_dcache_range((uint64_t) \
+ &(_cpu_data_by_index(_ix)->_m), \
+ sizeof(_cpu_data_by_index(_ix)->_m))
#endif /* __ASSEMBLY__ */
diff --git a/include/bl31/head_data.h b/include/bl31/head_data.h
new file mode 100644
index 0000000..9c5223f
--- /dev/null
+++ b/include/bl31/head_data.h
@@ -0,0 +1,27 @@
+/*
+ *
+ * Header for system
+ *
+ */
+
+#ifndef __HEAD_H__
+#define __HEAD_H__
+
+/******************************************************************************/
+/* the control information stored in file head */
+/******************************************************************************/
+struct spare_boot_ctrl_head {
+ unsigned int jump_instruction; // one intruction jumping to real code
+ unsigned char magic[8]; // ="u-boot"
+ unsigned int check_sum; // generated by PC
+ unsigned int align_size; // align size in byte
+ unsigned int length; // the size of all file
+ unsigned int uboot_length; // the size of uboot
+ unsigned char version[8]; // uboot version
+ unsigned char platform[8]; // platform information
+ int reserved[1]; //stamp space, 16bytes align
+} ;
+
+
+
+#endif /* __HEAD_H__ */
diff --git a/include/bl31/services/std_svc.h b/include/bl31/services/std_svc.h
index cbd5b62..329cee2 100644
--- a/include/bl31/services/std_svc.h
+++ b/include/bl31/services/std_svc.h
@@ -38,6 +38,7 @@
/* 0x8400ff02 is reserved */
#define ARM_STD_SVC_VERSION 0x8400ff03
+
/* ARM Standard Service Calls version numbers */
#define STD_SVC_VERSION_MAJOR 0x0
#define STD_SVC_VERSION_MINOR 0x1
diff --git a/include/drivers/console.h b/include/drivers/console.h
index f144ab9..6b0fe35 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -33,6 +33,7 @@
int console_init(unsigned long base_addr,
unsigned int uart_clk, unsigned int baud_rate);
+int console_exit(void);
int console_putc(int c);
int console_getc(void);
diff --git a/include/lib/aarch64/arch_helpers.h b/include/lib/aarch64/arch_helpers.h
index 09365fb..9b238d1 100644
--- a/include/lib/aarch64/arch_helpers.h
+++ b/include/lib/aarch64/arch_helpers.h
@@ -40,24 +40,24 @@
* registers
*********************************************************************/
-#define _DEFINE_SYSREG_READ_FUNC(_name, _reg_name) \
-static inline uint64_t read_ ## _name(void) \
-{ \
- uint64_t v; \
- __asm__ ("mrs %0, " #_reg_name : "=r" (v)); \
- return v; \
+#define _DEFINE_SYSREG_READ_FUNC(_name, _reg_name) \
+static inline uint64_t read_ ## _name(void) \
+{ \
+ uint64_t v; \
+ __asm__ volatile ("mrs %0, " #_reg_name : "=r" (v)); \
+ return v; \
}
-#define _DEFINE_SYSREG_WRITE_FUNC(_name, _reg_name) \
-static inline void write_ ## _name(uint64_t v) \
-{ \
- __asm__ ("msr " #_reg_name ", %0" : : "r" (v)); \
+#define _DEFINE_SYSREG_WRITE_FUNC(_name, _reg_name) \
+static inline void write_ ## _name(uint64_t v) \
+{ \
+ __asm__ volatile ("msr " #_reg_name ", %0" : : "r" (v)); \
}
#define _DEFINE_SYSREG_WRITE_CONST_FUNC(_name, _reg_name) \
-static inline void write_ ## _name(const uint64_t v) \
-{ \
- __asm__ ("msr " #_reg_name ", %0" : : "i" (v)); \
+static inline void write_ ## _name(const uint64_t v) \
+{ \
+ __asm__ volatile ("msr " #_reg_name ", %0" : : "i" (v)); \
}
/* Define read function for system register */
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 69bb749..bedff9e 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -191,4 +191,6 @@ void bl31_plat_enable_mmu(uint32_t flags);
******************************************************************************/
void bl32_plat_enable_mmu(uint32_t flags);
+void platform_smp_init(void);
+
#endif /* __PLATFORM_H__ */