diff options
author | Ambroise Vincent <ambroise.vincent@arm.com> | 2019-02-11 14:13:43 +0000 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2019-03-04 12:20:38 +0000 |
commit | 602b7f58dd7668411c8a4032652b4552bd7fe934 (patch) | |
tree | 675e0939d19e306e01703359d7b8661d4f312d32 | |
parent | 8a573de8dda42258b747e56f19190311ea090d29 (diff) | |
download | tf-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.h | 6 | ||||
-rw-r--r-- | include/common/param_header.h | 2 | ||||
-rw-r--r-- | include/drivers/console.h | 2 | ||||
-rw-r--r-- | include/lib/irq.h | 1 | ||||
-rw-r--r-- | include/lib/power_management.h | 1 | ||||
-rw-r--r-- | include/lib/tftf_lib.h | 1 | ||||
-rw-r--r-- | include/runtime_services/secure_el0_payloads/secure_partition.h | 2 | ||||
-rw-r--r-- | include/runtime_services/spci_helpers.h | 1 | ||||
-rw-r--r-- | lib/compiler-rt/builtins/int_lib.h | 5 | ||||
-rw-r--r-- | lib/power_management/suspend/suspend_private.h | 1 | ||||
-rw-r--r-- | lib/utils/uuid.c | 6 | ||||
-rw-r--r-- | spm/cactus/cactus.h | 2 | ||||
-rw-r--r-- | spm/cactus/cactus_tests_memory_attributes.c | 2 | ||||
-rw-r--r-- | spm/cactus/cactus_tests_misc.c | 2 | ||||
-rw-r--r-- | spm/cactus/cactus_tests_system_setup.c | 2 | ||||
-rw-r--r-- | spm/common/sp_helpers.h | 1 | ||||
-rw-r--r-- | spm/ivy/ivy.h | 2 | ||||
-rw-r--r-- | tftf/framework/main.c | 2 | ||||
-rw-r--r-- | tftf/framework/nvm_results_helpers.c | 8 | ||||
-rw-r--r-- | tftf/framework/timer/timer_framework.c | 2 | ||||
-rw-r--r-- | tftf/tests/runtime_services/standard_service/pmf/api_tests/runtime_instr/test_pmf_rt_instr.c | 2 |
21 files changed, 29 insertions, 24 deletions
diff --git a/include/common/debug.h b/include/common/debug.h index 53eebf74b..9b2d84216 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 32763ddc3..7834cbb1f 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 abbe35612..72decb9da 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 1628221a0..6a37e052e 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 d2d690144..3d8e96127 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 58112b4b6..3f60fecb6 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 712337e58..0a41ddef6 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 345245283..a64591e71 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 724d5a4fe..2acc4bff2 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 dfc2e930e..9949dc6d3 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 21747a208..2c79dfbdc 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 2f12f5ce7..0b06eb2e7 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 3b56d60e5..bed6f0b55 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 50b8e6a17..39eb75222 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 685d82dde..cead8e3be 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 1bd4425ff..d06fec3b4 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 b31254016..c5cac2e03 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 7f987c059..67f565ddc 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 34ef19f42..78df642fb 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 38106cfc7..d856abe3c 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 3a3701e92..3c1fdaff0 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> |