Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
6d4f6aea
Unverified
Commit
6d4f6aea
authored
Aug 22, 2018
by
Dimitris Papastamos
Committed by
GitHub
Aug 22, 2018
Browse files
Merge pull request #1528 from antonio-nino-diaz-arm/an/libc
libc: Cleanup library
parents
11dfe0b4
8422a840
Changes
158
Expand all
Show whitespace changes
Inline
Side-by-side
include/lib/libc/sys/types.h
deleted
100644 → 0
View file @
11dfe0b4
/*-
* Copyright (c) 1982, 1986, 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
* $FreeBSD$
*/
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
#include <sys/cdefs.h>
/* Machine type dependent parameters. */
#include <sys/_types.h>
#if __BSD_VISIBLE
typedef
unsigned
char
u_char
;
typedef
unsigned
short
u_short
;
typedef
unsigned
int
u_int
;
typedef
unsigned
long
u_long
;
#ifndef _KERNEL
typedef
unsigned
short
ushort
;
/* Sys V compatibility */
typedef
unsigned
int
uint
;
/* Sys V compatibility */
#endif
#endif
/*
* XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
*/
#include <sys/_stdint.h>
typedef
__uint8_t
u_int8_t
;
/* unsigned integrals (deprecated) */
typedef
__uint16_t
u_int16_t
;
typedef
__uint32_t
u_int32_t
;
typedef
__uint64_t
u_int64_t
;
typedef
__uint64_t
u_quad_t
;
/* quads (deprecated) */
typedef
__int64_t
quad_t
;
typedef
quad_t
*
qaddr_t
;
typedef
char
*
caddr_t
;
/* core address */
typedef
const
char
*
c_caddr_t
;
/* core address, pointer to const */
#ifndef _BLKSIZE_T_DECLARED
typedef
__blksize_t
blksize_t
;
#define _BLKSIZE_T_DECLARED
#endif
typedef
__cpuwhich_t
cpuwhich_t
;
typedef
__cpulevel_t
cpulevel_t
;
typedef
__cpusetid_t
cpusetid_t
;
#ifndef _BLKCNT_T_DECLARED
typedef
__blkcnt_t
blkcnt_t
;
#define _BLKCNT_T_DECLARED
#endif
#ifndef _CLOCK_T_DECLARED
typedef
__clock_t
clock_t
;
#define _CLOCK_T_DECLARED
#endif
#ifndef _CLOCKID_T_DECLARED
typedef
__clockid_t
clockid_t
;
#define _CLOCKID_T_DECLARED
#endif
typedef
__critical_t
critical_t
;
/* Critical section value */
typedef
__int64_t
daddr_t
;
/* disk address */
#ifndef _DEV_T_DECLARED
typedef
__dev_t
dev_t
;
/* device number or struct cdev */
#define _DEV_T_DECLARED
#endif
#ifndef _FFLAGS_T_DECLARED
typedef
__fflags_t
fflags_t
;
/* file flags */
#define _FFLAGS_T_DECLARED
#endif
typedef
__fixpt_t
fixpt_t
;
/* fixed point number */
#ifndef _FSBLKCNT_T_DECLARED
/* for statvfs() */
typedef
__fsblkcnt_t
fsblkcnt_t
;
typedef
__fsfilcnt_t
fsfilcnt_t
;
#define _FSBLKCNT_T_DECLARED
#endif
#ifndef _GID_T_DECLARED
typedef
__gid_t
gid_t
;
/* group id */
#define _GID_T_DECLARED
#endif
#ifndef _IN_ADDR_T_DECLARED
typedef
__uint32_t
in_addr_t
;
/* base type for internet address */
#define _IN_ADDR_T_DECLARED
#endif
#ifndef _IN_PORT_T_DECLARED
typedef
__uint16_t
in_port_t
;
#define _IN_PORT_T_DECLARED
#endif
#ifndef _ID_T_DECLARED
typedef
__id_t
id_t
;
/* can hold a uid_t or pid_t */
#define _ID_T_DECLARED
#endif
#ifndef _INO_T_DECLARED
typedef
__ino_t
ino_t
;
/* inode number */
#define _INO_T_DECLARED
#endif
#ifndef _KEY_T_DECLARED
typedef
__key_t
key_t
;
/* IPC key (for Sys V IPC) */
#define _KEY_T_DECLARED
#endif
#ifndef _LWPID_T_DECLARED
typedef
__lwpid_t
lwpid_t
;
/* Thread ID (a.k.a. LWP) */
#define _LWPID_T_DECLARED
#endif
#ifndef _MODE_T_DECLARED
typedef
__mode_t
mode_t
;
/* permissions */
#define _MODE_T_DECLARED
#endif
#ifndef _ACCMODE_T_DECLARED
typedef
__accmode_t
accmode_t
;
/* access permissions */
#define _ACCMODE_T_DECLARED
#endif
#ifndef _NLINK_T_DECLARED
typedef
__nlink_t
nlink_t
;
/* link count */
#define _NLINK_T_DECLARED
#endif
#ifndef _OFF_T_DECLARED
typedef
__off_t
off_t
;
/* file offset */
#define _OFF_T_DECLARED
#endif
#ifndef _PID_T_DECLARED
typedef
__pid_t
pid_t
;
/* process id */
#define _PID_T_DECLARED
#endif
typedef
__register_t
register_t
;
#ifndef _RLIM_T_DECLARED
typedef
__rlim_t
rlim_t
;
/* resource limit */
#define _RLIM_T_DECLARED
#endif
typedef
__int64_t
sbintime_t
;
typedef
__segsz_t
segsz_t
;
/* segment size (in pages) */
#ifndef _SIZE_T_DECLARED
typedef
__size_t
size_t
;
#define _SIZE_T_DECLARED
#endif
#ifndef _SSIZE_T_DECLARED
typedef
__ssize_t
ssize_t
;
#define _SSIZE_T_DECLARED
#endif
#ifndef _SUSECONDS_T_DECLARED
typedef
__suseconds_t
suseconds_t
;
/* microseconds (signed) */
#define _SUSECONDS_T_DECLARED
#endif
#ifndef _TIME_T_DECLARED
typedef
__time_t
time_t
;
#define _TIME_T_DECLARED
#endif
#ifndef _TIMER_T_DECLARED
typedef
__timer_t
timer_t
;
#define _TIMER_T_DECLARED
#endif
#ifndef _MQD_T_DECLARED
typedef
__mqd_t
mqd_t
;
#define _MQD_T_DECLARED
#endif
typedef
__u_register_t
u_register_t
;
#ifndef _UID_T_DECLARED
typedef
__uid_t
uid_t
;
/* user id */
#define _UID_T_DECLARED
#endif
#ifndef _USECONDS_T_DECLARED
typedef
__useconds_t
useconds_t
;
/* microseconds (unsigned) */
#define _USECONDS_T_DECLARED
#endif
#ifndef _CAP_RIGHTS_T_DECLARED
#define _CAP_RIGHTS_T_DECLARED
struct
cap_rights
;
typedef
struct
cap_rights
cap_rights_t
;
#endif
typedef
__vm_offset_t
vm_offset_t
;
typedef
__vm_ooffset_t
vm_ooffset_t
;
typedef
__vm_paddr_t
vm_paddr_t
;
typedef
__vm_pindex_t
vm_pindex_t
;
typedef
__vm_size_t
vm_size_t
;
#endif
/* !_SYS_TYPES_H_ */
include/lib/libc/time.h
View file @
6d4f6aea
/*
/*
* Copyright (c) 1989, 1993
* Copyright (c) 2012-2017 Roberto E. Vargas Caballero
* The Regents of the University of California. All rights reserved.
* (c) UNIX System Laboratories, Inc.
* All or some portions of this file are derived from material licensed
* to the University of California by American Telephone and Telegraph
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
* the permission of UNIX System Laboratories, Inc.
*
*
* Redistribution and use in source and binary forms, with or without
* SPDX-License-Identifier: BSD-3-Clause
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)time.h 8.3 (Berkeley) 1/21/94
*/
*/
/*
/*
* $FreeBSD$
* Portions copyright (c) 2018, ARM Limited and Contributors.
* All rights reserved.
*/
*/
#ifndef _TIME_H_
#ifndef TIME_H
#define _TIME_H_
#define TIME_H
#include <sys/cdefs.h>
#include <sys/_null.h>
#include <sys/_types.h>
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE
/*
* Frequency of the clock ticks reported by times(). Deprecated - use
* sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
*/
#define CLK_TCK 128
#endif
/* Frequency of the clock ticks reported by clock(). */
#define CLOCKS_PER_SEC 128
#ifndef _CLOCK_T_DECLARED
typedef
__clock_t
clock_t
;
#define _CLOCK_T_DECLARED
#endif
#ifndef _TIME_T_DECLARED
typedef
__time_t
time_t
;
#define _TIME_T_DECLARED
#endif
#ifndef _SIZE_T_DECLARED
typedef
__size_t
size_t
;
#define _SIZE_T_DECLARED
#endif
#if __POSIX_VISIBLE >= 199309
/*
* New in POSIX 1003.1b-1993.
*/
#ifndef _CLOCKID_T_DECLARED
typedef
__clockid_t
clockid_t
;
#define _CLOCKID_T_DECLARED
#endif
#ifndef _TIMER_T_DECLARED
typedef
__timer_t
timer_t
;
#define _TIMER_T_DECLARED
#endif
#include <sys/timespec.h>
#endif
/* __POSIX_VISIBLE >= 199309 */
#if __POSIX_VISIBLE >= 200112
#ifndef _PID_T_DECLARED
typedef
__pid_t
pid_t
;
#define _PID_T_DECLARED
#endif
#endif
/* These macros are also in sys/time.h. */
#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
#define CLOCK_REALTIME 0
#ifdef __BSD_VISIBLE
#define CLOCK_VIRTUAL 1
#define CLOCK_PROF 2
#endif
#define CLOCK_MONOTONIC 4
#define CLOCK_UPTIME 5
/* FreeBSD-specific. */
#define CLOCK_UPTIME_PRECISE 7
/* FreeBSD-specific. */
#define CLOCK_UPTIME_FAST 8
/* FreeBSD-specific. */
#define CLOCK_REALTIME_PRECISE 9
/* FreeBSD-specific. */
#define CLOCK_REALTIME_FAST 10
/* FreeBSD-specific. */
#define CLOCK_MONOTONIC_PRECISE 11
/* FreeBSD-specific. */
#define CLOCK_MONOTONIC_FAST 12
/* FreeBSD-specific. */
#define CLOCK_SECOND 13
/* FreeBSD-specific. */
#define CLOCK_THREAD_CPUTIME_ID 14
#define CLOCK_PROCESS_CPUTIME_ID 15
#endif
/* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */
#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112
#if __BSD_VISIBLE
#define TIMER_RELTIME 0x0
/* relative timer */
#endif
#define TIMER_ABSTIME 0x1
/* absolute timer */
#endif
/* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */
struct
tm
{
int
tm_sec
;
/* seconds after the minute [0-60] */
int
tm_min
;
/* minutes after the hour [0-59] */
int
tm_hour
;
/* hours since midnight [0-23] */
int
tm_mday
;
/* day of the month [1-31] */
int
tm_mon
;
/* months since January [0-11] */
int
tm_year
;
/* years since 1900 */
int
tm_wday
;
/* days since Sunday [0-6] */
int
tm_yday
;
/* days since January 1 [0-365] */
int
tm_isdst
;
/* Daylight Savings Time flag */
long
tm_gmtoff
;
/* offset from UTC in seconds */
char
*
tm_zone
;
/* timezone abbreviation */
};
#if __POSIX_VISIBLE
extern
char
*
tzname
[];
#endif
__BEGIN_DECLS
char
*
asctime
(
const
struct
tm
*
);
clock_t
clock
(
void
);
char
*
ctime
(
const
time_t
*
);
double
difftime
(
time_t
,
time_t
);
/* XXX missing: getdate() */
struct
tm
*
gmtime
(
const
time_t
*
);
struct
tm
*
localtime
(
const
time_t
*
);
time_t
mktime
(
struct
tm
*
);
size_t
strftime
(
char
*
__restrict
,
size_t
,
const
char
*
__restrict
,
const
struct
tm
*
__restrict
);
time_t
time
(
time_t
*
);
#if __POSIX_VISIBLE >= 200112
struct
sigevent
;
int
timer_create
(
clockid_t
,
struct
sigevent
*
__restrict
,
timer_t
*
__restrict
);
int
timer_delete
(
timer_t
);
int
timer_gettime
(
timer_t
,
struct
itimerspec
*
);
int
timer_getoverrun
(
timer_t
);
int
timer_settime
(
timer_t
,
int
,
const
struct
itimerspec
*
__restrict
,
struct
itimerspec
*
__restrict
);
#endif
#if __POSIX_VISIBLE
void
tzset
(
void
);
#endif
#if __POSIX_VISIBLE >= 199309
int
clock_getres
(
clockid_t
,
struct
timespec
*
);
int
clock_gettime
(
clockid_t
,
struct
timespec
*
);
int
clock_settime
(
clockid_t
,
const
struct
timespec
*
);
/* XXX missing: clock_nanosleep() */
int
nanosleep
(
const
struct
timespec
*
,
struct
timespec
*
);
#endif
/* __POSIX_VISIBLE >= 199309 */
#if __POSIX_VISIBLE >= 200112
int
clock_getcpuclockid
(
pid_t
,
clockid_t
*
);
#endif
#if __POSIX_VISIBLE >= 199506
char
*
asctime_r
(
const
struct
tm
*
,
char
*
);
char
*
ctime_r
(
const
time_t
*
,
char
*
);
struct
tm
*
gmtime_r
(
const
time_t
*
,
struct
tm
*
);
struct
tm
*
localtime_r
(
const
time_t
*
,
struct
tm
*
);
#endif
#if __XSI_VISIBLE
char
*
strptime
(
const
char
*
__restrict
,
const
char
*
__restrict
,
struct
tm
*
__restrict
);
#endif
#if __BSD_VISIBLE
#include <time_.h>
char
*
timezone
(
int
,
int
);
/* XXX XSI conflict */
void
tzsetwall
(
void
);
time_t
timelocal
(
struct
tm
*
const
);
time_t
timegm
(
struct
tm
*
const
);
#endif
/* __BSD_VISIBLE */
#if
__POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#if
ndef NULL
#
include <xlocale/_time.h>
#
define NULL ((void *) 0)
#endif
#endif
__END_DECLS
#endif
/*
!_
TIME_H
_
*/
#endif
/* TIME_H */
include/lib/libc/xlocale/_strings.h
deleted
100644 → 0
View file @
11dfe0b4
/*-
* Copyright (c) 2011, 2012 The FreeBSD Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _LOCALE_T_DEFINED
#define _LOCALE_T_DEFINED
typedef
struct
_xlocale
*
locale_t
;
#endif
/*
* This file is included from both strings.h and xlocale.h. We need to expose
* the declarations unconditionally if we are included from xlocale.h, but only
* if we are in POSIX2008 mode if included from string.h.
*/
#ifndef _XLOCALE_STRINGS1_H
#define _XLOCALE_STRINGS1_H
/*
* POSIX2008 functions
*/
int
strcasecmp_l
(
const
char
*
,
const
char
*
,
locale_t
);
int
strncasecmp_l
(
const
char
*
,
const
char
*
,
size_t
,
locale_t
);
#endif
/* _XLOCALE_STRINGS1_H */
include/lib/libc/xlocale/_time.h
deleted
100644 → 0
View file @
11dfe0b4
/*-
* Copyright (c) 2011, 2012 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by David Chisnall under sponsorship from
* the FreeBSD Foundation.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $FreeBSD$
*/
#ifndef _LOCALE_T_DEFINED
#define _LOCALE_T_DEFINED
typedef
struct
_xlocale
*
locale_t
;
#endif
/*
* This file is included from both locale.h and xlocale.h. We need to expose
* the declarations unconditionally if we are included from xlocale.h, but only
* if we are in POSIX2008 mode if included from locale.h.
*/
#ifndef _XLOCALE_LOCALE1_H
#define _XLOCALE_LOCALE1_H
size_t
strftime_l
(
char
*
__restrict
,
size_t
,
const
char
*
__restrict
,
const
struct
tm
*
__restrict
,
locale_t
)
__strftimelike
(
3
,
0
);
#endif
/* _XLOCALE_LOCALE1_H */
#ifdef _XLOCALE_H_
#ifndef _XLOCALE_LOCALE2_H
#define _XLOCALE_LOCALE2_H
char
*
strptime_l
(
const
char
*
__restrict
,
const
char
*
__restrict
,
struct
tm
*
__restrict
,
locale_t
);
#endif
/* _XLOCALE_LOCALE2_H */
#endif
/* _XLOCALE_H_ */
include/lib/psci/psci.h
View file @
6d4f6aea
...
@@ -171,7 +171,6 @@
...
@@ -171,7 +171,6 @@
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
#include <stdint.h>
#include <stdint.h>
#include <types.h>
/* Function to help build the psci capabilities bitfield */
/* Function to help build the psci capabilities bitfield */
...
...
include/lib/psci/psci_lib.h
View file @
6d4f6aea
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
#include <ep_info.h>
#include <ep_info.h>
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
#include <types.h>
#include <cdefs.h>
#include <stdint.h>
/*******************************************************************************
/*******************************************************************************
* Optional structure populated by the Secure Payload Dispatcher to be given a
* Optional structure populated by the Secure Payload Dispatcher to be given a
...
...
include/lib/spinlock.h
View file @
6d4f6aea
/*
/*
* Copyright (c) 2013-201
7
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
8
, 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 @@
#ifndef __ASSEMBLY__
#ifndef __ASSEMBLY__
#include <
types
.h>
#include <
stdint
.h>
typedef
struct
spinlock
{
typedef
struct
spinlock
{
volatile
uint32_t
lock
;
volatile
uint32_t
lock
;
...
...
include/lib/utils.h
View file @
6d4f6aea
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
*/
*/
#if !(defined(__LINKER__) || defined(__ASSEMBLY__))
#if !(defined(__LINKER__) || defined(__ASSEMBLY__))
#include <
types
.h>
#include <
stdint
.h>
typedef
struct
mem_region
{
typedef
struct
mem_region
{
uintptr_t
base
;
uintptr_t
base
;
...
...
include/lib/xlat_tables/xlat_mmu_helpers.h
View file @
6d4f6aea
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
#include <stdbool.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdint.h>
#include <s
ys/types
.h>
#include <s
tring
.h>
/*
/*
* Return the values that the MMU configuration registers must contain for the
* Return the values that the MMU configuration registers must contain for the
...
...
include/plat/arm/css/common/css_pm.h
View file @
6d4f6aea
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
#include <cdefs.h>
#include <cdefs.h>
#include <psci.h>
#include <psci.h>
#include <
types
.h>
#include <
stdint
.h>
/* System power domain at level 2, as currently implemented by CSS platforms */
/* System power domain at level 2, as currently implemented by CSS platforms */
#define CSS_SYSTEM_PWR_DMN_LVL ARM_PWR_LVL2
#define CSS_SYSTEM_PWR_DMN_LVL ARM_PWR_LVL2
...
...
include/plat/common/common_def.h
View file @
6d4f6aea
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include <bl_common.h>
#include <bl_common.h>
#include <platform_def.h>
#include <platform_def.h>
#include <xlat_tables_defs.h>
/******************************************************************************
/******************************************************************************
* Required platform porting definitions that are expected to be common to
* Required platform porting definitions that are expected to be common to
...
...
include/plat/common/platform.h
View file @
6d4f6aea
...
@@ -9,8 +9,6 @@
...
@@ -9,8 +9,6 @@
#include <psci.h>
#include <psci.h>
#include <stdint.h>
#include <stdint.h>
#include <types.h>
/*******************************************************************************
/*******************************************************************************
* Forward declarations
* Forward declarations
...
...
include/services/secure_partition.h
View file @
6d4f6aea
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#ifndef __SECURE_PARTITION_H__
#ifndef __SECURE_PARTITION_H__
#define __SECURE_PARTITION_H__
#define __SECURE_PARTITION_H__
#include <
types
.h>
#include <
stdint
.h>
#include <utils_def.h>
#include <utils_def.h>
/*
/*
...
...
lib/aarch32/armclang_printf.S
0 → 100644
View file @
6d4f6aea
/*
*
Copyright
(
c
)
2018
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
#include <asm_macros.S>
/*
Symbols
needed
by
armclang
*/
.
globl
__0printf
.
globl
__1printf
.
globl
__2printf
func
__0printf
__1printf
:
__2printf
:
b
printf
endfunc
__0printf
lib/aarch64/armclang_printf.S
0 → 100644
View file @
6d4f6aea
/*
*
Copyright
(
c
)
2018
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
#include <asm_macros.S>
/*
Symbols
needed
by
armclang
*/
.
globl
__0printf
.
globl
__1printf
.
globl
__2printf
func
__0printf
__1printf
:
__2printf
:
b
printf
endfunc
__0printf
lib/compiler-rt/builtins/int_lib.h
View file @
6d4f6aea
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
*/
*/
/*
/*
* Portions copyright (c) 2017, ARM Limited and Contributors.
* Portions copyright (c) 2017
-2018
, ARM Limited and Contributors.
* All rights reserved.
* All rights reserved.
*/
*/
...
@@ -63,9 +63,8 @@
...
@@ -63,9 +63,8 @@
* Kernel and boot environment can't use normal headers,
* Kernel and boot environment can't use normal headers,
* so use the equivalent system headers.
* so use the equivalent system headers.
*/
*/
# include <sys/limits.h>
# include <limits.h>
# include <sys/stdint.h>
# include <stdint.h>
# include <sys/types.h>
/* Include the commonly used internal type definitions. */
/* Include the commonly used internal type definitions. */
#include "int_types.h"
#include "int_types.h"
...
...
lib/libc/abort.c
View file @
6d4f6aea
...
@@ -7,10 +7,7 @@
...
@@ -7,10 +7,7 @@
#include <debug.h>
#include <debug.h>
#include <stdlib.h>
#include <stdlib.h>
/*
void
abort
(
void
)
* This is a basic implementation. This could be improved.
*/
void
abort
(
void
)
{
{
ERROR
(
"ABORT
\n
"
);
ERROR
(
"ABORT
\n
"
);
panic
();
panic
();
...
...
lib/libc/assert.c
View file @
6d4f6aea
/*
/*
* Copyright (c) 2013-201
7
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
*
*
* SPDX-License-Identifier: BSD-3-Clause
* SPDX-License-Identifier: BSD-3-Clause
*/
*/
#include <assert.h>
#include <assert.h>
#include <cdefs.h>
#include <console.h>
#include <console.h>
#include <debug.h>
#include <debug.h>
#include <platform.h>
#include <platform.h>
#include <stdio.h>
/*
/*
* Only print the output if PLAT_LOG_LEVEL_ASSERT is higher or equal to
* Only print the output if PLAT_LOG_LEVEL_ASSERT is higher or equal to
* LOG_LEVEL_INFO, which is the default value for builds with DEBUG=1.
* LOG_LEVEL_INFO, which is the default value for builds with DEBUG=1.
*/
*/
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
#if PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_VERBOSE
void
__assert
(
const
char
*
file
,
unsigned
int
line
,
const
char
*
assertion
)
void
__assert
(
const
char
*
file
,
unsigned
int
line
,
const
char
*
assertion
)
{
{
tf_
printf
(
"ASSERT: %s:%d:%s
\n
"
,
file
,
line
,
assertion
);
printf
(
"ASSERT: %s:%d:%s
\n
"
,
file
,
line
,
assertion
);
console_flush
();
console_flush
();
plat_panic_handler
();
plat_panic_handler
();
}
}
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
#elif PLAT_LOG_LEVEL_ASSERT >= LOG_LEVEL_INFO
void
__assert
(
const
char
*
file
,
unsigned
int
line
)
void
__assert
(
const
char
*
file
,
unsigned
int
line
)
{
{
tf_
printf
(
"ASSERT: %s:%d
\n
"
,
file
,
line
);
printf
(
"ASSERT: %s:%d
\n
"
,
file
,
line
);
console_flush
();
console_flush
();
plat_panic_handler
();
plat_panic_handler
();
}
}
...
...
lib/libc/libc.mk
View file @
6d4f6aea
This diff is collapsed.
Click to expand it.
lib/libc/memchr.c
0 → 100644
View file @
6d4f6aea
/*
* Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
void
*
memchr
(
const
void
*
src
,
int
c
,
size_t
len
)
{
const
char
*
s
=
src
;
while
(
len
--
)
{
if
(
*
s
==
c
)
return
(
void
*
)
s
;
s
++
;
}
return
NULL
;
}
Prev
1
2
3
4
5
6
7
8
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment