Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2019 IBM Corporation
0004  * Author: Nayna Jain
0005  *
0006  * PowerPC secure variable operations.
0007  */
0008 #ifndef SECVAR_OPS_H
0009 #define SECVAR_OPS_H
0010 
0011 #include <linux/types.h>
0012 #include <linux/errno.h>
0013 
0014 extern const struct secvar_operations *secvar_ops;
0015 
0016 struct secvar_operations {
0017     int (*get)(const char *key, uint64_t key_len, u8 *data,
0018            uint64_t *data_size);
0019     int (*get_next)(const char *key, uint64_t *key_len,
0020             uint64_t keybufsize);
0021     int (*set)(const char *key, uint64_t key_len, u8 *data,
0022            uint64_t data_size);
0023 };
0024 
0025 #ifdef CONFIG_PPC_SECURE_BOOT
0026 
0027 extern void set_secvar_ops(const struct secvar_operations *ops);
0028 
0029 #else
0030 
0031 static inline void set_secvar_ops(const struct secvar_operations *ops) { }
0032 
0033 #endif
0034 
0035 #endif