1 /* 2 * Copyright 2016 NXP Semiconductor, Inc. 3 * 4 * SPDX-License-Identifier: GPL-2.0+ 5 */ 6 7 #ifndef __SEC_FIRMWARE_H_ 8 #define __SEC_FIRMWARE_H_ 9 10 #define PSCI_INVALID_VER 0xffffffff 11 #define SEC_JR3_OFFSET 0x40000 12 #define WORD_MASK 0xffffffff 13 #define WORD_SHIFT 32 14 15 int sec_firmware_init(const void *, u32 *, u32 *, u32 *, u32 *); 16 int _sec_firmware_entry(const void *, u32 *, u32 *); 17 bool sec_firmware_is_valid(const void *); 18 bool sec_firmware_support_hwrng(void); 19 int sec_firmware_get_random(uint8_t *rand, int bytes); 20 int fdt_fixup_kaslr(void *fdt); 21 #ifdef CONFIG_SEC_FIRMWARE_ARMV8_PSCI 22 unsigned int sec_firmware_support_psci_version(void); 23 unsigned int _sec_firmware_support_psci_version(void); 24 #else 25 static inline unsigned int sec_firmware_support_psci_version(void) 26 { 27 return PSCI_INVALID_VER; 28 } 29 #endif 30 31 static inline unsigned int sec_firmware_used_jobring_offset(void) 32 { 33 return SEC_JR3_OFFSET; 34 } 35 36 #endif /* __SEC_FIRMWARE_H_ */ 37