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
This commit is contained in:
Soby Mathew 2019-12-06 09:43:28 +00:00 committed by TrustedFirmware Code Review
commit f224bd4ee2
10 changed files with 43 additions and 38 deletions

View File

@ -296,8 +296,9 @@ CPPFLAGS = ${DEFINES} ${INCLUDES} ${MBEDTLS_INC} -nostdinc \
ASFLAGS += $(CPPFLAGS) $(ASFLAGS_$(ARCH)) \
-ffreestanding -Wa,--fatal-warnings
TF_CFLAGS += $(CPPFLAGS) $(TF_CFLAGS_$(ARCH)) \
-ffreestanding -fno-builtin -std=gnu99 \
-Os -ffunction-sections -fdata-sections
-ffunction-sections -fdata-sections \
-ffreestanding -fno-builtin -fno-common \
-Os -std=gnu99
ifeq (${SANITIZE_UB},on)
TF_CFLAGS += -fsanitize=undefined -fno-sanitize-recover

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -27,7 +27,7 @@ SECTIONS
.text . : {
__TEXT_START__ = .;
*bl1_entrypoint.o(.text*)
*(.text*)
*(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@ -44,7 +44,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
*(.rodata*)
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -72,8 +72,8 @@ SECTIONS
ro . : {
__RO_START__ = .;
*bl1_entrypoint.o(.text*)
*(.text*)
*(.rodata*)
*(SORT_BY_ALIGNMENT(.text*))
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -114,7 +114,7 @@ SECTIONS
*/
.data . : ALIGN(16) {
__DATA_RAM_START__ = .;
*(.data*)
*(SORT_BY_ALIGNMENT(.data*))
__DATA_RAM_END__ = .;
} >RAM AT>ROM
@ -131,7 +131,7 @@ SECTIONS
*/
.bss : ALIGN(16) {
__BSS_START__ = .;
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)
__BSS_END__ = .;
} >RAM

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -27,7 +27,7 @@ SECTIONS
.text . : {
__TEXT_START__ = .;
*bl2_entrypoint.o(.text*)
*(.text*)
*(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@ -44,7 +44,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
*(.rodata*)
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -59,8 +59,8 @@ SECTIONS
ro . : {
__RO_START__ = .;
*bl2_entrypoint.o(.text*)
*(.text*)
*(.rodata*)
*(SORT_BY_ALIGNMENT(.text*))
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -93,7 +93,7 @@ SECTIONS
*/
.data . : {
__DATA_START__ = .;
*(.data*)
*(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .;
} >RAM

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -44,7 +44,7 @@ SECTIONS
*bl2_el3_entrypoint.o(.text*)
*(.text.asm.*)
__TEXT_RESIDENT_END__ = .;
*(.text*)
*(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@ -52,7 +52,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
*(.rodata*)
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -82,8 +82,8 @@ SECTIONS
*bl2_el3_entrypoint.o(.text*)
*(.text.asm.*)
__TEXT_RESIDENT_END__ = .;
*(.text*)
*(.rodata*)
*(SORT_BY_ALIGNMENT(.text*))
*(SORT_BY_ALIGNMENT(.rodata*))
/*
* Ensure 8-byte alignment for cpu_ops so that its fields are also
@ -135,7 +135,7 @@ SECTIONS
*/
.data . : {
__DATA_RAM_START__ = .;
*(.data*)
*(SORT_BY_ALIGNMENT(.data*))
__DATA_RAM_END__ = .;
} >RAM AT>ROM

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -27,7 +27,7 @@ SECTIONS
.text . : {
__TEXT_START__ = .;
*bl2u_entrypoint.o(.text*)
*(.text*)
*(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@ -44,7 +44,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
*(.rodata*)
*(SORT_BY_ALIGNMENT(.rodata*))
. = ALIGN(PAGE_SIZE);
__RODATA_END__ = .;
} >RAM
@ -52,8 +52,8 @@ SECTIONS
ro . : {
__RO_START__ = .;
*bl2u_entrypoint.o(.text*)
*(.text*)
*(.rodata*)
*(SORT_BY_ALIGNMENT(.text*))
*(SORT_BY_ALIGNMENT(.rodata*))
*(.vectors)
__RO_END_UNALIGNED__ = .;
@ -80,7 +80,7 @@ SECTIONS
*/
.data . : {
__DATA_START__ = .;
*(.data*)
*(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .;
} >RAM

View File

@ -33,7 +33,7 @@ SECTIONS
.text . : {
__TEXT_START__ = .;
*bl31_entrypoint.o(.text*)
*(.text*)
*(SORT_BY_ALIGNMENT(.text*))
*(.vectors)
. = ALIGN(PAGE_SIZE);
__TEXT_END__ = .;
@ -41,7 +41,7 @@ SECTIONS
.rodata . : {
__RODATA_START__ = .;
*(.rodata*)
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -87,8 +87,8 @@ SECTIONS
ro . : {
__RO_START__ = .;
*bl31_entrypoint.o(.text*)
*(.text*)
*(.rodata*)
*(SORT_BY_ALIGNMENT(.text*))
*(SORT_BY_ALIGNMENT(.rodata*))
/* Ensure 8-byte alignment for descriptors and ensure inclusion */
. = ALIGN(8);
@ -179,7 +179,7 @@ SECTIONS
*/
.data . : {
__DATA_START__ = .;
*(.data*)
*(SORT_BY_ALIGNMENT(.data*))
__DATA_END__ = .;
} >RAM
@ -211,7 +211,7 @@ SECTIONS
*/
.bss (NOLOAD) : ALIGN(16) {
__BSS_START__ = .;
*(.bss*)
*(SORT_BY_ALIGNMENT(.bss*))
*(COMMON)
#if !USE_COHERENT_MEM
/*

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -7,6 +7,7 @@
#ifndef IMX_CAAM_H
#define IMX_CAAM_H
#include <cdefs.h>
#include <stdint.h>
#include <arch.h>
#include <imx_regs.h>

View File

@ -1,11 +1,12 @@
/*
* 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
*/
#ifndef IMX_SNVS_H
#define IMX_SNVS_H
#include <cdefs.h>
#include <stdint.h>
#include <arch.h>

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -62,6 +62,6 @@ void sc_ipc_read(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 */

View File

@ -1,5 +1,5 @@
/*
* 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
*/
@ -13,6 +13,8 @@
#include <sci/sci_rpc.h>
#include "imx8_mu.h"
sc_ipc_t ipc_handle;
DEFINE_BAKERY_LOCK(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)