mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-19 11:04:20 +00:00

This commit change the plat/qemu directory structure into: `-- plat `-- qemu |-- common (files shared with all qemu subplatforms) |-- qemu (original qemu platform) |-- qemu_sbsa (new sqemu_sbsa platform) |-- subplat1 `-- subplat2 This opens the possibility of adding new qemu sub-platforms which reuse existing common platform code. The first platform which will leverage new structure will be SBSA platform. Signed-off-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com> Change-Id: Id0d8133e1fffc1b574b69aa2770ebc02bb837a9b
24 lines
653 B
C
24 lines
653 B
C
/*
|
|
* Copyright (c) 2018, 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();
|
|
}
|
|
|