Unverified Commit 6d4f6aea authored by Dimitris Papastamos's avatar Dimitris Papastamos Committed by GitHub
Browse files

Merge pull request #1528 from antonio-nino-diaz-arm/an/libc

libc: Cleanup library
parents 11dfe0b4 8422a840
/* /*
* Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#include <t18x_ari.h> #include <t18x_ari.h>
#include <tegra_private.h> #include <tegra_private.h>
extern void memcpy16(void *dest, const void *src, unsigned int length);
extern void prepare_cpu_pwr_dwn(void); extern void prepare_cpu_pwr_dwn(void);
extern void tegra186_cpu_reset_handler(void); extern void tegra186_cpu_reset_handler(void);
extern uint32_t __tegra186_cpu_reset_handler_end, extern uint32_t __tegra186_cpu_reset_handler_end,
......
/* /*
* Copyright (c) 2015, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#define CPU_RESET_MODE_AA64 1 #define CPU_RESET_MODE_AA64 1
extern void memcpy16(void *dest, const void *src, unsigned int length);
extern uint64_t tegra_bl31_phys_base; extern uint64_t tegra_bl31_phys_base;
extern uint64_t __tegra186_cpu_reset_handler_end; extern uint64_t __tegra186_cpu_reset_handler_end;
......
/* /*
* Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -7,9 +7,8 @@ ...@@ -7,9 +7,8 @@
#ifndef __QEMU_PRIVATE_H #ifndef __QEMU_PRIVATE_H
#define __QEMU_PRIVATE_H #define __QEMU_PRIVATE_H
#include <sys/types.h> #include <stdint.h>
#include <xlat_tables_defs.h>
#include "../../bl1/bl1_private.h" #include "../../bl1/bl1_private.h"
void qemu_configure_mmu_secure(unsigned long total_base, void qemu_configure_mmu_secure(unsigned long total_base,
......
/* /*
* Copyright (c) 2015-2016, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch.h> #include <arch.h>
#include <platform_def.h> #include <platform_def.h>
#include <sys/types.h> #include <stdint.h>
#include "qemu_private.h" #include "qemu_private.h"
/* The power domain tree descriptor */ /* The power domain tree descriptor */
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <cdefs.h>
#include <cdn_dp.h> #include <cdn_dp.h>
#include <smccc.h> #include <smccc.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef __RPI3_PRIVATE_H__ #ifndef __RPI3_PRIVATE_H__
#define __RPI3_PRIVATE_H__ #define __RPI3_PRIVATE_H__
#include <sys/types.h> #include <stdint.h>
/******************************************************************************* /*******************************************************************************
* Function and variable prototypes * Function and variable prototypes
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <sys/types.h> #include <stdint.h>
#include <utils.h> #include <utils.h>
#include "rpi3_private.h" #include "rpi3_private.h"
......
/* /*
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include <arch.h> #include <arch.h>
#include <platform_def.h> #include <platform_def.h>
#include <sys/types.h> #include <stdint.h>
#include "rpi3_private.h" #include "rpi3_private.h"
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef __SQ_COMMON_H__ #ifndef __SQ_COMMON_H__
#define __SQ_COMMON_H__ #define __SQ_COMMON_H__
#include <sys/types.h> #include <stdint.h>
#include <xlat_tables_v2.h> #include <xlat_tables_v2.h>
struct draminfo { struct draminfo {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#define __UNIPHIER_H__ #define __UNIPHIER_H__
#include <stdint.h> #include <stdint.h>
#include <types.h> #include <string.h>
unsigned int uniphier_get_soc_type(void); unsigned int uniphier_get_soc_type(void);
unsigned int uniphier_get_soc_model(void); unsigned int uniphier_get_soc_model(void);
......
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <io/io_block.h> #include <io/io_block.h>
#include <mmio.h> #include <mmio.h>
#include <platform_def.h> #include <platform_def.h>
#include <sys/types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
#include "uniphier.h" #include "uniphier.h"
......
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include <io/io_fip.h> #include <io/io_fip.h>
#include <io/io_memmap.h> #include <io/io_memmap.h>
#include <platform_def.h> #include <platform_def.h>
#include <types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
#include <xlat_tables_v2.h> #include <xlat_tables_v2.h>
......
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <io/io_block.h> #include <io/io_block.h>
#include <mmio.h> #include <mmio.h>
#include <platform_def.h> #include <platform_def.h>
#include <sys/types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
#include "uniphier.h" #include "uniphier.h"
......
/* /*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
* *
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <io/io_block.h> #include <io/io_block.h>
#include <mmio.h> #include <mmio.h>
#include <platform_def.h> #include <platform_def.h>
#include <sys/types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
#include "uniphier.h" #include "uniphier.h"
......
...@@ -30,8 +30,9 @@ described in the `Contributing Guidelines`_. ...@@ -30,8 +30,9 @@ described in the `Contributing Guidelines`_.
This project contains code from other projects as listed below. The original This project contains code from other projects as listed below. The original
license text is included in those source files. license text is included in those source files.
- The stdlib source code is derived from FreeBSD code, which uses various - The libc source code is derived from `FreeBSD`_ and `SCC`_. FreeBSD uses
BSD licenses, including BSD-3-Clause and BSD-2-Clause. various BSD licenses, including BSD-3-Clause and BSD-2-Clause. The SCC code
is used under the BSD-3-Clause license with the author's permission.
- The libfdt source code is disjunctively dual licensed - The libfdt source code is disjunctively dual licensed
(GPL-2.0+ OR BSD-2-Clause). It is used by this project under the terms of (GPL-2.0+ OR BSD-2-Clause). It is used by this project under the terms of
...@@ -275,3 +276,5 @@ Arm licensees may contact Arm directly via their partner managers. ...@@ -275,3 +276,5 @@ Arm licensees may contact Arm directly via their partner managers.
.. _Change Log: ./docs/change-log.rst .. _Change Log: ./docs/change-log.rst
.. _User Guide: ./docs/user-guide.rst .. _User Guide: ./docs/user-guide.rst
.. _Porting Guide: ./docs/porting-guide.rst .. _Porting Guide: ./docs/porting-guide.rst
.. _FreeBSD: http://www.freebsd.org
.. _SCC: http://www.simple-cc.org/
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <debug.h> #include <debug.h>
#include <runtime_svc.h> #include <runtime_svc.h>
#include <stdio.h>
#include "generic-arm64-smcall.h" #include "generic-arm64-smcall.h"
...@@ -29,14 +30,14 @@ static void trusty_dputc(char ch, int secure) ...@@ -29,14 +30,14 @@ static void trusty_dputc(char ch, int secure)
s->linebuf[s->l++] = ch; s->linebuf[s->l++] = ch;
if (s->l == sizeof(s->linebuf) || ch == '\n') { if (s->l == sizeof(s->linebuf) || ch == '\n') {
if (secure) if (secure)
tf_printf("secure os: "); printf("secure os: ");
else else
tf_printf("non-secure os: "); printf("non-secure os: ");
for (i = 0; i < s->l; i++) { for (i = 0; i < s->l; i++) {
putchar(s->linebuf[i]); putchar(s->linebuf[i]);
} }
if (ch != '\n') { if (ch != '\n') {
tf_printf(" <...>\n"); printf(" <...>\n");
} }
s->l = 0; s->l = 0;
} }
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <setjmp.h> #include <setjmp.h>
#include <spinlock.h> #include <spinlock.h>
#include <stdbool.h> #include <stdbool.h>
#include <types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
#ifdef AARCH32 #ifdef AARCH32
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef __SPM_SHIM_PRIVATE__ #ifndef __SPM_SHIM_PRIVATE__
#define __SPM_SHIM_PRIVATE__ #define __SPM_SHIM_PRIVATE__
#include <types.h> #include <stdint.h>
#include <utils_def.h> #include <utils_def.h>
/* Assembly source */ /* Assembly source */
......
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