blob: b2dbfb001f4b4ca8bff15a2a79f45d6c92609c6f [file] [log] [blame]
Saurabh Gorecha70389ca2020-04-22 21:31:24 +05301/*
2 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <assert.h>
8#include <stdint.h>
9
10#include <platform.h>
11#include <platform_def.h>
12#include <qtiseclib_interface.h>
13
14u_register_t plat_get_stack_protector_canary(void)
15{
16 u_register_t random = 0x0;
17
18 /* get random data , the below API doesn't return random = 0 in success
19 * case */
20 qtiseclib_prng_get_data((uint8_t *) &random, sizeof(random));
21 assert(0x0 != random);
22
23 return random;
24}