2016-06-28 12:18:13 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 NXP Semiconductor, Inc.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SEC_FIRMWARE_H_
|
|
|
|
#define __SEC_FIRMWARE_H_
|
|
|
|
|
2017-04-19 05:27:39 +00:00
|
|
|
#define PSCI_INVALID_VER 0xffffffff
|
2017-08-16 10:28:10 +00:00
|
|
|
#define SEC_JR3_OFFSET 0x40000
|
2017-09-01 08:25:01 +00:00
|
|
|
#define WORD_MASK 0xffffffff
|
|
|
|
#define WORD_SHIFT 32
|
2017-04-19 05:27:39 +00:00
|
|
|
|
2017-09-01 08:25:01 +00:00
|
|
|
int sec_firmware_init(const void *, u32 *, u32 *, u32 *, u32 *);
|
2016-06-28 12:18:13 +00:00
|
|
|
int _sec_firmware_entry(const void *, u32 *, u32 *);
|
|
|
|
bool sec_firmware_is_valid(const void *);
|
2017-08-16 10:28:10 +00:00
|
|
|
bool sec_firmware_support_hwrng(void);
|
|
|
|
int sec_firmware_get_random(uint8_t *rand, int bytes);
|
|
|
|
int fdt_fixup_kaslr(void *fdt);
|
2017-01-16 09:31:48 +00:00
|
|
|
#ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI
|
2016-06-28 12:18:13 +00:00
|
|
|
unsigned int sec_firmware_support_psci_version(void);
|
|
|
|
unsigned int _sec_firmware_support_psci_version(void);
|
2017-04-19 05:27:39 +00:00
|
|
|
#else
|
|
|
|
static inline unsigned int sec_firmware_support_psci_version(void)
|
|
|
|
{
|
|
|
|
return PSCI_INVALID_VER;
|
|
|
|
}
|
2016-06-28 12:18:13 +00:00
|
|
|
#endif
|
|
|
|
|
2017-08-16 10:28:10 +00:00
|
|
|
static inline unsigned int sec_firmware_used_jobring_offset(void)
|
|
|
|
{
|
|
|
|
return SEC_JR3_OFFSET;
|
|
|
|
}
|
|
|
|
|
2016-06-28 12:18:13 +00:00
|
|
|
#endif /* __SEC_FIRMWARE_H_ */
|