aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmbroise Vincent <ambroise.vincent@arm.com>2019-02-11 14:13:43 +0000
committerSandrine Bailleux <sandrine.bailleux@arm.com>2019-03-04 12:20:38 +0000
commit602b7f58dd7668411c8a4032652b4552bd7fe934 (patch)
tree675e0939d19e306e01703359d7b8661d4f312d32
parent8a573de8dda42258b747e56f19190311ea090d29 (diff)
downloadtf-a-tests-602b7f58dd7668411c8a4032652b4552bd7fe934.tar.gz
libc: Update includes
Reflect the changes in the structure of libc. NB: the include of stdarg.h in nvm_results_helpers.c is not in alphabetical order because it needs to be included before stdio.h. Fixing this would require further changes. Change-Id: I07f62a3450802833408ff3e1f950fd3b643e5e33 Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
-rw-r--r--include/common/debug.h6
-rw-r--r--include/common/param_header.h2
-rw-r--r--include/drivers/console.h2
-rw-r--r--include/lib/irq.h1
-rw-r--r--include/lib/power_management.h1
-rw-r--r--include/lib/tftf_lib.h1
-rw-r--r--include/runtime_services/secure_el0_payloads/secure_partition.h2
-rw-r--r--include/runtime_services/spci_helpers.h1
-rw-r--r--lib/compiler-rt/builtins/int_lib.h5
-rw-r--r--lib/power_management/suspend/suspend_private.h1
-rw-r--r--lib/utils/uuid.c6
-rw-r--r--spm/cactus/cactus.h2
-rw-r--r--spm/cactus/cactus_tests_memory_attributes.c2
-rw-r--r--spm/cactus/cactus_tests_misc.c2
-rw-r--r--spm/cactus/cactus_tests_system_setup.c2
-rw-r--r--spm/common/sp_helpers.h1
-rw-r--r--spm/ivy/ivy.h2
-rw-r--r--tftf/framework/main.c2
-rw-r--r--tftf/framework/nvm_results_helpers.c8
-rw-r--r--tftf/framework/timer/timer_framework.c2
-rw-r--r--tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c2
21 files changed, 29 insertions, 24 deletions
diff --git a/include/common/debug.h b/include/common/debug.h
index 53eebf74..9b2d8421 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -65,6 +65,12 @@ void mp_printf(const char *fmt, ...);
# define VERBOSE(...)
#endif
+#if ENABLE_BACKTRACE
+void backtrace(const char *cookie);
+#else
+#define backtrace(x)
+#endif
+
/*
* For the moment this panic function is very basic: report an error and
* spin. This can be expanded in the future to provide more information.
diff --git a/include/common/param_header.h b/include/common/param_header.h
index 32763ddc..7834cbb1 100644
--- a/include/common/param_header.h
+++ b/include/common/param_header.h
@@ -36,7 +36,7 @@
#ifndef __ASSEMBLY__
-#include <types.h>
+#include <stdint.h>
/***************************************************************************
* This structure provides version information and the size of the
diff --git a/include/drivers/console.h b/include/drivers/console.h
index abbe3561..72decb9d 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -14,7 +14,7 @@
#ifndef __ASSEMBLY__
-#include <types.h>
+#include <stdint.h>
int console_init(uintptr_t base_addr,
unsigned int uart_clk, unsigned int baud_rate);
diff --git a/include/lib/irq.h b/include/lib/irq.h
index 1628221a..6a37e052 100644
--- a/include/lib/irq.h
+++ b/include/lib/irq.h
@@ -7,6 +7,7 @@
#ifndef __IRQ_H__
#define __IRQ_H__
+#include <cdefs.h>
#include <platform_def.h> /* For CACHE_WRITEBACK_GRANULE */
#include <stdint.h>
diff --git a/include/lib/power_management.h b/include/lib/power_management.h
index d2d69014..3d8e9612 100644
--- a/include/lib/power_management.h
+++ b/include/lib/power_management.h
@@ -11,7 +11,6 @@
#include <psci.h>
#include <spinlock.h>
#include <stdint.h>
-#include <types.h>
/* Set of states of an affinity node as seen by the Test Framework */
typedef enum {
diff --git a/include/lib/tftf_lib.h b/include/lib/tftf_lib.h
index 58112b4b..3f60fecb 100644
--- a/include/lib/tftf_lib.h
+++ b/include/lib/tftf_lib.h
@@ -13,7 +13,6 @@
#include <arch_helpers.h>
#include <stdbool.h>
#include <stdint.h>
-#include <sys/types.h>
/*
* Possible error codes for signaling the result of a test
diff --git a/include/runtime_services/secure_el0_payloads/secure_partition.h b/include/runtime_services/secure_el0_payloads/secure_partition.h
index 712337e5..0a41ddef 100644
--- a/include/runtime_services/secure_el0_payloads/secure_partition.h
+++ b/include/runtime_services/secure_el0_payloads/secure_partition.h
@@ -8,7 +8,7 @@
#define SECURE_PARTITION_H
#include <param_header.h>
-#include <types.h>
+#include <stdint.h>
#include <utils_def.h>
/*
diff --git a/include/runtime_services/spci_helpers.h b/include/runtime_services/spci_helpers.h
index 34524528..a64591e7 100644
--- a/include/runtime_services/spci_helpers.h
+++ b/include/runtime_services/spci_helpers.h
@@ -18,7 +18,6 @@
#ifndef __ASSEMBLY__
#include <stdint.h>
-#include <types.h>
int spci_service_handle_open(uint16_t client_id, uint16_t *handle,
uint32_t uuid1, uint32_t uuid2,
diff --git a/lib/compiler-rt/builtins/int_lib.h b/lib/compiler-rt/builtins/int_lib.h
index 724d5a4f..2acc4bff 100644
--- a/lib/compiler-rt/builtins/int_lib.h
+++ b/lib/compiler-rt/builtins/int_lib.h
@@ -60,9 +60,8 @@
#define UNUSED __attribute__((unused))
#endif
-#include <sys/limits.h>
-#include <sys/stdint.h>
-#include <sys/types.h>
+#include <limits.h>
+#include <stdint.h>
/* Include the commonly used internal type definitions. */
#include "int_types.h"
diff --git a/lib/power_management/suspend/suspend_private.h b/lib/power_management/suspend/suspend_private.h
index dfc2e930..9949dc6d 100644
--- a/lib/power_management/suspend/suspend_private.h
+++ b/lib/power_management/suspend/suspend_private.h
@@ -16,7 +16,6 @@
#include <power_management.h>
#include <stdint.h>
#include <string.h>
-#include <types.h>
#define NR_CTX_REGS 6
diff --git a/lib/utils/uuid.c b/lib/utils/uuid.c
index 21747a20..2c79dfbd 100644
--- a/lib/utils/uuid.c
+++ b/lib/utils/uuid.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -10,8 +10,8 @@
#include <uuid_utils.h>
/* Format string to print a UUID */
-static const char *uuid_str_fmt = "{ 0x%.8x, 0x%.4x, 0x%.4x, 0x%.2x, 0x%.2x, "
- "0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }";
+static const char *uuid_str_fmt = "{ 0x%08x, 0x%04x, 0x%04x, 0x%02x, 0x%02x, "
+ "0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x }";
unsigned int is_uuid_null(const uuid_t *uuid)
diff --git a/spm/cactus/cactus.h b/spm/cactus/cactus.h
index 2f12f5ce..0b06eb2e 100644
--- a/spm/cactus/cactus.h
+++ b/spm/cactus/cactus.h
@@ -7,7 +7,7 @@
#ifndef __CACTUS_H__
#define __CACTUS_H__
-#include <types.h>
+#include <stdint.h>
/* Linker symbols used to figure out the memory layout of Cactus. */
extern uintptr_t __TEXT_START__, __TEXT_END__;
diff --git a/spm/cactus/cactus_tests_memory_attributes.c b/spm/cactus/cactus_tests_memory_attributes.c
index 3b56d60e..bed6f0b5 100644
--- a/spm/cactus/cactus_tests_memory_attributes.c
+++ b/spm/cactus/cactus_tests_memory_attributes.c
@@ -12,7 +12,7 @@
#include <sp_helpers.h>
#include <sprt_svc.h>
#include <stdio.h>
-#include <types.h>
+#include <stdint.h>
#include <xlat_tables_defs.h>
#include "cactus.h"
diff --git a/spm/cactus/cactus_tests_misc.c b/spm/cactus/cactus_tests_misc.c
index 50b8e6a1..39eb7522 100644
--- a/spm/cactus/cactus_tests_misc.c
+++ b/spm/cactus/cactus_tests_misc.c
@@ -11,7 +11,7 @@
#include <spm_svc.h>
#include <sprt_client.h>
#include <sprt_svc.h>
-#include <types.h>
+#include <stdint.h>
#include "cactus.h"
#include "cactus_tests.h"
diff --git a/spm/cactus/cactus_tests_system_setup.c b/spm/cactus/cactus_tests_system_setup.c
index 685d82dd..cead8e3b 100644
--- a/spm/cactus/cactus_tests_system_setup.c
+++ b/spm/cactus/cactus_tests_system_setup.c
@@ -7,7 +7,7 @@
#include <arch_helpers.h>
#include <debug.h>
#include <sp_helpers.h>
-#include <types.h>
+#include <stdint.h>
#include "cactus.h"
diff --git a/spm/common/sp_helpers.h b/spm/common/sp_helpers.h
index 1bd4425f..d06fec3b 100644
--- a/spm/common/sp_helpers.h
+++ b/spm/common/sp_helpers.h
@@ -8,7 +8,6 @@
#define SP_HELPERS_H
#include <stdint.h>
-#include <sys/types.h>
typedef struct {
u_register_t fid;
diff --git a/spm/ivy/ivy.h b/spm/ivy/ivy.h
index b3125401..c5cac2e0 100644
--- a/spm/ivy/ivy.h
+++ b/spm/ivy/ivy.h
@@ -7,7 +7,7 @@
#ifndef IVY_H
#define IVY_H
-#include <types.h>
+#include <stdint.h>
/* Linker symbols used to figure out the memory layout of Ivy. */
extern uintptr_t __TEXT_START__, __TEXT_END__;
diff --git a/tftf/framework/main.c b/tftf/framework/main.c
index 7f987c05..67f565dd 100644
--- a/tftf/framework/main.c
+++ b/tftf/framework/main.c
@@ -17,8 +17,8 @@
#include <power_management.h>
#include <psci.h>
#include <sgi.h>
+#include <stdint.h>
#include <string.h>
-#include <sys/types.h>
#include <tftf.h>
#include <tftf_lib.h>
#include <timer.h>
diff --git a/tftf/framework/nvm_results_helpers.c b/tftf/framework/nvm_results_helpers.c
index 34ef19f4..78df642f 100644
--- a/tftf/framework/nvm_results_helpers.c
+++ b/tftf/framework/nvm_results_helpers.c
@@ -4,14 +4,18 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
+/*
+ * The include of stdarg.h is not in alphabetical order because it needs to be
+ * included before stdio.h. Fixing this would require further changes.
+ */
#include <arch_helpers.h>
+#include <stdarg.h>
#include <assert.h>
#include <debug.h>
#include <nvm.h>
#include <platform.h>
#include <spinlock.h>
-#include <stdarg.h>
-#include <string.h>
+#include <stdio.h>
/*
* Temporary buffer to store 1 test output.
diff --git a/tftf/framework/timer/timer_framework.c b/tftf/framework/timer/timer_framework.c
index 38106cfc..d856abe3 100644
--- a/tftf/framework/timer/timer_framework.c
+++ b/tftf/framework/timer/timer_framework.c
@@ -17,7 +17,7 @@
#include <sgi.h>
#include <spinlock.h>
#include <stddef.h>
-#include <sys/types.h>
+#include <stdint.h>
#include <tftf.h>
#include <timer.h>
diff --git a/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c b/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
index 3a3701e9..3c1fdaff 100644
--- a/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
+++ b/tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c
@@ -13,7 +13,7 @@
#include <psci.h>
#include <smccc.h>
#include <string.h>
-#include <sys/errno.h>
+#include <errno.h>
#include <tftf_lib.h>
#include <timer.h>