Commit f224bd4e authored by Soby Mathew's avatar Soby Mathew Committed by TrustedFirmware Code Review
Browse files

Merge changes from topic "allwinner_bl31_size" into integration

* changes:
  Reduce space lost to object alignment
  imx: Fix multiple definition of ipc_handle
  imx: Fix missing inclusion of cdefs.h
parents b3257a3d ebd6efae
...@@ -296,8 +296,9 @@ CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \ ...@@ -296,8 +296,9 @@ CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \
ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \ ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \
-ffreestanding -Wa,--fatal-warnings -ffreestanding -Wa,--fatal-warnings
TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \ TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
-ffreestanding -fno-builtin -std=gnu99 \ -ffunction-sections -fdata-sections \
-Os -ffunction-sections -fdata-sections -ffreestanding -fno-builtin -fno-common \
-Os -std=gnu99
ifeq (${SANITIZE_UB},on) ifeq (${SANITIZE_UB},on)
TF_CFLAGS += -fsanitize=undefined -fno-sanitize-recover TF_CFLAGS += -fsanitize=undefined -fno-sanitize-recover
......
/* /*
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
.text . : { .text . : {
__TEXT_START__ = .; __TEXT_START__ = .;
*bl1_entrypoint.o(.text*) *bl1_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -72,8 +72,8 @@ SECTIONS ...@@ -72,8 +72,8 @@ SECTIONS
ro . : { ro . : {
__RO_START__ = .; __RO_START__ = .;
*bl1_entrypoint.o(.text*) *bl1_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -114,7 +114,7 @@ SECTIONS ...@@ -114,7 +114,7 @@ SECTIONS
*/ */
.data . : ALIGN(16) { .data . : ALIGN(16) {
__DATA_RAM_START__ = .; __DATA_RAM_START__ = .;
*(.data*) *(SORT_BY_ALIGNMENT(.data*))
__DATA_RAM_END__ = .; __DATA_RAM_END__ = .;
} >RAM AT>ROM } >RAM AT>ROM
...@@ -131,7 +131,7 @@ SECTIONS ...@@ -131,7 +131,7 @@ SECTIONS
*/ */
.bss : ALIGN(16) { .bss : ALIGN(16) {
__BSS_START__ = .; __BSS_START__ = .;
*(.bss*) *(SORT_BY_ALIGNMENT(.bss*))
*(COMMON) *(COMMON)
__BSS_END__ = .; __BSS_END__ = .;
} >RAM } >RAM
......
/* /*
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
.text . : { .text . : {
__TEXT_START__ = .; __TEXT_START__ = .;
*bl2_entrypoint.o(.text*) *bl2_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -59,8 +59,8 @@ SECTIONS ...@@ -59,8 +59,8 @@ SECTIONS
ro . : { ro . : {
__RO_START__ = .; __RO_START__ = .;
*bl2_entrypoint.o(.text*) *bl2_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -93,7 +93,7 @@ SECTIONS ...@@ -93,7 +93,7 @@ SECTIONS
*/ */
.data . : { .data . : {
__DATA_START__ = .; __DATA_START__ = .;
*(.data*) *(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .; __DATA_END__ = .;
} >RAM } >RAM
......
/* /*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
*bl2_el3_entrypoint.o(.text*) *bl2_el3_entrypoint.o(.text*)
*(.text.asm.*) *(.text.asm.*)
__TEXT_RESIDENT_END__ = .; __TEXT_RESIDENT_END__ = .;
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -52,7 +52,7 @@ SECTIONS ...@@ -52,7 +52,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -82,8 +82,8 @@ SECTIONS ...@@ -82,8 +82,8 @@ SECTIONS
*bl2_el3_entrypoint.o(.text*) *bl2_el3_entrypoint.o(.text*)
*(.text.asm.*) *(.text.asm.*)
__TEXT_RESIDENT_END__ = .; __TEXT_RESIDENT_END__ = .;
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* /*
* Ensure 8-byte alignment for cpu_ops so that its fields are also * Ensure 8-byte alignment for cpu_ops so that its fields are also
...@@ -135,7 +135,7 @@ SECTIONS ...@@ -135,7 +135,7 @@ SECTIONS
*/ */
.data . : { .data . : {
__DATA_RAM_START__ = .; __DATA_RAM_START__ = .;
*(.data*) *(SORT_BY_ALIGNMENT(.data*))
__DATA_RAM_END__ = .; __DATA_RAM_END__ = .;
} >RAM AT>ROM } >RAM AT>ROM
......
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
.text . : { .text . : {
__TEXT_START__ = .; __TEXT_START__ = .;
*bl2u_entrypoint.o(.text*) *bl2u_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -44,7 +44,7 @@ SECTIONS ...@@ -44,7 +44,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__RODATA_END__ = .; __RODATA_END__ = .;
} >RAM } >RAM
...@@ -52,8 +52,8 @@ SECTIONS ...@@ -52,8 +52,8 @@ SECTIONS
ro . : { ro . : {
__RO_START__ = .; __RO_START__ = .;
*bl2u_entrypoint.o(.text*) *bl2u_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
*(.vectors) *(.vectors)
__RO_END_UNALIGNED__ = .; __RO_END_UNALIGNED__ = .;
...@@ -80,7 +80,7 @@ SECTIONS ...@@ -80,7 +80,7 @@ SECTIONS
*/ */
.data . : { .data . : {
__DATA_START__ = .; __DATA_START__ = .;
*(.data*) *(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .; __DATA_END__ = .;
} >RAM } >RAM
......
...@@ -33,7 +33,7 @@ SECTIONS ...@@ -33,7 +33,7 @@ SECTIONS
.text . : { .text . : {
__TEXT_START__ = .; __TEXT_START__ = .;
*bl31_entrypoint.o(.text*) *bl31_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.vectors) *(.vectors)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__TEXT_END__ = .; __TEXT_END__ = .;
...@@ -41,7 +41,7 @@ SECTIONS ...@@ -41,7 +41,7 @@ SECTIONS
.rodata . : { .rodata . : {
__RODATA_START__ = .; __RODATA_START__ = .;
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -87,8 +87,8 @@ SECTIONS ...@@ -87,8 +87,8 @@ SECTIONS
ro . : { ro . : {
__RO_START__ = .; __RO_START__ = .;
*bl31_entrypoint.o(.text*) *bl31_entrypoint.o(.text*)
*(.text*) *(SORT_BY_ALIGNMENT(.text*))
*(.rodata*) *(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */ /* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8); . = ALIGN(8);
...@@ -179,7 +179,7 @@ SECTIONS ...@@ -179,7 +179,7 @@ SECTIONS
*/ */
.data . : { .data . : {
__DATA_START__ = .; __DATA_START__ = .;
*(.data*) *(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .; __DATA_END__ = .;
} >RAM } >RAM
...@@ -211,7 +211,7 @@ SECTIONS ...@@ -211,7 +211,7 @@ SECTIONS
*/ */
.bss (NOLOAD) : ALIGN(16) { .bss (NOLOAD) : ALIGN(16) {
__BSS_START__ = .; __BSS_START__ = .;
*(.bss*) *(SORT_BY_ALIGNMENT(.bss*))
*(COMMON) *(COMMON)
#if !USE_COHERENT_MEM #if !USE_COHERENT_MEM
/* /*
......
/* /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#ifndef IMX_CAAM_H #ifndef IMX_CAAM_H
#define IMX_CAAM_H #define IMX_CAAM_H
#include <cdefs.h>
#include <stdint.h> #include <stdint.h>
#include <arch.h> #include <arch.h>
#include <imx_regs.h> #include <imx_regs.h>
......
/* /*
* Copyright (C) 2018, ARM Limited and Contributors. All rights reserved. * Copyright (C) 2018-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#ifndef IMX_SNVS_H #ifndef IMX_SNVS_H
#define IMX_SNVS_H #define IMX_SNVS_H
#include <cdefs.h>
#include <stdint.h> #include <stdint.h>
#include <arch.h> #include <arch.h>
......
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -62,6 +62,6 @@ void sc_ipc_read(sc_ipc_t ipc, void *data); ...@@ -62,6 +62,6 @@ void sc_ipc_read(sc_ipc_t ipc, void *data);
*/ */
void sc_ipc_write(sc_ipc_t ipc, void *data); void sc_ipc_write(sc_ipc_t ipc, void *data);
sc_ipc_t ipc_handle; extern sc_ipc_t ipc_handle;
#endif /* SCI_IPC_H */ #endif /* SCI_IPC_H */
/* /*
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2019, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include <sci/sci_rpc.h> #include <sci/sci_rpc.h>
#include "imx8_mu.h" #include "imx8_mu.h"
sc_ipc_t ipc_handle;
DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock); DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock);
#define sc_ipc_lock_init() bakery_lock_init(&sc_ipc_bakery_lock) #define sc_ipc_lock_init() bakery_lock_init(&sc_ipc_bakery_lock)
#define sc_ipc_lock() bakery_lock_get(&sc_ipc_bakery_lock) #define sc_ipc_lock() bakery_lock_get(&sc_ipc_bakery_lock)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment