aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/arch/aarch32/arch.h2
-rw-r--r--include/arch/aarch32/arch_helpers.h3
-rw-r--r--include/arch/aarch32/asm_macros.S4
-rw-r--r--include/arch/aarch32/console_macros.S2
-rw-r--r--include/arch/aarch32/smccc_helpers.h6
-rw-r--r--include/arch/aarch64/arch.h2
-rw-r--r--include/arch/aarch64/arch_helpers.h3
-rw-r--r--include/arch/aarch64/asm_macros.S4
-rw-r--r--include/arch/aarch64/console_macros.S2
-rw-r--r--include/arch/aarch64/smccc_helpers.h6
-rw-r--r--include/bl1/bl1.h5
-rw-r--r--include/bl1/tbbr/tbbr_img_desc.h2
-rw-r--r--include/bl31/ehf.h3
-rw-r--r--include/bl31/interrupt_mgmt.h2
-rw-r--r--include/bl32/payloads/tlk.h2
-rw-r--r--include/common/bl_common.h10
-rw-r--r--include/common/debug.h6
-rw-r--r--include/common/desc_image_load.h2
-rw-r--r--include/common/ep_info.h7
-rw-r--r--include/common/param_header.h3
-rw-r--r--include/common/runtime_svc.h6
-rw-r--r--include/common/tbbr/tbbr_img_def.h2
-rw-r--r--include/drivers/arm/cci.h2
-rw-r--r--include/drivers/arm/gic_common.h2
-rw-r--r--include/drivers/arm/gicv2.h5
-rw-r--r--include/drivers/arm/gicv3.h9
-rw-r--r--include/drivers/arm/pl011.h2
-rw-r--r--include/drivers/arm/pl061_gpio.h2
-rw-r--r--include/drivers/arm/smmu_v3.h3
-rw-r--r--include/drivers/arm/sp804_delay_timer.h2
-rw-r--r--include/drivers/arm/sp805.h2
-rw-r--r--include/drivers/arm/tzc380.h4
-rw-r--r--include/drivers/arm/tzc400.h4
-rw-r--r--include/drivers/arm/tzc_common.h2
-rw-r--r--include/drivers/arm/tzc_dmc500.h4
-rw-r--r--include/drivers/arm/tzc_dmc620.h2
-rw-r--r--include/drivers/auth/auth_mod.h8
-rw-r--r--include/drivers/auth/img_parser_mod.h2
-rw-r--r--include/drivers/cadence/cdns_uart.h2
-rw-r--r--include/drivers/console.h6
-rw-r--r--include/drivers/console_assertions.h2
-rw-r--r--include/drivers/coreboot/cbmem_console.h2
-rw-r--r--include/drivers/io/io_block.h2
-rw-r--r--include/drivers/io/io_driver.h2
-rw-r--r--include/drivers/io/io_storage.h2
-rw-r--r--include/drivers/marvell/ccu.h2
-rw-r--r--include/drivers/marvell/gwin.h2
-rw-r--r--include/drivers/marvell/io_win.h2
-rw-r--r--include/drivers/marvell/iob.h2
-rw-r--r--include/drivers/marvell/mochi/cp110_setup.h3
-rw-r--r--include/drivers/marvell/uart/a3700_console.h2
-rw-r--r--include/drivers/meson/meson_console.h2
-rw-r--r--include/drivers/mmc.h3
-rw-r--r--include/drivers/partition/gpt.h2
-rw-r--r--include/drivers/partition/partition.h3
-rw-r--r--include/drivers/st/io_mmc.h2
-rw-r--r--include/drivers/st/io_stm32image.h4
-rw-r--r--include/drivers/st/stm32_console.h2
-rw-r--r--include/drivers/st/stm32_gpio.h2
-rw-r--r--include/drivers/st/stm32_i2c.h3
-rw-r--r--include/drivers/st/stm32_sdmmc2.h3
-rw-r--r--include/drivers/st/stm32_uart_regs.h2
-rw-r--r--include/drivers/st/stm32mp1_clk.h3
-rw-r--r--include/drivers/st/stm32mp1_clkfunc.h3
-rw-r--r--include/drivers/st/stm32mp1_ddr_regs.h2
-rw-r--r--include/drivers/st/stm32mp1_pmic.h2
-rw-r--r--include/drivers/st/stm32mp1_pwr.h2
-rw-r--r--include/drivers/st/stm32mp1_rcc.h2
-rw-r--r--include/drivers/st/stpmu1.h4
-rw-r--r--include/drivers/synopsys/dw_mmc.h2
-rw-r--r--include/drivers/ti/uart/uart_16550.h2
-rw-r--r--include/drivers/ufs.h2
-rw-r--r--include/lib/bakery_lock.h3
-rw-r--r--include/lib/cpus/aarch32/cortex_a57.h2
-rw-r--r--include/lib/cpus/aarch32/cortex_a72.h3
-rw-r--r--include/lib/cpus/aarch32/cpu_macros.S2
-rw-r--r--include/lib/cpus/aarch64/cortex_a57.h3
-rw-r--r--include/lib/cpus/aarch64/cortex_a72.h3
-rw-r--r--include/lib/cpus/aarch64/cortex_a75.h2
-rw-r--r--include/lib/cpus/aarch64/cortex_ares.h2
-rw-r--r--include/lib/cpus/aarch64/cpu_macros.S2
-rw-r--r--include/lib/cpus/aarch64/dsu_def.h2
-rw-r--r--include/lib/cpus/errata_report.h4
-rw-r--r--include/lib/el3_runtime/aarch32/context.h5
-rw-r--r--include/lib/el3_runtime/aarch64/context.h8
-rw-r--r--include/lib/el3_runtime/context_mgmt.h3
-rw-r--r--include/lib/el3_runtime/cpu_data.h7
-rw-r--r--include/lib/el3_runtime/pubsub.h3
-rw-r--r--include/lib/el3_runtime/pubsub_events.h2
-rw-r--r--include/lib/extensions/amu.h8
-rw-r--r--include/lib/extensions/ras.h3
-rw-r--r--include/lib/extensions/ras_arch.h2
-rw-r--r--include/lib/libc/assert.h4
-rw-r--r--include/lib/object_pool.h5
-rw-r--r--include/lib/optee_utils.h3
-rw-r--r--include/lib/pmf/pmf.h6
-rw-r--r--include/lib/pmf/pmf_helpers.h7
-rw-r--r--include/lib/psci/psci.h9
-rw-r--r--include/lib/psci/psci_lib.h3
-rw-r--r--include/lib/runtime_instr.h2
-rw-r--r--include/lib/smccc.h9
-rw-r--r--include/lib/utils.h1
-rw-r--r--include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h4
-rw-r--r--include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h4
-rw-r--r--include/lib/xlat_tables/xlat_tables.h5
-rw-r--r--include/lib/xlat_tables/xlat_tables_compat.h4
-rw-r--r--include/lib/xlat_tables/xlat_tables_defs.h4
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2.h7
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2_helpers.h10
-rw-r--r--include/plat/arm/board/common/board_css_def.h7
-rw-r--r--include/plat/arm/board/common/v2m_def.h2
-rw-r--r--include/plat/arm/common/aarch64/arm_macros.S6
-rw-r--r--include/plat/arm/common/aarch64/cci_macros.S2
-rw-r--r--include/plat/arm/common/arm_config.h3
-rw-r--r--include/plat/arm/common/arm_def.h14
-rw-r--r--include/plat/arm/common/arm_sip_svc.h2
-rw-r--r--include/plat/arm/common/arm_spm_def.h5
-rw-r--r--include/plat/arm/common/arm_tzc_dram.ld.S8
-rw-r--r--include/plat/arm/common/plat_arm.h15
-rw-r--r--include/plat/arm/css/common/css_def.h7
-rw-r--r--include/plat/arm/css/common/css_pm.h3
-rw-r--r--include/plat/arm/soc/common/soc_css_def.h5
-rw-r--r--include/plat/common/common_def.h7
-rw-r--r--include/plat/common/platform.h3
-rw-r--r--include/plat/marvell/a3700/common/armada_common.h3
-rw-r--r--include/plat/marvell/a3700/common/marvell_def.h8
-rw-r--r--include/plat/marvell/a3700/common/plat_marvell.h9
-rw-r--r--include/plat/marvell/a8k/common/armada_common.h8
-rw-r--r--include/plat/marvell/a8k/common/marvell_def.h8
-rw-r--r--include/plat/marvell/a8k/common/plat_marvell.h9
-rw-r--r--include/plat/marvell/common/aarch64/cci_macros.S2
-rw-r--r--include/plat/marvell/common/aarch64/marvell_macros.S8
-rw-r--r--include/plat/marvell/common/marvell_plat_priv.h2
-rw-r--r--include/services/mm_svc.h2
-rw-r--r--include/services/sdei.h4
-rw-r--r--include/services/secure_partition.h3
-rw-r--r--include/services/sp_res_desc.h3
-rw-r--r--include/services/sp_res_desc_def.h2
-rw-r--r--include/services/spci_svc.h4
-rw-r--r--include/services/spm_svc.h2
-rw-r--r--include/services/sprt_svc.h4
-rw-r--r--include/tools_share/firmware_image_package.h3
142 files changed, 308 insertions, 243 deletions
diff --git a/include/arch/aarch32/arch.h b/include/arch/aarch32/arch.h
index 8260c5491..cbe272c23 100644
--- a/include/arch/aarch32/arch.h
+++ b/include/arch/aarch32/arch.h
@@ -7,7 +7,7 @@
#ifndef ARCH_H
#define ARCH_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* MIDR bit definitions
diff --git a/include/arch/aarch32/arch_helpers.h b/include/arch/aarch32/arch_helpers.h
index a6fe14fb8..c2773c139 100644
--- a/include/arch/aarch32/arch_helpers.h
+++ b/include/arch/aarch32/arch_helpers.h
@@ -7,11 +7,12 @@
#ifndef ARCH_HELPERS_H
#define ARCH_HELPERS_H
-#include <arch.h>
#include <cdefs.h>
#include <stdint.h>
#include <string.h>
+#include <arch.h>
+
/**********************************************************************
* Macros which create inline functions to read or write CPU system
* registers
diff --git a/include/arch/aarch32/asm_macros.S b/include/arch/aarch32/asm_macros.S
index c54f75c2d..8408804fb 100644
--- a/include/arch/aarch32/asm_macros.S
+++ b/include/arch/aarch32/asm_macros.S
@@ -7,8 +7,8 @@
#define ASM_MACROS_S
#include <arch.h>
-#include <asm_macros_common.S>
-#include <spinlock.h>
+#include <common/asm_macros_common.S>
+#include <lib/spinlock.h>
/*
* TLBI instruction with type specifier that implements the workaround for
diff --git a/include/arch/aarch32/console_macros.S b/include/arch/aarch32/console_macros.S
index ba6e7d050..ed5088d5a 100644
--- a/include/arch/aarch32/console_macros.S
+++ b/include/arch/aarch32/console_macros.S
@@ -6,7 +6,7 @@
#ifndef CONSOLE_MACROS_S
#define CONSOLE_MACROS_S
-#include <console.h>
+#include <drivers/console.h>
/*
* This macro encapsulates the common setup that has to be done at the end of
diff --git a/include/arch/aarch32/smccc_helpers.h b/include/arch/aarch32/smccc_helpers.h
index 67952ec50..d3e5e59c5 100644
--- a/include/arch/aarch32/smccc_helpers.h
+++ b/include/arch/aarch32/smccc_helpers.h
@@ -7,7 +7,7 @@
#ifndef SMCCC_HELPERS_H
#define SMCCC_HELPERS_H
-#include <smccc.h>
+#include <lib/smccc.h>
/* These are offsets to registers in smc_ctx_t */
#define SMC_CTX_GPREG_R0 U(0x0)
@@ -25,9 +25,11 @@
#define SMC_CTX_SIZE U(0x90)
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
#include <stdint.h>
+#include <lib/cassert.h>
+
/*
* The generic structure to save arguments and callee saved registers during
* an SMC. Also this structure is used to store the result return values after
diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h
index 72a14dcfa..8a44d83f0 100644
--- a/include/arch/aarch64/arch.h
+++ b/include/arch/aarch64/arch.h
@@ -7,7 +7,7 @@
#ifndef ARCH_H
#define ARCH_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* MIDR bit definitions
diff --git a/include/arch/aarch64/arch_helpers.h b/include/arch/aarch64/arch_helpers.h
index 7222b9dc7..b912b4223 100644
--- a/include/arch/aarch64/arch_helpers.h
+++ b/include/arch/aarch64/arch_helpers.h
@@ -7,12 +7,13 @@
#ifndef ARCH_HELPERS_H
#define ARCH_HELPERS_H
-#include <arch.h>
#include <cdefs.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
+#include <arch.h>
+
/**********************************************************************
* Macros which create inline functions to read or write CPU system
* registers
diff --git a/include/arch/aarch64/asm_macros.S b/include/arch/aarch64/asm_macros.S
index dea302137..387be4ca3 100644
--- a/include/arch/aarch64/asm_macros.S
+++ b/include/arch/aarch64/asm_macros.S
@@ -7,8 +7,8 @@
#define ASM_MACROS_S
#include <arch.h>
-#include <asm_macros_common.S>
-#include <spinlock.h>
+#include <common/asm_macros_common.S>
+#include <lib/spinlock.h>
/*
* TLBI instruction with type specifier that implements the workaround for
diff --git a/include/arch/aarch64/console_macros.S b/include/arch/aarch64/console_macros.S
index 5c88d4f22..90ef42048 100644
--- a/include/arch/aarch64/console_macros.S
+++ b/include/arch/aarch64/console_macros.S
@@ -6,7 +6,7 @@
#ifndef CONSOLE_MACROS_S
#define CONSOLE_MACROS_S
-#include <console.h>
+#include <drivers/console.h>
/*
* This macro encapsulates the common setup that has to be done at the end of
diff --git a/include/arch/aarch64/smccc_helpers.h b/include/arch/aarch64/smccc_helpers.h
index efab18b0c..e28697d7e 100644
--- a/include/arch/aarch64/smccc_helpers.h
+++ b/include/arch/aarch64/smccc_helpers.h
@@ -7,12 +7,14 @@
#ifndef SMCCC_HELPERS_H
#define SMCCC_HELPERS_H
-#include <smccc.h>
+#include <lib/smccc.h>
#ifndef __ASSEMBLY__
-#include <context.h>
+
#include <stdbool.h>
+#include <context.h>
+
/* Convenience macros to return from SMC handler */
#define SMC_RET0(_h) { \
return (uint64_t) (_h); \
diff --git a/include/bl1/bl1.h b/include/bl1/bl1.h
index 39b8d1ede..7b5d87572 100644
--- a/include/bl1/bl1.h
+++ b/include/bl1/bl1.h
@@ -7,7 +7,7 @@
#ifndef BL1_H
#define BL1_H
-#include <bl_common.h>
+#include <common/bl_common.h>
/*
* Defines for BL1 SMC function ids.
@@ -62,7 +62,8 @@
((_fid >= FWU_SMC_FID_START) && (_fid <= FWU_SMC_FID_END))
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
+#include <lib/cassert.h>
struct entry_point_info;
diff --git a/include/bl1/tbbr/tbbr_img_desc.h b/include/bl1/tbbr/tbbr_img_desc.h
index bb36eb50c..db15cdbfc 100644
--- a/include/bl1/tbbr/tbbr_img_desc.h
+++ b/include/bl1/tbbr/tbbr_img_desc.h
@@ -7,7 +7,7 @@
#ifndef TBBR_IMG_DESC_H
#define TBBR_IMG_DESC_H
-#include <bl_common.h>
+#include <common/bl_common.h>
extern image_desc_t bl1_tbbr_image_descs[];
diff --git a/include/bl31/ehf.h b/include/bl31/ehf.h
index f35d81002..ee00d0936 100644
--- a/include/bl31/ehf.h
+++ b/include/bl31/ehf.h
@@ -11,7 +11,8 @@
#include <cdefs.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Valid priorities set bit 0 of the priority handler. */
#define EHF_PRI_VALID_ BIT(0)
diff --git a/include/bl31/interrupt_mgmt.h b/include/bl31/interrupt_mgmt.h
index 6a49fb6dd..b1683cc11 100644
--- a/include/bl31/interrupt_mgmt.h
+++ b/include/bl31/interrupt_mgmt.h
@@ -8,7 +8,7 @@
#define INTERRUPT_MGMT_H
#include <arch.h>
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants for the types of interrupts recognised by the IM framework
diff --git a/include/bl32/payloads/tlk.h b/include/bl32/payloads/tlk.h
index 0234cbe4d..2c12633ea 100644
--- a/include/bl32/payloads/tlk.h
+++ b/include/bl32/payloads/tlk.h
@@ -7,7 +7,7 @@
#ifndef TLK_H
#define TLK_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Generate function IDs for the Trusted OS/Apps
diff --git a/include/common/bl_common.h b/include/common/bl_common.h
index 56c89fcc4..c12b08bb7 100644
--- a/include/common/bl_common.h
+++ b/include/common/bl_common.h
@@ -7,9 +7,9 @@
#ifndef BL_COMMON_H
#define BL_COMMON_H
-#include <ep_info.h>
-#include <param_header.h>
-#include <utils_def.h>
+#include <common/ep_info.h>
+#include <common/param_header.h>
+#include <lib/utils_def.h>
#define UP U(1)
#define DOWN U(0)
@@ -58,11 +58,11 @@
#define SERROR_AARCH32 U(0xf)
#ifndef __ASSEMBLY__
-#include <cassert.h>
+
#include <stddef.h>
#include <stdint.h>
-#include <utils_def.h> /* To retain compatibility */
+#include <lib/cassert.h>
/*
* Declarations of linker defined symbols to help determine memory layout of
diff --git a/include/common/debug.h b/include/common/debug.h
index a14a66e85..f8faf6835 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -7,7 +7,7 @@
#ifndef DEBUG_H
#define DEBUG_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* The log output macros print output to the console. These macros produce
@@ -28,12 +28,14 @@
#define LOG_LEVEL_VERBOSE U(50)
#ifndef __ASSEMBLY__
+
#include <cdefs.h>
-#include <console.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
+#include <drivers/console.h>
+
/*
* Define Log Markers corresponding to each log level which will
* be embedded in the format string and is expected by tf_log() to determine
diff --git a/include/common/desc_image_load.h b/include/common/desc_image_load.h
index 625489519..f2f26ea99 100644
--- a/include/common/desc_image_load.h
+++ b/include/common/desc_image_load.h
@@ -6,7 +6,7 @@
#ifndef DESC_IMAGE_LOAD_H
#define DESC_IMAGE_LOAD_H
-#include <bl_common.h>
+#include <common/bl_common.h>
/* Following structure is used to store BL ep/image info. */
typedef struct bl_mem_params_node {
diff --git a/include/common/ep_info.h b/include/common/ep_info.h
index 0f67687e4..a09d03ba0 100644
--- a/include/common/ep_info.h
+++ b/include/common/ep_info.h
@@ -7,8 +7,8 @@
#ifndef EP_INFO_H
#define EP_INFO_H
-#include <param_header.h>
-#include <utils_def.h>
+#include <common/param_header.h>
+#include <lib/utils_def.h>
#define SECURE U(0x0)
#define NON_SECURE U(0x1)
@@ -64,9 +64,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
typedef struct aapcs64_params {
u_register_t arg0;
u_register_t arg1;
diff --git a/include/common/param_header.h b/include/common/param_header.h
index e9717cbca..0c1503f1b 100644
--- a/include/common/param_header.h
+++ b/include/common/param_header.h
@@ -8,7 +8,8 @@
#define PARAM_HEADER_H
#include <stdbool.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Param header types */
#define PARAM_EP U(0x01)
diff --git a/include/common/runtime_svc.h b/include/common/runtime_svc.h
index e32c2870a..59bf158b4 100644
--- a/include/common/runtime_svc.h
+++ b/include/common/runtime_svc.h
@@ -7,10 +7,10 @@
#ifndef RUNTIME_SVC_H
#define RUNTIME_SVC_H
-#include <bl_common.h> /* to include exception types */
-#include <cassert.h>
+#include <common/bl_common.h> /* to include exception types */
+#include <lib/cassert.h>
+#include <lib/utils_def.h>
#include <smccc_helpers.h> /* to include SMCCC definitions */
-#include <utils_def.h>
/*******************************************************************************
* Structure definition, typedefs & constants for the runtime service framework
diff --git a/include/common/tbbr/tbbr_img_def.h b/include/common/tbbr/tbbr_img_def.h
index bd8f5dc58..672886ded 100644
--- a/include/common/tbbr/tbbr_img_def.h
+++ b/include/common/tbbr/tbbr_img_def.h
@@ -7,7 +7,7 @@
#ifndef TBBR_IMG_DEF_H
#define TBBR_IMG_DEF_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Firmware Image Package */
#define FIP_IMAGE_ID U(0)
diff --git a/include/drivers/arm/cci.h b/include/drivers/arm/cci.h
index 24b76dab8..c5ddcfd44 100644
--- a/include/drivers/arm/cci.h
+++ b/include/drivers/arm/cci.h
@@ -7,7 +7,7 @@
#ifndef CCI_H
#define CCI_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Slave interface offsets from PERIPHBASE */
#define SLAVE_IFACE6_OFFSET UL(0x7000)
diff --git a/include/drivers/arm/gic_common.h b/include/drivers/arm/gic_common.h
index a9ec7b764..3ac1b43ff 100644
--- a/include/drivers/arm/gic_common.h
+++ b/include/drivers/arm/gic_common.h
@@ -7,7 +7,7 @@
#ifndef GIC_COMMON_H
#define GIC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* GIC Distributor interface general definitions
diff --git a/include/drivers/arm/gicv2.h b/include/drivers/arm/gicv2.h
index 705077ce3..6bc5101d1 100644
--- a/include/drivers/arm/gicv2.h
+++ b/include/drivers/arm/gicv2.h
@@ -7,7 +7,7 @@
#ifndef GICV2_H
#define GICV2_H
-#include <gic_common.h>
+#include <drivers/arm/gic_common.h>
/*******************************************************************************
* GICv2 miscellaneous definitions
@@ -119,9 +119,10 @@
#ifndef __ASSEMBLY__
#include <cdefs.h>
-#include <interrupt_props.h>
#include <stdint.h>
+#include <common/interrupt_props.h>
+
/*******************************************************************************
* This structure describes some of the implementation defined attributes of
* the GICv2 IP. It is used by the platform port to specify these attributes
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index c26f2975a..238269774 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -209,12 +209,13 @@
#ifndef __ASSEMBLY__
-#include <arch_helpers.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <arch_helpers.h>
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
static inline bool gicv3_is_intr_id_special_identifier(unsigned int id)
{
diff --git a/include/drivers/arm/pl011.h b/include/drivers/arm/pl011.h
index 6216a61fc..f201f0048 100644
--- a/include/drivers/arm/pl011.h
+++ b/include/drivers/arm/pl011.h
@@ -7,7 +7,7 @@
#ifndef PL011_H
#define PL011_H
-#include <console.h>
+#include <drivers/console.h>
/* PL011 Registers */
#define UARTDR 0x000
diff --git a/include/drivers/arm/pl061_gpio.h b/include/drivers/arm/pl061_gpio.h
index 6c4a9f5a5..68238c9ab 100644
--- a/include/drivers/arm/pl061_gpio.h
+++ b/include/drivers/arm/pl061_gpio.h
@@ -7,7 +7,7 @@
#ifndef PL061_GPIO_H
#define PL061_GPIO_H
-#include <gpio.h>
+#include <drivers/gpio.h>
void pl061_gpio_register(uintptr_t base_addr, int gpio_dev);
void pl061_gpio_init(void);
diff --git a/include/drivers/arm/smmu_v3.h b/include/drivers/arm/smmu_v3.h
index 1b7ffb8db..33f3d6fcf 100644
--- a/include/drivers/arm/smmu_v3.h
+++ b/include/drivers/arm/smmu_v3.h
@@ -8,7 +8,8 @@
#define SMMU_V3_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* SMMUv3 register offsets from device base */
#define SMMU_S_IDR1 U(0x8004)
diff --git a/include/drivers/arm/sp804_delay_timer.h b/include/drivers/arm/sp804_delay_timer.h
index 8eb8715ae..f8769e836 100644
--- a/include/drivers/arm/sp804_delay_timer.h
+++ b/include/drivers/arm/sp804_delay_timer.h
@@ -7,9 +7,9 @@
#ifndef SP804_DELAY_TIMER_H
#define SP804_DELAY_TIMER_H
-#include <delay_timer.h>
#include <stdint.h>
+#include <drivers/delay_timer.h>
uint32_t sp804_get_timer_value(void);
diff --git a/include/drivers/arm/sp805.h b/include/drivers/arm/sp805.h
index e7714a393..551bfe4ba 100644
--- a/include/drivers/arm/sp805.h
+++ b/include/drivers/arm/sp805.h
@@ -7,7 +7,7 @@
#ifndef SP805_H
#define SP805_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SP805 register offset */
#define SP805_WDOG_LOAD_OFF UL(0x000)
diff --git a/include/drivers/arm/tzc380.h b/include/drivers/arm/tzc380.h
index 19cf98831..03b9b054e 100644
--- a/include/drivers/arm/tzc380.h
+++ b/include/drivers/arm/tzc380.h
@@ -7,8 +7,8 @@
#ifndef TZC380_H
#define TZC380_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define TZC380_CONFIGURATION_OFF U(0x000)
#define ACTION_OFF U(0x004)
diff --git a/include/drivers/arm/tzc400.h b/include/drivers/arm/tzc400.h
index a7bb3f648..98ef0ec1e 100644
--- a/include/drivers/arm/tzc400.h
+++ b/include/drivers/arm/tzc400.h
@@ -7,8 +7,8 @@
#ifndef TZC400_H
#define TZC400_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define BUILD_CONFIG_OFF U(0x000)
#define GATE_KEEPER_OFF U(0x008)
diff --git a/include/drivers/arm/tzc_common.h b/include/drivers/arm/tzc_common.h
index 4b8154788..4820baa1a 100644
--- a/include/drivers/arm/tzc_common.h
+++ b/include/drivers/arm/tzc_common.h
@@ -7,7 +7,7 @@
#ifndef TZC_COMMON_H
#define TZC_COMMON_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*
* Offset of core registers from the start of the base of configuration
diff --git a/include/drivers/arm/tzc_dmc500.h b/include/drivers/arm/tzc_dmc500.h
index df6e7f949..24bfaeb14 100644
--- a/include/drivers/arm/tzc_dmc500.h
+++ b/include/drivers/arm/tzc_dmc500.h
@@ -7,8 +7,8 @@
#ifndef TZC_DMC500_H
#define TZC_DMC500_H
-#include <tzc_common.h>
-#include <utils_def.h>
+#include <drivers/arm/tzc_common.h>
+#include <lib/utils_def.h>
#define SI_STATUS_OFFSET U(0x000)
#define SI_STATE_CTRL_OFFSET U(0x030)
diff --git a/include/drivers/arm/tzc_dmc620.h b/include/drivers/arm/tzc_dmc620.h
index 074bbc122..e0e6760b2 100644
--- a/include/drivers/arm/tzc_dmc620.h
+++ b/include/drivers/arm/tzc_dmc620.h
@@ -7,7 +7,7 @@
#ifndef TZC_DMC620_H
#define TZC_DMC620_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DMC-620 memc register offsets */
#define DMC620_MEMC_STATUS U(0x0000)
diff --git a/include/drivers/auth/auth_mod.h b/include/drivers/auth/auth_mod.h
index 19bc2f135..908995391 100644
--- a/include/drivers/auth/auth_mod.h
+++ b/include/drivers/auth/auth_mod.h
@@ -9,10 +9,10 @@
#if TRUSTED_BOARD_BOOT
-#include <auth_common.h>
-#include <cot_def.h>
-#include <img_parser_mod.h>
-#include <tbbr_img_def.h>
+#include <common/tbbr/cot_def.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/auth/auth_common.h>
+#include <drivers/auth/img_parser_mod.h>
/*
* Image flags
diff --git a/include/drivers/auth/img_parser_mod.h b/include/drivers/auth/img_parser_mod.h
index 43796935a..b2fb60ed1 100644
--- a/include/drivers/auth/img_parser_mod.h
+++ b/include/drivers/auth/img_parser_mod.h
@@ -7,7 +7,7 @@
#ifndef IMG_PARSER_MOD_H
#define IMG_PARSER_MOD_H
-#include <auth_common.h>
+#include <drivers/auth/auth_common.h>
/*
* Return values
diff --git a/include/drivers/cadence/cdns_uart.h b/include/drivers/cadence/cdns_uart.h
index 490be108e..0a1cf7781 100644
--- a/include/drivers/cadence/cdns_uart.h
+++ b/include/drivers/cadence/cdns_uart.h
@@ -7,7 +7,7 @@
#ifndef CDNS_UART_H
#define CDNS_UART_H
-#include <console.h>
+#include <drivers/console.h>
/* This is very minimalistic and will only work in QEMU. */
diff --git a/include/drivers/console.h b/include/drivers/console.h
index 02f2f8a2d..24887f908 100644
--- a/include/drivers/console.h
+++ b/include/drivers/console.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_H
#define CONSOLE_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define CONSOLE_T_NEXT (U(0) * REGSZ)
#define CONSOLE_T_FLAGS (U(1) * REGSZ)
@@ -44,7 +44,9 @@ typedef struct console {
int (*const flush)(struct console *console);
/* Additional private driver data may follow here. */
} console_t;
-#include <console_assertions.h> /* offset macro assertions for console_t */
+
+/* offset macro assertions for console_t */
+#include <drivers/console_assertions.h>
/*
* NOTE: There is no publicly accessible console_register() function. Consoles
diff --git a/include/drivers/console_assertions.h b/include/drivers/console_assertions.h
index 559bb5096..00caa3141 100644
--- a/include/drivers/console_assertions.h
+++ b/include/drivers/console_assertions.h
@@ -7,7 +7,7 @@
#ifndef CONSOLE_ASSERTIONS_H
#define CONSOLE_ASSERTIONS_H
-#include <cassert.h>
+#include <lib/cassert.h>
/*
* This file contains some separate assertions about console_t, moved here to
diff --git a/include/drivers/coreboot/cbmem_console.h b/include/drivers/coreboot/cbmem_console.h
index 7fe7a72da..40c90e6bb 100644
--- a/include/drivers/coreboot/cbmem_console.h
+++ b/include/drivers/coreboot/cbmem_console.h
@@ -7,7 +7,7 @@
#ifndef CBMEM_CONSOLE_H
#define CBMEM_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_CBMC_BASE CONSOLE_T_DRVDATA
#define CONSOLE_T_CBMC_SIZE (CONSOLE_T_DRVDATA + REGSZ)
diff --git a/include/drivers/io/io_block.h b/include/drivers/io/io_block.h
index d6d32f9b7..c99e8c7c6 100644
--- a/include/drivers/io/io_block.h
+++ b/include/drivers/io/io_block.h
@@ -7,7 +7,7 @@
#ifndef IO_BLOCK_H
#define IO_BLOCK_H
-#include <io_storage.h>
+#include <drivers/io/io_storage.h>
/* block devices ops */
typedef struct io_block_ops {
diff --git a/include/drivers/io/io_driver.h b/include/drivers/io/io_driver.h
index 587f137c5..2b704f491 100644
--- a/include/drivers/io/io_driver.h
+++ b/include/drivers/io/io_driver.h
@@ -7,9 +7,9 @@
#ifndef IO_DRIVER_H
#define IO_DRIVER_H
-#include <io_storage.h>
#include <stdint.h>
+#include <drivers/io/io_storage.h>
/* Generic IO entity structure,representing an accessible IO construct on the
* device, such as a file */
diff --git a/include/drivers/io/io_storage.h b/include/drivers/io/io_storage.h
index c496d487e..ec6db3f2a 100644
--- a/include/drivers/io/io_storage.h
+++ b/include/drivers/io/io_storage.h
@@ -10,8 +10,8 @@
#include <errno.h>
#include <stdint.h>
#include <stdio.h> /* For ssize_t */
-#include <uuid.h>
+#include <tools_share/uuid.h>
/* Device type which can be used to enable policy decisions about which device
* to access */
diff --git a/include/drivers/marvell/ccu.h b/include/drivers/marvell/ccu.h
index 2757765bc..546d9f13b 100644
--- a/include/drivers/marvell/ccu.h
+++ b/include/drivers/marvell/ccu.h
@@ -11,7 +11,7 @@
#define CCU_H
#ifndef __ASSEMBLY__
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
#endif
/* CCU registers definitions */
diff --git a/include/drivers/marvell/gwin.h b/include/drivers/marvell/gwin.h
index 6b7f1752f..1b874a745 100644
--- a/include/drivers/marvell/gwin.h
+++ b/include/drivers/marvell/gwin.h
@@ -10,7 +10,7 @@
#ifndef GWIN_H
#define GWIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_gwin(int ap_index);
void gwin_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/io_win.h b/include/drivers/marvell/io_win.h
index 45e86666a..7438d6b4b 100644
--- a/include/drivers/marvell/io_win.h
+++ b/include/drivers/marvell/io_win.h
@@ -10,7 +10,7 @@
#ifndef IO_WIN_H
#define IO_WIN_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
int init_io_win(int ap_index);
void iow_temp_win_insert(int ap_index, struct addr_map_win *win, int size);
diff --git a/include/drivers/marvell/iob.h b/include/drivers/marvell/iob.h
index ccbdf960d..9b5e515a4 100644
--- a/include/drivers/marvell/iob.h
+++ b/include/drivers/marvell/iob.h
@@ -10,7 +10,7 @@
#ifndef IOB_H
#define IOB_H
-#include <addr_map.h>
+#include <drivers/marvell/addr_map.h>
enum target_ids_iob {
INTERNAL_TID = 0x0,
diff --git a/include/drivers/marvell/mochi/cp110_setup.h b/include/drivers/marvell/mochi/cp110_setup.h
index 18d9f1810..3686257d3 100644
--- a/include/drivers/marvell/mochi/cp110_setup.h
+++ b/include/drivers/marvell/mochi/cp110_setup.h
@@ -10,7 +10,8 @@
#ifndef CP110_SETUP_H
#define CP110_SETUP_H
-#include <mmio.h>
+#include <lib/mmio.h>
+
#include <mvebu_def.h>
#define MVEBU_DEVICE_ID_REG (MVEBU_CP_DFX_OFFSET + 0x40)
diff --git a/include/drivers/marvell/uart/a3700_console.h b/include/drivers/marvell/uart/a3700_console.h
index 01335a2a3..5511d96c4 100644
--- a/include/drivers/marvell/uart/a3700_console.h
+++ b/include/drivers/marvell/uart/a3700_console.h
@@ -8,7 +8,7 @@
#ifndef A3700_CONSOLE_H
#define A3700_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
/* MVEBU UART Registers */
#define UART_RX_REG 0x00
diff --git a/include/drivers/meson/meson_console.h b/include/drivers/meson/meson_console.h
index 759571dda..5da1e3fd4 100644
--- a/include/drivers/meson/meson_console.h
+++ b/include/drivers/meson/meson_console.h
@@ -7,7 +7,7 @@
#ifndef MESON_CONSOLE_H
#define MESON_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_MESON_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/mmc.h b/include/drivers/mmc.h
index a62928bc6..2aaa28d68 100644
--- a/include/drivers/mmc.h
+++ b/include/drivers/mmc.h
@@ -8,7 +8,8 @@
#define MMC_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
#define MMC_BLOCK_SIZE U(512)
#define MMC_BLOCK_MASK (MMC_BLOCK_SIZE - U(1))
diff --git a/include/drivers/partition/gpt.h b/include/drivers/partition/gpt.h
index 7984e4d80..3ae160fdc 100644
--- a/include/drivers/partition/gpt.h
+++ b/include/drivers/partition/gpt.h
@@ -7,7 +7,7 @@
#ifndef GPT_H
#define GPT_H
-#include <partition.h>
+#include <drivers/partition/partition.h>
#define PARTITION_TYPE_GPT 0xee
#define GPT_HEADER_OFFSET PARTITION_BLOCK_SIZE
diff --git a/include/drivers/partition/partition.h b/include/drivers/partition/partition.h
index 2aeaace9f..d94c7824a 100644
--- a/include/drivers/partition/partition.h
+++ b/include/drivers/partition/partition.h
@@ -7,9 +7,10 @@
#ifndef PARTITION_H
#define PARTITION_H
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
#if !PLAT_PARTITION_MAX_ENTRIES
# define PLAT_PARTITION_MAX_ENTRIES 128
#endif /* PLAT_PARTITION_MAX_ENTRIES */
diff --git a/include/drivers/st/io_mmc.h b/include/drivers/st/io_mmc.h
index de71e7d8a..b35b4b5d0 100644
--- a/include/drivers/st/io_mmc.h
+++ b/include/drivers/st/io_mmc.h
@@ -7,7 +7,7 @@
#ifndef IO_MMC_H
#define IO_MMC_H
-#include <io_driver.h>
+#include <drivers/io/io_driver.h>
int register_io_dev_mmc(const io_dev_connector_t **dev_con);
diff --git a/include/drivers/st/io_stm32image.h b/include/drivers/st/io_stm32image.h
index b66821960..68060558b 100644
--- a/include/drivers/st/io_stm32image.h
+++ b/include/drivers/st/io_stm32image.h
@@ -7,8 +7,8 @@
#ifndef IO_STM32IMAGE_H
#define IO_STM32IMAGE_H
-#include <io_driver.h>
-#include <partition.h>
+#include <drivers/io/io_driver.h>
+#include <drivers/partition/partition.h>
#define MAX_LBA_SIZE 512
#define MAX_PART_NAME_SIZE (EFI_NAMELEN + 1)
diff --git a/include/drivers/st/stm32_console.h b/include/drivers/st/stm32_console.h
index 57e6d7409..b30376828 100644
--- a/include/drivers/st/stm32_console.h
+++ b/include/drivers/st/stm32_console.h
@@ -7,7 +7,7 @@
#ifndef STM32_CONSOLE_H
#define STM32_CONSOLE_H
-#include <console.h>
+#include <drivers/console.h>
#define CONSOLE_T_STM32_BASE CONSOLE_T_DRVDATA
diff --git a/include/drivers/st/stm32_gpio.h b/include/drivers/st/stm32_gpio.h
index 938922b48..acd95ecab 100644
--- a/include/drivers/st/stm32_gpio.h
+++ b/include/drivers/st/stm32_gpio.h
@@ -7,7 +7,7 @@
#ifndef STM32_GPIO_H
#define STM32_GPIO_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define STM32_GPIOA_BANK U(0x50002000)
#define STM32_GPIOZ_BANK U(0x54004000)
diff --git a/include/drivers/st/stm32_i2c.h b/include/drivers/st/stm32_i2c.h
index 4760c00fe..de2ca59c8 100644
--- a/include/drivers/st/stm32_i2c.h
+++ b/include/drivers/st/stm32_i2c.h
@@ -8,7 +8,8 @@
#define STM32_I2C_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Bit definition for I2C_CR1 register */
#define I2C_CR1_PE BIT(0)
diff --git a/include/drivers/st/stm32_sdmmc2.h b/include/drivers/st/stm32_sdmmc2.h
index b17265926..aa9472c83 100644
--- a/include/drivers/st/stm32_sdmmc2.h
+++ b/include/drivers/st/stm32_sdmmc2.h
@@ -7,9 +7,10 @@
#ifndef STM32_SDMMC2_H
#define STM32_SDMMC2_H
-#include <mmc.h>
#include <stdbool.h>
+#include <drivers/mmc.h>
+
struct stm32_sdmmc2_params {
uintptr_t reg_base;
unsigned int clk_rate;
diff --git a/include/drivers/st/stm32_uart_regs.h b/include/drivers/st/stm32_uart_regs.h
index e78d3d481..14b296c4b 100644
--- a/include/drivers/st/stm32_uart_regs.h
+++ b/include/drivers/st/stm32_uart_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32_UART_REGS_H
#define STM32_UART_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define USART_CR1 U(0x00)
#define USART_CR2 U(0x04)
diff --git a/include/drivers/st/stm32mp1_clk.h b/include/drivers/st/stm32mp1_clk.h
index c89551725..5594e2327 100644
--- a/include/drivers/st/stm32mp1_clk.h
+++ b/include/drivers/st/stm32mp1_clk.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLK_H
#define STM32MP1_CLK_H
-#include <arch_helpers.h>
#include <stdbool.h>
+#include <arch_helpers.h>
+
int stm32mp1_clk_probe(void);
int stm32mp1_clk_init(void);
bool stm32mp1_clk_is_enabled(unsigned long id);
diff --git a/include/drivers/st/stm32mp1_clkfunc.h b/include/drivers/st/stm32mp1_clkfunc.h
index 2467af9bb..106dcae01 100644
--- a/include/drivers/st/stm32mp1_clkfunc.h
+++ b/include/drivers/st/stm32mp1_clkfunc.h
@@ -7,9 +7,10 @@
#ifndef STM32MP1_CLKFUNC_H
#define STM32MP1_CLKFUNC_H
-#include <libfdt.h>
#include <stdbool.h>
+#include <libfdt.h>
+
enum stm32mp_osc_id {
_HSI,
_HSE,
diff --git a/include/drivers/st/stm32mp1_ddr_regs.h b/include/drivers/st/stm32mp1_ddr_regs.h
index 288e072d2..bfcd5e210 100644
--- a/include/drivers/st/stm32mp1_ddr_regs.h
+++ b/include/drivers/st/stm32mp1_ddr_regs.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_DDR_REGS_H
#define STM32MP1_DDR_REGS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* DDR3/LPDDR2/LPDDR3 Controller (DDRCTRL) registers */
struct stm32mp1_ddrctl {
diff --git a/include/drivers/st/stm32mp1_pmic.h b/include/drivers/st/stm32mp1_pmic.h
index cc80b25ab..256e340be 100644
--- a/include/drivers/st/stm32mp1_pmic.h
+++ b/include/drivers/st/stm32mp1_pmic.h
@@ -9,6 +9,8 @@
#include <stdbool.h>
+#include <stm32mp1_def.h>
+
bool dt_check_pmic(void);
int dt_pmic_enable_boot_on_regulators(void);
void initialize_pmic_i2c(void);
diff --git a/include/drivers/st/stm32mp1_pwr.h b/include/drivers/st/stm32mp1_pwr.h
index b34536eae..e17df44fb 100644
--- a/include/drivers/st/stm32mp1_pwr.h
+++ b/include/drivers/st/stm32mp1_pwr.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_PWR_H
#define STM32MP1_PWR_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define PWR_CR1 U(0x00)
#define PWR_CR2 U(0x08)
diff --git a/include/drivers/st/stm32mp1_rcc.h b/include/drivers/st/stm32mp1_rcc.h
index 87f4d7f73..fd406c57e 100644
--- a/include/drivers/st/stm32mp1_rcc.h
+++ b/include/drivers/st/stm32mp1_rcc.h
@@ -7,7 +7,7 @@
#ifndef STM32MP1_RCC_H
#define STM32MP1_RCC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define RCC_TZCR U(0x00)
#define RCC_OCENSETR U(0x0C)
diff --git a/include/drivers/st/stpmu1.h b/include/drivers/st/stpmu1.h
index 4bbcebbec..e75d9a66b 100644
--- a/include/drivers/st/stpmu1.h
+++ b/include/drivers/st/stpmu1.h
@@ -7,8 +7,8 @@
#ifndef STPMU1_H
#define STPMU1_H
-#include <stm32_i2c.h>
-#include <utils_def.h>
+#include <drivers/st/stm32_i2c.h>
+#include <lib/utils_def.h>
#define TURN_ON_REG 0x1U
#define TURN_OFF_REG 0x2U
diff --git a/include/drivers/synopsys/dw_mmc.h b/include/drivers/synopsys/dw_mmc.h
index 533a876fc..7031e0f46 100644
--- a/include/drivers/synopsys/dw_mmc.h
+++ b/include/drivers/synopsys/dw_mmc.h
@@ -7,7 +7,7 @@
#ifndef DW_MMC_H
#define DW_MMC_H
-#include <mmc.h>
+#include <drivers/mmc.h>
typedef struct dw_mmc_params {
uintptr_t reg_base;
diff --git a/include/drivers/ti/uart/uart_16550.h b/include/drivers/ti/uart/uart_16550.h
index ad80c5772..92b1ea8c3 100644
--- a/include/drivers/ti/uart/uart_16550.h
+++ b/include/drivers/ti/uart/uart_16550.h
@@ -7,7 +7,7 @@
#ifndef UART_16550_H
#define UART_16550_H
-#include <console.h>
+#include <drivers/console.h>
/* UART16550 Registers */
#define UARTTX 0x0
diff --git a/include/drivers/ufs.h b/include/drivers/ufs.h
index 414649bd4..a10cd8034 100644
--- a/include/drivers/ufs.h
+++ b/include/drivers/ufs.h
@@ -7,7 +7,7 @@
#ifndef UFS_H
#define UFS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* register map of UFSHCI */
/* Controller Capabilities */
diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h
index 2d1612e17..a2f540c62 100644
--- a/include/lib/bakery_lock.h
+++ b/include/lib/bakery_lock.h
@@ -15,7 +15,8 @@
#include <cdefs.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/*****************************************************************************
* Internal helpers used by the bakery lock implementation.
diff --git a/include/lib/cpus/aarch32/cortex_a57.h b/include/lib/cpus/aarch32/cortex_a57.h
index 6f60c1146..2ac1e17d8 100644
--- a/include/lib/cpus/aarch32/cortex_a57.h
+++ b/include/lib/cpus/aarch32/cortex_a57.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_A57_H
#define CORTEX_A57_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-A57 midr for revision 0 */
#define CORTEX_A57_MIDR 0x410FD070
diff --git a/include/lib/cpus/aarch32/cortex_a72.h b/include/lib/cpus/aarch32/cortex_a72.h
index f45865a39..95402d0a7 100644
--- a/include/lib/cpus/aarch32/cortex_a72.h
+++ b/include/lib/cpus/aarch32/cortex_a72.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A72_H
#define CORTEX_A72_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A72 midr for revision 0 */
#define CORTEX_A72_MIDR 0x410FD080
diff --git a/include/lib/cpus/aarch32/cpu_macros.S b/include/lib/cpus/aarch32/cpu_macros.S
index 1c0da0f2b..a5ae6a486 100644
--- a/include/lib/cpus/aarch32/cpu_macros.S
+++ b/include/lib/cpus/aarch32/cpu_macros.S
@@ -7,7 +7,7 @@
#define CPU_MACROS_S
#include <arch.h>
-#include <errata_report.h>
+#include <lib/cpus/errata_report.h>
#if defined(IMAGE_BL1) || defined(IMAGE_BL32) || (defined(IMAGE_BL2) && BL2_AT_EL3)
#define IMAGE_AT_EL3
diff --git a/include/lib/cpus/aarch64/cortex_a57.h b/include/lib/cpus/aarch64/cortex_a57.h
index 71d07db5f..5b6c9dd29 100644
--- a/include/lib/cpus/aarch64/cortex_a57.h
+++ b/include/lib/cpus/aarch64/cortex_a57.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A57_H
#define CORTEX_A57_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A57 midr for revision 0 */
#define CORTEX_A57_MIDR U(0x410FD070)
diff --git a/include/lib/cpus/aarch64/cortex_a72.h b/include/lib/cpus/aarch64/cortex_a72.h
index 4eafc11e1..60b6c6190 100644
--- a/include/lib/cpus/aarch64/cortex_a72.h
+++ b/include/lib/cpus/aarch64/cortex_a72.h
@@ -6,7 +6,8 @@
#ifndef CORTEX_A72_H
#define CORTEX_A72_H
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Cortex-A72 midr for revision 0 */
#define CORTEX_A72_MIDR 0x410FD080
diff --git a/include/lib/cpus/aarch64/cortex_a75.h b/include/lib/cpus/aarch64/cortex_a75.h
index f68f98f63..fabc1afdc 100644
--- a/include/lib/cpus/aarch64/cortex_a75.h
+++ b/include/lib/cpus/aarch64/cortex_a75.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_A75_H
#define CORTEX_A75_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-A75 MIDR */
#define CORTEX_A75_MIDR U(0x410fd0a0)
diff --git a/include/lib/cpus/aarch64/cortex_ares.h b/include/lib/cpus/aarch64/cortex_ares.h
index 4f3e81296..cfc36e473 100644
--- a/include/lib/cpus/aarch64/cortex_ares.h
+++ b/include/lib/cpus/aarch64/cortex_ares.h
@@ -7,7 +7,7 @@
#ifndef CORTEX_ARES_H
#define CORTEX_ARES_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* Cortex-ARES MIDR for revision 0 */
#define CORTEX_ARES_MIDR U(0x410fd0c0)
diff --git a/include/lib/cpus/aarch64/cpu_macros.S b/include/lib/cpus/aarch64/cpu_macros.S
index 287570054..b907668b3 100644
--- a/include/lib/cpus/aarch64/cpu_macros.S
+++ b/include/lib/cpus/aarch64/cpu_macros.S
@@ -7,7 +7,7 @@
#define CPU_MACROS_S
#include <arch.h>
-#include <errata_report.h>
+#include <lib/cpus/errata_report.h>
#define CPU_IMPL_PN_MASK (MIDR_IMPL_MASK << MIDR_IMPL_SHIFT) | \
(MIDR_PN_MASK << MIDR_PN_SHIFT)
diff --git a/include/lib/cpus/aarch64/dsu_def.h b/include/lib/cpus/aarch64/dsu_def.h
index 0e2d93a8c..aa8b1b1ab 100644
--- a/include/lib/cpus/aarch64/dsu_def.h
+++ b/include/lib/cpus/aarch64/dsu_def.h
@@ -7,7 +7,7 @@
#ifndef DSU_DEF_H
#define DSU_DEF_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/********************************************************************
* DSU control registers definitions *
diff --git a/include/lib/cpus/errata_report.h b/include/lib/cpus/errata_report.h
index c97d4c247..17b2c30f8 100644
--- a/include/lib/cpus/errata_report.h
+++ b/include/lib/cpus/errata_report.h
@@ -11,8 +11,8 @@
#include <arch.h>
#include <arch_helpers.h>
-#include <spinlock.h>
-#include <utils_def.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
#if DEBUG
void print_errata_status(void);
diff --git a/include/lib/el3_runtime/aarch32/context.h b/include/lib/el3_runtime/aarch32/context.h
index 1ea19ca7c..86ff53a67 100644
--- a/include/lib/el3_runtime/aarch32/context.h
+++ b/include/lib/el3_runtime/aarch32/context.h
@@ -7,7 +7,7 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants that allow assembler code to access members of and the 'regs'
@@ -26,9 +26,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
/*
* Common constants to help define the 'cpu_context' structure and its
* members below.
diff --git a/include/lib/el3_runtime/aarch64/context.h b/include/lib/el3_runtime/aarch64/context.h
index 8c5f4c68d..70c50aae2 100644
--- a/include/lib/el3_runtime/aarch64/context.h
+++ b/include/lib/el3_runtime/aarch64/context.h
@@ -7,7 +7,7 @@
#ifndef CONTEXT_H
#define CONTEXT_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Constants that allow assembler code to access members of and the 'gp_regs'
@@ -180,10 +180,12 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
-#include <platform_def.h> /* for CACHE_WRITEBACK_GRANULE */
#include <stdint.h>
+#include <platform_def.h> /* for CACHE_WRITEBACK_GRANULE */
+
+#include <lib/cassert.h>
+
/*
* Common constants to help define the 'cpu_context' structure and its
* members below.
diff --git a/include/lib/el3_runtime/context_mgmt.h b/include/lib/el3_runtime/context_mgmt.h
index 149ac3ffd..f23f9cd44 100644
--- a/include/lib/el3_runtime/context_mgmt.h
+++ b/include/lib/el3_runtime/context_mgmt.h
@@ -7,11 +7,12 @@
#ifndef CONTEXT_MGMT_H
#define CONTEXT_MGMT_H
-#include <arch.h>
#include <assert.h>
#include <context.h>
#include <stdint.h>
+#include <arch.h>
+
/*******************************************************************************
* Forward declarations
******************************************************************************/
diff --git a/include/lib/el3_runtime/cpu_data.h b/include/lib/el3_runtime/cpu_data.h
index 561f8beed..9e1d7f16c 100644
--- a/include/lib/el3_runtime/cpu_data.h
+++ b/include/lib/el3_runtime/cpu_data.h
@@ -7,9 +7,10 @@
#ifndef CPU_DATA_H
#define CPU_DATA_H
-#include <ehf.h>
#include <platform_def.h> /* CACHE_WRITEBACK_GRANULE required */
+#include <bl31/ehf.h>
+
#ifdef AARCH32
#if CRASH_REPORTING
@@ -51,9 +52,9 @@
#ifndef __ASSEMBLY__
#include <arch_helpers.h>
-#include <cassert.h>
+#include <lib/cassert.h>
+#include <lib/psci/psci.h>
#include <platform_def.h>
-#include <psci.h>
#include <stdint.h>
/* Offsets for the cpu_data structure */
diff --git a/include/lib/el3_runtime/pubsub.h b/include/lib/el3_runtime/pubsub.h
index 930952ff8..eb9128656 100644
--- a/include/lib/el3_runtime/pubsub.h
+++ b/include/lib/el3_runtime/pubsub.h
@@ -30,11 +30,12 @@
/* For the compiler ... */
-#include <arch_helpers.h>
#include <assert.h>
#include <cdefs.h>
#include <stddef.h>
+#include <arch_helpers.h>
+
#define __pubsub_section(event) __section("__pubsub_" #event)
/*
diff --git a/include/lib/el3_runtime/pubsub_events.h b/include/lib/el3_runtime/pubsub_events.h
index 64b3f630c..8e4a87afd 100644
--- a/include/lib/el3_runtime/pubsub_events.h
+++ b/include/lib/el3_runtime/pubsub_events.h
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
-#include <pubsub.h>
+#include <lib/el3_runtime/pubsub.h>
/*
* This file defines a list of pubsub events, declared using
diff --git a/include/lib/extensions/amu.h b/include/lib/extensions/amu.h
index 1836fe5ae..99ecfccbb 100644
--- a/include/lib/extensions/amu.h
+++ b/include/lib/extensions/amu.h
@@ -7,11 +7,13 @@
#ifndef AMU_H
#define AMU_H
-#include <cassert.h>
-#include <platform_def.h>
#include <stdbool.h>
#include <stdint.h>
-#include <utils_def.h>
+
+#include <platform_def.h>
+
+#include <lib/cassert.h>
+#include <lib/utils_def.h>
/* All group 0 counters */
#define AMU_GROUP0_COUNTERS_MASK U(0xf)
diff --git a/include/lib/extensions/ras.h b/include/lib/extensions/ras.h
index 62fd63f93..9f6b2905f 100644
--- a/include/lib/extensions/ras.h
+++ b/include/lib/extensions/ras.h
@@ -71,7 +71,8 @@
#ifndef __ASSEMBLY__
#include <assert.h>
-#include <ras_arch.h>
+
+#include <lib/extensions/ras_arch.h>
struct err_record_info;
diff --git a/include/lib/extensions/ras_arch.h b/include/lib/extensions/ras_arch.h
index e6cd736ae..e9375a356 100644
--- a/include/lib/extensions/ras_arch.h
+++ b/include/lib/extensions/ras_arch.h
@@ -184,7 +184,7 @@
#include <arch_helpers.h>
#include <assert.h>
#include <context.h>
-#include <mmio.h>
+#include <lib/mmio.h>
#include <stdint.h>
/*
diff --git a/include/lib/libc/assert.h b/include/lib/libc/assert.h
index 2cca6a0b2..d04f9dc04 100644
--- a/include/lib/libc/assert.h
+++ b/include/lib/libc/assert.h
@@ -8,9 +8,11 @@
#define ASSERT_H
#include <cdefs.h>
-#include <debug.h>
+
#include <platform_def.h>
+#include <common/debug.h>
+
#ifndef PLAT_LOG_LEVEL_ASSERT
#define PLAT_LOG_LEVEL_ASSERT LOG_LEVEL
#endif
diff --git a/include/lib/object_pool.h b/include/lib/object_pool.h
index 7d40b41d8..0f85331a8 100644
--- a/include/lib/object_pool.h
+++ b/include/lib/object_pool.h
@@ -7,9 +7,10 @@
#ifndef OBJECT_POOL_H
#define OBJECT_POOL_H
-#include <debug.h>
#include <stdlib.h>
-#include <utils_def.h>
+
+#include <common/debug.h>
+#include <lib/utils_def.h>
/*
* Pool of statically allocated objects.
diff --git a/include/lib/optee_utils.h b/include/lib/optee_utils.h
index b13c4504f..6067caff4 100644
--- a/include/lib/optee_utils.h
+++ b/include/lib/optee_utils.h
@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
+
#ifndef OPTEE_UTILS_H
#define OPTEE_UTILS_H
-#include <bl_common.h>
+#include <common/bl_common.h>
int parse_optee_header(entry_point_info_t *header_ep,
image_info_t *pager_image_info,
diff --git a/include/lib/pmf/pmf.h b/include/lib/pmf/pmf.h
index 18ef0a559..df7c9ff31 100644
--- a/include/lib/pmf/pmf.h
+++ b/include/lib/pmf/pmf.h
@@ -7,9 +7,9 @@
#ifndef PMF_H
#define PMF_H
-#include <cassert.h>
-#include <pmf_helpers.h>
-#include <utils_def.h>
+#include <lib/cassert.h>
+#include <lib/pmf/pmf_helpers.h>
+#include <lib/utils_def.h>
/*
* Constants used for/by PMF services.
diff --git a/include/lib/pmf/pmf_helpers.h b/include/lib/pmf/pmf_helpers.h
index c535b222d..e6798a7ce 100644
--- a/include/lib/pmf/pmf_helpers.h
+++ b/include/lib/pmf/pmf_helpers.h
@@ -7,13 +7,14 @@
#ifndef PMF_HELPERS_H
#define PMF_HELPERS_H
-#include <arch_helpers.h>
#include <assert.h>
-#include <bl_common.h>
-#include <platform.h>
#include <stddef.h>
#include <stdint.h>
+#include <arch_helpers.h>
+#include <common/bl_common.h>
+#include <plat/common/platform.h>
+
/*
* Prototype for PMF service functions.
*/
diff --git a/include/lib/psci/psci.h b/include/lib/psci/psci.h
index b7febc38f..fe279d4f2 100644
--- a/include/lib/psci/psci.h
+++ b/include/lib/psci/psci.h
@@ -7,11 +7,12 @@
#ifndef PSCI_H
#define PSCI_H
-#include <bakery_lock.h>
-#include <bl_common.h>
#include <platform_def.h> /* for PLAT_NUM_PWR_DOMAINS */
-#include <psci_lib.h> /* To maintain compatibility for SPDs */
-#include <utils_def.h>
+
+#include <common/bl_common.h>
+#include <lib/bakery_lock.h>
+#include <lib/psci/psci_lib.h> /* To maintain compatibility for SPDs */
+#include <lib/utils_def.h>
/*******************************************************************************
* Number of power domains whose state this PSCI implementation can track
diff --git a/include/lib/psci/psci_lib.h b/include/lib/psci/psci_lib.h
index 134cad9e0..53d7711b1 100644
--- a/include/lib/psci/psci_lib.h
+++ b/include/lib/psci/psci_lib.h
@@ -7,9 +7,10 @@
#ifndef PSCI_LIB_H
#define PSCI_LIB_H
-#include <ep_info.h>
+#include <common/ep_info.h>
#ifndef __ASSEMBLY__
+
#include <cdefs.h>
#include <stdint.h>
diff --git a/include/lib/runtime_instr.h b/include/lib/runtime_instr.h
index cb648391e..f5a3f1386 100644
--- a/include/lib/runtime_instr.h
+++ b/include/lib/runtime_instr.h
@@ -7,7 +7,7 @@
#ifndef RUNTIME_INSTR_H
#define RUNTIME_INSTR_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define RT_INSTR_ENTER_PSCI U(0)
#define RT_INSTR_EXIT_PSCI U(1)
diff --git a/include/lib/smccc.h b/include/lib/smccc.h
index 6ee8aa07d..b10c52ce9 100644
--- a/include/lib/smccc.h
+++ b/include/lib/smccc.h
@@ -7,7 +7,7 @@
#ifndef SMCCC_H
#define SMCCC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define SMCCC_VERSION_MAJOR_SHIFT U(16)
#define SMCCC_VERSION_MAJOR_MASK U(0x7FFF)
@@ -21,10 +21,10 @@
#if SMCCC_MAJOR_VERSION == 1
# define SMCCC_MINOR_VERSION U(1)
-# include <smccc_v1.h>
+# include <lib/smccc_v1.h>
#elif SMCCC_MAJOR_VERSION == 2
# define SMCCC_MINOR_VERSION U(0)
-# include <smccc_v2.h>
+# include <lib/smccc_v2.h>
#else
# error "Unsupported version of SMCCC."
#endif
@@ -35,9 +35,10 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
#include <stdint.h>
+#include <lib/cassert.h>
+
#define is_caller_non_secure(_f) (((_f) & SMC_FROM_NON_SECURE) != U(0))
#define is_caller_secure(_f) (!is_caller_non_secure(_f))
diff --git a/include/lib/utils.h b/include/lib/utils.h
index b6ab26ec7..674845404 100644
--- a/include/lib/utils.h
+++ b/include/lib/utils.h
@@ -13,6 +13,7 @@
*/
#if !(defined(__LINKER__) || defined(__ASSEMBLY__))
+#include <stddef.h>
#include <stdint.h>
typedef struct mem_region {
diff --git a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h b/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
index 37f3b53b7..a333d1e4e 100644
--- a/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
+++ b/include/lib/xlat_tables/aarch32/xlat_tables_aarch32.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH32_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
diff --git a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h b/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
index 91ca8e477..cc5624c91 100644
--- a/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
+++ b/include/lib/xlat_tables/aarch64/xlat_tables_aarch64.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH64_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
diff --git a/include/lib/xlat_tables/xlat_tables.h b/include/lib/xlat_tables/xlat_tables.h
index 050679d94..9e2543fbb 100644
--- a/include/lib/xlat_tables/xlat_tables.h
+++ b/include/lib/xlat_tables/xlat_tables.h
@@ -7,12 +7,13 @@
#ifndef XLAT_TABLES_H
#define XLAT_TABLES_H
-#include <xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
-#include <xlat_mmu_helpers.h>
+
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Helper macro to define entries for mmap_region_t. It creates
* identity mappings for each region.
diff --git a/include/lib/xlat_tables/xlat_tables_compat.h b/include/lib/xlat_tables/xlat_tables_compat.h
index 4650a8c6f..90768db5d 100644
--- a/include/lib/xlat_tables/xlat_tables_compat.h
+++ b/include/lib/xlat_tables/xlat_tables_compat.h
@@ -5,7 +5,7 @@
*/
#if XLAT_TABLES_LIB_V2
-#include <xlat_tables_v2.h>
+#include <lib/xlat_tables/xlat_tables_v2.h>
#else
-#include <xlat_tables.h>
+#include <lib/xlat_tables/xlat_tables.h>
#endif
diff --git a/include/lib/xlat_tables/xlat_tables_defs.h b/include/lib/xlat_tables/xlat_tables_defs.h
index 09baae9bf..6d0fb7896 100644
--- a/include/lib/xlat_tables/xlat_tables_defs.h
+++ b/include/lib/xlat_tables/xlat_tables_defs.h
@@ -8,8 +8,8 @@
#define XLAT_TABLES_DEFS_H
#include <arch.h>
-#include <utils_def.h>
-#include <xlat_mmu_helpers.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Miscellaneous MMU related constants */
#define NUM_2MB_IN_GB (U(1) << 9)
diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h
index 5c4edc31a..555142683 100644
--- a/include/lib/xlat_tables/xlat_tables_v2.h
+++ b/include/lib/xlat_tables/xlat_tables_v2.h
@@ -7,13 +7,14 @@
#ifndef XLAT_TABLES_V2_H
#define XLAT_TABLES_V2_H
-#include <xlat_tables_defs.h>
-#include <xlat_tables_v2_helpers.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_v2_helpers.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
-#include <xlat_mmu_helpers.h>
+
+#include <lib/xlat_tables/xlat_mmu_helpers.h>
/*
* Default granularity size for an mmap_region_t.
diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
index fa8995886..ce5cf820a 100644
--- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h
+++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
@@ -18,12 +18,14 @@
#ifndef __ASSEMBLY__
-#include <cassert.h>
-#include <platform_def.h>
#include <stdbool.h>
#include <stddef.h>
-#include <xlat_tables_arch.h>
-#include <xlat_tables_defs.h>
+
+#include <platform_def.h>
+
+#include <lib/cassert.h>
+#include <lib/xlat_tables/xlat_tables_arch.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
/* Forward declaration */
struct mmap_region;
diff --git a/include/plat/arm/board/common/board_css_def.h b/include/plat/arm/board/common/board_css_def.h
index 29211be2a..6cca38909 100644
--- a/include/plat/arm/board/common/board_css_def.h
+++ b/include/plat/arm/board/common/board_css_def.h
@@ -7,9 +7,10 @@
#ifndef BOARD_CSS_DEF_H
#define BOARD_CSS_DEF_H
-#include <common_def.h>
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
+
#include <soc_css_def.h>
-#include <utils_def.h>
#include <v2m_def.h>
/*
@@ -31,7 +32,7 @@
#ifndef __ASSEMBLY__
-#include <mmio.h>
+#include <lib/mmio.h>
#define BOARD_CSS_GET_PLAT_TYPE(addr) \
((mmio_read_32(addr) & BOARD_CSS_PLAT_ID_REG_ID_MASK) \
diff --git a/include/plat/arm/board/common/v2m_def.h b/include/plat/arm/board/common/v2m_def.h
index ed57fc9a0..c5de407af 100644
--- a/include/plat/arm/board/common/v2m_def.h
+++ b/include/plat/arm/board/common/v2m_def.h
@@ -6,7 +6,7 @@
#ifndef V2M_DEF_H
#define V2M_DEF_H
-#include <xlat_tables_compat.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/* V2M motherboard system registers & offsets */
#define V2M_SYSREGS_BASE UL(0x1c010000)
diff --git a/include/plat/arm/common/aarch64/arm_macros.S b/include/plat/arm/common/aarch64/arm_macros.S
index c2ba7db9f..0bd0daf53 100644
--- a/include/plat/arm/common/aarch64/arm_macros.S
+++ b/include/plat/arm/common/aarch64/arm_macros.S
@@ -6,9 +6,9 @@
#ifndef ARM_MACROS_S
#define ARM_MACROS_S
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
.section .rodata.gic_reg_name, "aS"
diff --git a/include/plat/arm/common/aarch64/cci_macros.S b/include/plat/arm/common/aarch64/cci_macros.S
index 069dc854f..07f7cd39a 100644
--- a/include/plat/arm/common/aarch64/cci_macros.S
+++ b/include/plat/arm/common/aarch64/cci_macros.S
@@ -6,7 +6,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/arm/common/arm_config.h b/include/plat/arm/common/arm_config.h
index 4dda35060..c2b28df5b 100644
--- a/include/plat/arm/common/arm_config.h
+++ b/include/plat/arm/common/arm_config.h
@@ -7,7 +7,8 @@
#define ARM_CONFIG_H
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/* Whether Base memory map is in use */
#define ARM_CONFIG_BASE_MMAP BIT(1)
diff --git a/include/plat/arm/common/arm_def.h b/include/plat/arm/common/arm_def.h
index 4ab3a8086..c63fddb3f 100644
--- a/include/plat/arm/common/arm_def.h
+++ b/include/plat/arm/common/arm_def.h
@@ -6,15 +6,15 @@
#ifndef ARM_DEF_H
#define ARM_DEF_H
-#include <arch.h>
-#include <common_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+#include <arch.h>
+#include <common/interrupt_props.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <drivers/arm/gic_common.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all ARM standard platforms
diff --git a/include/plat/arm/common/arm_sip_svc.h b/include/plat/arm/common/arm_sip_svc.h
index 3e25cbc6a..16573ce6a 100644
--- a/include/plat/arm/common/arm_sip_svc.h
+++ b/include/plat/arm/common/arm_sip_svc.h
@@ -7,7 +7,7 @@
#ifndef ARM_SIP_SVC_H
#define ARM_SIP_SVC_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/* SMC function IDs for SiP Service queries */
diff --git a/include/plat/arm/common/arm_spm_def.h b/include/plat/arm/common/arm_spm_def.h
index bf3cb8fa0..bdcbc96af 100644
--- a/include/plat/arm/common/arm_spm_def.h
+++ b/include/plat/arm/common/arm_spm_def.h
@@ -6,9 +6,10 @@
#ifndef ARM_SPM_DEF_H
#define ARM_SPM_DEF_H
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
+
#include <arm_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
/*
* Reserve 4 MiB for binaries of Secure Partitions and Resource Description
diff --git a/include/plat/arm/common/arm_tzc_dram.ld.S b/include/plat/arm/common/arm_tzc_dram.ld.S
index df951e117..6dcea0b6e 100644
--- a/include/plat/arm/common/arm_tzc_dram.ld.S
+++ b/include/plat/arm/common/arm_tzc_dram.ld.S
@@ -3,10 +3,10 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-#ifndef ARM_TZC_DRAM_LD_S__
-#define ARM_TZC_DRAM_LD_S__
+#ifndef ARM_TZC_DRAM_LD_S
+#define ARM_TZC_DRAM_LD_S
-#include <xlat_tables_defs.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
MEMORY {
EL3_SEC_DRAM (rw): ORIGIN = ARM_EL3_TZC_DRAM1_BASE, LENGTH = ARM_EL3_TZC_DRAM1_SIZE
@@ -27,4 +27,4 @@ SECTIONS
} >EL3_SEC_DRAM
}
-#endif /* ARM_TZC_DRAM_LD_S__ */
+#endif /* ARM_TZC_DRAM_LD_S */
diff --git a/include/plat/arm/common/plat_arm.h b/include/plat/arm/common/plat_arm.h
index 9b459841c..628160824 100644
--- a/include/plat/arm/common/plat_arm.h
+++ b/include/plat/arm/common/plat_arm.h
@@ -6,14 +6,15 @@
#ifndef PLAT_ARM_H
#define PLAT_ARM_H
-#include <bakery_lock.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <spinlock.h>
-#include <tzc_common.h>
-#include <utils_def.h>
-#include <xlat_tables_compat.h>
+
+#include <drivers/arm/tzc_common.h>
+#include <lib/bakery_lock.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_compat.h>
/*******************************************************************************
* Forward declarations
diff --git a/include/plat/arm/css/common/css_def.h b/include/plat/arm/css/common/css_def.h
index 4a7d314c9..6b355a4e9 100644
--- a/include/plat/arm/css/common/css_def.h
+++ b/include/plat/arm/css/common/css_def.h
@@ -7,10 +7,11 @@
#ifndef CSS_DEF_H
#define CSS_DEF_H
+#include <common/interrupt_props.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/tzc400.h>
+
#include <arm_def.h>
-#include <gic_common.h>
-#include <interrupt_props.h>
-#include <tzc400.h>
/*************************************************************************
* Definitions common to all ARM Compute SubSystems (CSS)
diff --git a/include/plat/arm/css/common/css_pm.h b/include/plat/arm/css/common/css_pm.h
index ff75c6916..b82ff47e7 100644
--- a/include/plat/arm/css/common/css_pm.h
+++ b/include/plat/arm/css/common/css_pm.h
@@ -8,9 +8,10 @@
#define CSS_PM_H
#include <cdefs.h>
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/* Macros to read the CSS power domain state */
#define CSS_CORE_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL0]
#define CSS_CLUSTER_PWR_STATE(state) (state)->pwr_domain_state[ARM_PWR_LVL1]
diff --git a/include/plat/arm/soc/common/soc_css_def.h b/include/plat/arm/soc/common/soc_css_def.h
index 263313a9a..b4b6ba8e4 100644
--- a/include/plat/arm/soc/common/soc_css_def.h
+++ b/include/plat/arm/soc/common/soc_css_def.h
@@ -7,9 +7,8 @@
#ifndef SOC_CSS_DEF_H
#define SOC_CSS_DEF_H
-#include <common_def.h>
-#include <utils_def.h>
-
+#include <lib/utils_def.h>
+#include <plat/common/common_def.h>
/*
* Definitions common to all ARM CSS SoCs
diff --git a/include/plat/common/common_def.h b/include/plat/common/common_def.h
index 66074ac17..66c88ba8c 100644
--- a/include/plat/common/common_def.h
+++ b/include/plat/common/common_def.h
@@ -6,10 +6,11 @@
#ifndef COMMON_DEF_H
#define COMMON_DEF_H
-#include <bl_common.h>
#include <platform_def.h>
-#include <utils_def.h>
-#include <xlat_tables_defs.h>
+
+#include <common/bl_common.h>
+#include <lib/utils_def.h>
+#include <lib/xlat_tables/xlat_tables_defs.h>
/******************************************************************************
* Required platform porting definitions that are expected to be common to
diff --git a/include/plat/common/platform.h b/include/plat/common/platform.h
index 04272b1b5..13767ff0a 100644
--- a/include/plat/common/platform.h
+++ b/include/plat/common/platform.h
@@ -7,9 +7,10 @@
#ifndef PLATFORM_H
#define PLATFORM_H
-#include <psci.h>
#include <stdint.h>
+#include <lib/psci/psci.h>
+
/*******************************************************************************
* Forward declarations
******************************************************************************/
diff --git a/include/plat/marvell/a3700/common/armada_common.h b/include/plat/marvell/a3700/common/armada_common.h
index fdcc02a66..c6953fb71 100644
--- a/include/plat/marvell/a3700/common/armada_common.h
+++ b/include/plat/marvell/a3700/common/armada_common.h
@@ -8,9 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <io_addr_dec.h>
#include <stdint.h>
+#include <io_addr_dec.h>
+
int marvell_get_io_dec_win_conf(struct dec_win_config **win, uint32_t *size);
#endif /* ARMADA_COMMON_H */
diff --git a/include/plat/marvell/a3700/common/marvell_def.h b/include/plat/marvell/a3700/common/marvell_def.h
index 3c105fca7..229b8b029 100644
--- a/include/plat/marvell/a3700/common/marvell_def.h
+++ b/include/plat/marvell/a3700/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/****************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a3700/common/plat_marvell.h b/include/plat/marvell/a3700/common/plat_marvell.h
index 01e42c545..8b8b53ffe 100644
--- a/include/plat/marvell/a3700/common/plat_marvell.h
+++ b/include/plat/marvell/a3700/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <bl_common.h>
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <xlat_tables.h>
+
+#include <common/bl_common.h>
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/a8k/common/armada_common.h b/include/plat/marvell/a8k/common/armada_common.h
index 64d9adf96..dd2a24abc 100644
--- a/include/plat/marvell/a8k/common/armada_common.h
+++ b/include/plat/marvell/a8k/common/armada_common.h
@@ -8,10 +8,10 @@
#ifndef ARMADA_COMMON_H
#define ARMADA_COMMON_H
-#include <amb_adec.h>
-#include <io_win.h>
-#include <iob.h>
-#include <ccu.h>
+#include <drivers/marvell/amb_adec.h>
+#include <drivers/marvell/ccu.h>
+#include <drivers/marvell/io_win.h>
+#include <drivers/marvell/iob.h>
/*
* This struct supports skip image request
diff --git a/include/plat/marvell/a8k/common/marvell_def.h b/include/plat/marvell/a8k/common/marvell_def.h
index c67b3cd87..5ba90f711 100644
--- a/include/plat/marvell/a8k/common/marvell_def.h
+++ b/include/plat/marvell/a8k/common/marvell_def.h
@@ -8,12 +8,12 @@
#ifndef MARVELL_DEF_H
#define MARVELL_DEF_H
-#include <arch.h>
-#include <common_def.h>
#include <platform_def.h>
-#include <tbbr_img_def.h>
-#include <xlat_tables.h>
+#include <arch.h>
+#include <common/tbbr/tbbr_img_def.h>
+#include <lib/xlat_tables/xlat_tables.h>
+#include <plat/common/common_def.h>
/******************************************************************************
* Definitions common to all MARVELL standard platforms
diff --git a/include/plat/marvell/a8k/common/plat_marvell.h b/include/plat/marvell/a8k/common/plat_marvell.h
index 037548da0..65d4de8a6 100644
--- a/include/plat/marvell/a8k/common/plat_marvell.h
+++ b/include/plat/marvell/a8k/common/plat_marvell.h
@@ -8,11 +8,12 @@
#ifndef PLAT_MARVELL_H
#define PLAT_MARVELL_H
-#include <cassert.h>
-#include <cpu_data.h>
#include <stdint.h>
-#include <utils.h>
-#include <xlat_tables.h>
+
+#include <lib/cassert.h>
+#include <lib/el3_runtime/cpu_data.h>
+#include <lib/utils.h>
+#include <lib/xlat_tables/xlat_tables.h>
/*
* Extern declarations common to Marvell standard platforms
diff --git a/include/plat/marvell/common/aarch64/cci_macros.S b/include/plat/marvell/common/aarch64/cci_macros.S
index 96b364eeb..b0a909bb6 100644
--- a/include/plat/marvell/common/aarch64/cci_macros.S
+++ b/include/plat/marvell/common/aarch64/cci_macros.S
@@ -8,7 +8,7 @@
#ifndef CCI_MACROS_S
#define CCI_MACROS_S
-#include <cci.h>
+#include <drivers/arm/cci.h>
#include <platform_def.h>
.section .rodata.cci_reg_name, "aS"
diff --git a/include/plat/marvell/common/aarch64/marvell_macros.S b/include/plat/marvell/common/aarch64/marvell_macros.S
index c2a8bd055..bfe2d4127 100644
--- a/include/plat/marvell/common/aarch64/marvell_macros.S
+++ b/include/plat/marvell/common/aarch64/marvell_macros.S
@@ -8,10 +8,10 @@
#ifndef MARVELL_MACROS_S
#define MARVELL_MACROS_S
-#include <cci.h>
-#include <gic_common.h>
-#include <gicv2.h>
-#include <gicv3.h>
+#include <drivers/arm/cci.h>
+#include <drivers/arm/gic_common.h>
+#include <drivers/arm/gicv2.h>
+#include <drivers/arm/gicv3.h>
#include <platform_def.h>
/*
diff --git a/include/plat/marvell/common/marvell_plat_priv.h b/include/plat/marvell/common/marvell_plat_priv.h
index 6f0b588a7..78b5331e4 100644
--- a/include/plat/marvell/common/marvell_plat_priv.h
+++ b/include/plat/marvell/common/marvell_plat_priv.h
@@ -8,7 +8,7 @@
#ifndef MARVELL_PLAT_PRIV_H
#define MARVELL_PLAT_PRIV_H
-#include <utils.h>
+#include <lib/utils.h>
/*****************************************************************************
* Function and variable prototypes
diff --git a/include/services/mm_svc.h b/include/services/mm_svc.h
index e2ce90fda..c81e90481 100644
--- a/include/services/mm_svc.h
+++ b/include/services/mm_svc.h
@@ -9,7 +9,7 @@
#if SPM_DEPRECATED
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define MM_VERSION_MAJOR U(1)
#define MM_VERSION_MAJOR_SHIFT 16
diff --git a/include/services/sdei.h b/include/services/sdei.h
index 4d0fd3fd3..ae8c7e42f 100644
--- a/include/services/sdei.h
+++ b/include/services/sdei.h
@@ -7,8 +7,8 @@
#ifndef SDEI_H
#define SDEI_H
-#include <spinlock.h>
-#include <utils_def.h>
+#include <lib/spinlock.h>
+#include <lib/utils_def.h>
/* Range 0xC4000020 - 0xC400003F reserved for SDE 64bit smc calls */
#define SDEI_VERSION 0xC4000020U
diff --git a/include/services/secure_partition.h b/include/services/secure_partition.h
index 0ae6cf991..47f63684f 100644
--- a/include/services/secure_partition.h
+++ b/include/services/secure_partition.h
@@ -10,7 +10,8 @@
#if SPM_DEPRECATED
#include <stdint.h>
-#include <utils_def.h>
+
+#include <lib/utils_def.h>
/*
* Flags used by the secure_partition_mp_info structure to describe the
diff --git a/include/services/sp_res_desc.h b/include/services/sp_res_desc.h
index dc0022128..b8be72eeb 100644
--- a/include/services/sp_res_desc.h
+++ b/include/services/sp_res_desc.h
@@ -8,7 +8,8 @@
#define SPM_RES_DESC_H
#include <stdint.h>
-#include <sp_res_desc_def.h>
+
+#include <services/sp_res_desc_def.h>
/*******************************************************************************
* Attribute Section
diff --git a/include/services/sp_res_desc_def.h b/include/services/sp_res_desc_def.h
index 68df297a8..5a3c50d7f 100644
--- a/include/services/sp_res_desc_def.h
+++ b/include/services/sp_res_desc_def.h
@@ -7,7 +7,7 @@
#ifndef SPM_RES_DESC_DEFS_H
#define SPM_RES_DESC_DEFS_H
-#include <utils_def.h>
+#include <lib/utils_def.h>
/*******************************************************************************
* Attribute Section
diff --git a/include/services/spci_svc.h b/include/services/spci_svc.h
index eae4fb7fe..b82cf1e30 100644
--- a/include/services/spci_svc.h
+++ b/include/services/spci_svc.h
@@ -7,8 +7,8 @@
#ifndef SPCI_SVC_H
#define SPCI_SVC_H
-#include <smccc.h>
-#include <utils_def.h>
+#include <lib/smccc.h>
+#include <lib/utils_def.h>
/* SPCI_VERSION helpers */
diff --git a/include/services/spm_svc.h b/include/services/spm_svc.h
index 763b24eac..fcb409b29 100644
--- a/include/services/spm_svc.h
+++ b/include/services/spm_svc.h
@@ -9,7 +9,7 @@
#if SPM_DEPRECATED
-#include <utils_def.h>
+#include <lib/utils_def.h>
#define SPM_VERSION_MAJOR U(0)
#define SPM_VERSION_MAJOR_SHIFT 16
diff --git a/include/services/sprt_svc.h b/include/services/sprt_svc.h
index b6b51dd43..bd695e58a 100644
--- a/include/services/sprt_svc.h
+++ b/include/services/sprt_svc.h
@@ -7,8 +7,8 @@
#ifndef SPRT_SVC_H
#define SPRT_SVC_H
-#include <smccc.h>
-#include <utils_def.h>
+#include <lib/smccc.h>
+#include <lib/utils_def.h>
/* SPRT_VERSION helpers */
diff --git a/include/tools_share/firmware_image_package.h b/include/tools_share/firmware_image_package.h
index 9f586b0aa..598d5c258 100644
--- a/include/tools_share/firmware_image_package.h
+++ b/include/tools_share/firmware_image_package.h
@@ -8,7 +8,8 @@
#define FIRMWARE_IMAGE_PACKAGE_H
#include <stdint.h>
-#include <uuid.h>
+
+#include "uuid.h"
/* This is used as a signature to validate the blob header */
#define TOC_HEADER_NAME 0xAA640001