Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
18ff0b61
Unverified
Commit
18ff0b61
authored
6 years ago
by
Antonio Niño Díaz
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1886 from ambroise-arm/av/static-checks
Fix extra compilation warnings
parents
9cadccdf
279faa6d
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
bl1/bl1_fwu.c
+5
-8
bl1/bl1_fwu.c
drivers/arm/css/scmi/scmi_ap_core_proto.c
+5
-3
drivers/arm/css/scmi/scmi_ap_core_proto.c
drivers/arm/css/scmi/scmi_common.c
+5
-3
drivers/arm/css/scmi/scmi_common.c
drivers/arm/css/scmi/scmi_pwr_dmn_proto.c
+5
-3
drivers/arm/css/scmi/scmi_pwr_dmn_proto.c
drivers/arm/css/scmi/scmi_sys_pwr_proto.c
+5
-3
drivers/arm/css/scmi/scmi_sys_pwr_proto.c
drivers/arm/css/scp/css_pm_scmi.c
+6
-4
drivers/arm/css/scp/css_pm_scmi.c
drivers/arm/sp804/sp804_delay_timer.c
+2
-1
drivers/arm/sp804/sp804_delay_timer.c
drivers/auth/auth_mod.c
+1
-5
drivers/auth/auth_mod.c
drivers/console/multi_console.c
+3
-3
drivers/console/multi_console.c
drivers/io/io_fip.c
+2
-2
drivers/io/io_fip.c
include/drivers/arm/css/scmi.h
+2
-2
include/drivers/arm/css/scmi.h
include/drivers/console.h
+5
-4
include/drivers/console.h
include/plat/arm/common/plat_arm.h
+1
-0
include/plat/arm/common/plat_arm.h
lib/libc/memchr.c
+2
-1
lib/libc/memchr.c
lib/libc/memcmp.c
+2
-1
lib/libc/memcmp.c
lib/libc/memcpy.c
+2
-1
lib/libc/memcpy.c
lib/libc/memset.c
+2
-1
lib/libc/memset.c
lib/semihosting/semihosting.c
+2
-2
lib/semihosting/semihosting.c
plat/arm/board/fvp/fvp_pm.c
+1
-0
plat/arm/board/fvp/fvp_pm.c
plat/arm/board/fvp/fvp_private.h
+1
-2
plat/arm/board/fvp/fvp_private.h
with
59 additions
and
49 deletions
+59
-49
bl1/bl1_fwu.c
View file @
18ff0b61
/*
* Copyright (c) 2015-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -52,9 +52,6 @@ __dead2 static void bl1_fwu_done(void *client_cookie, void *reserved);
*/
static
unsigned
int
sec_exec_image_id
=
INVALID_IMAGE_ID
;
/* Authentication status of each image. */
extern
unsigned
int
auth_img_flags
[
MAX_NUMBER_IDS
];
/*******************************************************************************
* Top level handler for servicing FWU SMCs.
******************************************************************************/
...
...
@@ -108,7 +105,7 @@ register_t bl1_fwu_smc_handler(unsigned int smc_fid,
#define FWU_MAX_SIMULTANEOUS_IMAGES 10
#endif
static
int
bl1_fwu_loaded_ids
[
FWU_MAX_SIMULTANEOUS_IMAGES
]
=
{
static
unsigned
int
bl1_fwu_loaded_ids
[
FWU_MAX_SIMULTANEOUS_IMAGES
]
=
{
[
0
...
FWU_MAX_SIMULTANEOUS_IMAGES
-
1
]
=
INVALID_IMAGE_ID
};
...
...
@@ -116,7 +113,7 @@ static int bl1_fwu_loaded_ids[FWU_MAX_SIMULTANEOUS_IMAGES] = {
* Adds an image_id to the bl1_fwu_loaded_ids array.
* Returns 0 on success, 1 on error.
*/
static
int
bl1_fwu_add_loaded_id
(
int
image_id
)
static
int
bl1_fwu_add_loaded_id
(
unsigned
int
image_id
)
{
int
i
;
...
...
@@ -141,7 +138,7 @@ static int bl1_fwu_add_loaded_id(int image_id)
* Removes an image_id from the bl1_fwu_loaded_ids array.
* Returns 0 on success, 1 on error.
*/
static
int
bl1_fwu_remove_loaded_id
(
int
image_id
)
static
int
bl1_fwu_remove_loaded_id
(
unsigned
int
image_id
)
{
int
i
;
...
...
@@ -160,7 +157,7 @@ static int bl1_fwu_remove_loaded_id(int image_id)
* This function checks if the specified image overlaps another image already
* loaded. It returns 0 if there is no overlap, a negative error code otherwise.
******************************************************************************/
static
int
bl1_fwu_image_check_overlaps
(
int
image_id
)
static
int
bl1_fwu_image_check_overlaps
(
unsigned
int
image_id
)
{
const
image_desc_t
*
image_desc
,
*
checked_image_desc
;
const
image_info_t
*
info
,
*
checked_info
;
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/css/scmi/scmi_ap_core_proto.c
View file @
18ff0b61
/*
* 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
*/
...
...
@@ -18,7 +18,8 @@
int
scmi_ap_core_set_reset_addr
(
void
*
p
,
uint64_t
reset_addr
,
uint32_t
attr
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
@@ -51,7 +52,8 @@ int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr)
int
scmi_ap_core_get_reset_addr
(
void
*
p
,
uint64_t
*
reset_addr
,
uint32_t
*
attr
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
uint32_t
lo_addr
,
hi_addr
;
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/css/scmi/scmi_common.c
View file @
18ff0b61
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -90,7 +90,8 @@ void scmi_put_channel(scmi_channel_t *ch)
int
scmi_proto_version
(
void
*
p
,
uint32_t
proto_id
,
uint32_t
*
version
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
@@ -122,7 +123,8 @@ int scmi_proto_msg_attr(void *p, uint32_t proto_id,
uint32_t
command_id
,
uint32_t
*
attr
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/css/scmi/scmi_pwr_dmn_proto.c
View file @
18ff0b61
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017
-2019
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -19,7 +19,8 @@ int scmi_pwr_state_set(void *p, uint32_t domain_id,
uint32_t
scmi_pwr_state
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
/*
* Only asynchronous mode of `set power state` command is allowed on
...
...
@@ -59,7 +60,8 @@ int scmi_pwr_state_get(void *p, uint32_t domain_id,
uint32_t
*
scmi_pwr_state
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/css/scmi/scmi_sys_pwr_proto.c
View file @
18ff0b61
/*
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017
-2019
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -18,7 +18,8 @@
int
scmi_sys_pwr_state_set
(
void
*
p
,
uint32_t
flags
,
uint32_t
system_state
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
@@ -50,7 +51,8 @@ int scmi_sys_pwr_state_set(void *p, uint32_t flags, uint32_t system_state)
int
scmi_sys_pwr_state_get
(
void
*
p
,
uint32_t
*
system_state
)
{
mailbox_mem_t
*
mbx_mem
;
int
token
=
0
,
ret
;
unsigned
int
token
=
0
;
int
ret
;
scmi_channel_t
*
ch
=
(
scmi_channel_t
*
)
p
;
validate_scmi_channel
(
ch
);
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/css/scp/css_pm_scmi.c
View file @
18ff0b61
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -99,7 +99,7 @@ void css_scp_suspend(const struct psci_power_state *target_state)
return
;
}
#if !HW_ASSISTED_COHERENCY
int
lvl
;
unsigned
int
lvl
;
uint32_t
scmi_pwr_state
=
0
;
/*
* If we reach here, then assert that power down at system power domain
...
...
@@ -145,7 +145,8 @@ void css_scp_suspend(const struct psci_power_state *target_state)
*/
void
css_scp_off
(
const
struct
psci_power_state
*
target_state
)
{
int
lvl
=
0
,
ret
;
unsigned
int
lvl
=
0
;
int
ret
;
uint32_t
scmi_pwr_state
=
0
;
/* At-least the CPU level should be specified to be OFF */
...
...
@@ -184,7 +185,8 @@ void css_scp_off(const struct psci_power_state *target_state)
*/
void
css_scp_on
(
u_register_t
mpidr
)
{
int
lvl
=
0
,
ret
,
core_pos
;
unsigned
int
lvl
=
0
;
int
ret
,
core_pos
;
uint32_t
scmi_pwr_state
=
0
;
for
(;
lvl
<=
PLAT_MAX_PWR_LVL
;
lvl
++
)
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/sp804/sp804_delay_timer.c
View file @
18ff0b61
/*
* Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015
-2019
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <assert.h>
#include <drivers/arm/sp804_delay_timer.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
...
...
This diff is collapsed.
Click to expand it.
drivers/auth/auth_mod.c
View file @
18ff0b61
/*
* Copyright (c) 2015-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2015-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -30,10 +30,6 @@
#pragma weak plat_set_nv_ctr2
/* Pointer to CoT */
extern
const
auth_img_desc_t
*
const
cot_desc_ptr
;
extern
unsigned
int
auth_img_flags
[
MAX_NUMBER_IDS
];
static
int
cmp_auth_param_type_desc
(
const
auth_param_type_desc_t
*
a
,
const
auth_param_type_desc_t
*
b
)
{
...
...
This diff is collapsed.
Click to expand it.
drivers/console/multi_console.c
View file @
18ff0b61
...
...
@@ -13,11 +13,11 @@
console_t
*
console_list
;
uint8_t
console_state
=
CONSOLE_FLAG_BOOT
;
IMPORT_SYM
(
console_t
*
,
__STACKS_START__
,
stacks_start
)
IMPORT_SYM
(
console_t
*
,
__STACKS_END__
,
stacks_end
)
int
console_register
(
console_t
*
console
)
{
IMPORT_SYM
(
console_t
*
,
__STACKS_START__
,
stacks_start
)
IMPORT_SYM
(
console_t
*
,
__STACKS_END__
,
stacks_end
)
/* Assert that the struct is not on the stack (common mistake). */
assert
((
console
<
stacks_start
)
||
(
console
>=
stacks_end
));
/* Assert that we won't make a circle in the list. */
...
...
This diff is collapsed.
Click to expand it.
drivers/io/io_fip.c
View file @
18ff0b61
/*
* Copyright (c) 2014-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -48,7 +48,7 @@ typedef struct {
uintptr_t
dev_spec
;
}
fip_dev_state_t
;
static
const
uuid_t
uuid_null
=
{
{
0
}
}
;
static
const
uuid_t
uuid_null
;
/*
* Only one file can be open across all FIP device
* as backends like io_memmap don't support
...
...
This diff is collapsed.
Click to expand it.
include/drivers/arm/css/scmi.h
View file @
18ff0b61
/*
* Copyright (c) 2017-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2017-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -162,7 +162,7 @@ int scmi_ap_core_set_reset_addr(void *p, uint64_t reset_addr, uint32_t attr);
int
scmi_ap_core_get_reset_addr
(
void
*
p
,
uint64_t
*
reset_addr
,
uint32_t
*
attr
);
/* API to get the platform specific SCMI channel information. */
scmi_channel_plat_info_t
*
plat_css_get_scmi_info
();
scmi_channel_plat_info_t
*
plat_css_get_scmi_info
(
void
);
/* API to override default PSCI callbacks for platforms that support SCMI. */
const
plat_psci_ops_t
*
css_scmi_override_pm_ops
(
plat_psci_ops_t
*
ops
);
...
...
This diff is collapsed.
Click to expand it.
include/drivers/console.h
View file @
18ff0b61
...
...
@@ -49,11 +49,12 @@ typedef struct console {
#include <drivers/console_assertions.h>
/*
*
NOTE: There is no publicly accessible console_register() function. Consoles
*
are registered by directly calling the register function of a specific
*
implementation, e.g. console_16550_register() from <uart_16550.h>. Consoles
* re
gistered that way can be unregistered/reconfigured with below
function
s
.
*
Add a console_t instance to the console list. This should only be called by
*
console drivers after they have initialized all fields in the console
*
structure. Platforms seeking to register a new console need to call the
* re
spective console__register()
function
instead
.
*/
int
console_register
(
console_t
*
console
);
/* Remove a single console_t instance from the console list. Return a pointer to
* the console that was removed if it was found, or NULL if not. */
console_t
*
console_unregister
(
console_t
*
console
);
...
...
This diff is collapsed.
Click to expand it.
include/plat/arm/common/plat_arm.h
View file @
18ff0b61
...
...
@@ -187,6 +187,7 @@ void arm_bl2_platform_setup(void);
void
arm_bl2_plat_arch_setup
(
void
);
uint32_t
arm_get_spsr_for_bl32_entry
(
void
);
uint32_t
arm_get_spsr_for_bl33_entry
(
void
);
int
arm_bl2_plat_handle_post_image_load
(
unsigned
int
image_id
);
int
arm_bl2_handle_post_image_load
(
unsigned
int
image_id
);
struct
bl_params
*
arm_get_next_bl_params
(
void
);
...
...
This diff is collapsed.
Click to expand it.
lib/libc/memchr.c
View file @
18ff0b61
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <string.h>
void
*
memchr
(
const
void
*
src
,
int
c
,
size_t
len
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/libc/memcmp.c
View file @
18ff0b61
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <string.h>
int
memcmp
(
const
void
*
s1
,
const
void
*
s2
,
size_t
len
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/libc/memcpy.c
View file @
18ff0b61
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <string.h>
void
*
memcpy
(
void
*
dst
,
const
void
*
src
,
size_t
len
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/libc/memset.c
View file @
18ff0b61
/*
* Copyright (c) 2013-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stddef.h>
#include <string.h>
void
*
memset
(
void
*
dst
,
int
val
,
size_t
count
)
{
...
...
This diff is collapsed.
Click to expand it.
lib/semihosting/semihosting.c
View file @
18ff0b61
/*
* Copyright (c) 2013-201
4
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2013-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -160,7 +160,7 @@ long semihosting_system(char *command_line)
long
semihosting_get_flen
(
const
char
*
file_name
)
{
long
file_handle
;
size_t
length
;
long
length
;
assert
(
semihosting_connection_supported
());
...
...
This diff is collapsed.
Click to expand it.
plat/arm/board/fvp/fvp_pm.c
View file @
18ff0b61
...
...
@@ -20,6 +20,7 @@
#include <platform_def.h>
#include "fvp_private.h"
#include "../drivers/arm/gic/v3/gicv3_private.h"
#if ARM_RECOM_STATE_ID_ENC
...
...
This diff is collapsed.
Click to expand it.
plat/arm/board/fvp/fvp_private.h
View file @
18ff0b61
/*
* Copyright (c) 2014-201
8
, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2014-201
9
, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
...
...
@@ -20,5 +20,4 @@ void fvp_interconnect_enable(void);
void
fvp_interconnect_disable
(
void
);
void
tsp_early_platform_setup
(
void
);
#endif
/* FVP_PRIVATE_H */
This diff is collapsed.
Click to expand it.
Prev
1
2
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
Menu
Projects
Groups
Snippets
Help