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
08886940
Commit
08886940
authored
Dec 02, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Dec 02, 2020
Browse files
Merge "rockchip: Add support for the stack protector" into integration
parents
91cc872c
826ba363
Changes
5
Show whitespace changes
Inline
Side-by-side
plat/rockchip/common/rockchip_stack_protector.c
0 → 100644
View file @
08886940
/*
* Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <arch_helpers.h>
#include <plat/common/platform.h>
#define RANDOM_CANARY_VALUE ((u_register_t) 3288484550995823360ULL)
u_register_t
plat_get_stack_protector_canary
(
void
)
{
/*
* Ideally, a random number should be returned instead of the
* combination of a timer's value and a compile-time constant.
* As the virt platform does not have any random number generator,
* this is better than nothing but not necessarily really secure.
*/
return
RANDOM_CANARY_VALUE
^
read_cntpct_el0
();
}
plat/rockchip/px30/platform.mk
View file @
08886940
...
...
@@ -36,6 +36,10 @@ PLAT_BL_COMMON_SOURCES := lib/bl_aux_params/bl_aux_params.c \
lib/xlat_tables/aarch64/xlat_tables.c
\
plat/common/plat_psci_common.c
ifneq
(${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES
+=
${RK_PLAT_COMMON}
/rockchip_stack_protector.c
endif
BL31_SOURCES
+=
${RK_GIC_SOURCES}
\
common/desc_image_load.c
\
drivers/arm/cci/cci.c
\
...
...
plat/rockchip/rk3328/platform.mk
View file @
08886940
...
...
@@ -35,6 +35,10 @@ PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \
plat/common/aarch64/crash_console_helpers.S
\
plat/common/plat_psci_common.c
ifneq
(${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES
+=
${RK_PLAT_COMMON}
/rockchip_stack_protector.c
endif
BL31_SOURCES
+=
${RK_GIC_SOURCES}
\
drivers/arm/cci/cci.c
\
drivers/ti/uart/aarch64/16550_console.S
\
...
...
plat/rockchip/rk3368/platform.mk
View file @
08886940
...
...
@@ -33,6 +33,10 @@ PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \
plat/common/aarch64/crash_console_helpers.S
\
plat/common/plat_psci_common.c
ifneq
(${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES
+=
${RK_PLAT_COMMON}
/rockchip_stack_protector.c
endif
BL31_SOURCES
+=
${RK_GIC_SOURCES}
\
drivers/arm/cci/cci.c
\
drivers/ti/uart/aarch64/16550_console.S
\
...
...
plat/rockchip/rk3399/platform.mk
View file @
08886940
...
...
@@ -38,6 +38,10 @@ PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \
plat/common/aarch64/crash_console_helpers.S
\
plat/common/plat_psci_common.c
ifneq
(${ENABLE_STACK_PROTECTOR},0)
PLAT_BL_COMMON_SOURCES
+=
${RK_PLAT_COMMON}
/rockchip_stack_protector.c
endif
BL31_SOURCES
+=
${RK_GIC_SOURCES}
\
drivers/arm/cci/cci.c
\
drivers/ti/uart/aarch64/16550_console.S
\
...
...
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