/* SPDX-License-Identifier: GPL-2.0-only */ /* * HYGON Platform Security Processor (PSP) driver interface * * Copyright (C) 2024 Hygon Info Technologies Ltd. * * Author: Liyang Han */ #ifndef __PSP_HYGON_H__ #define __PSP_HYGON_H__ #include /*****************************************************************************/ /***************************** CSV interface *********************************/ /*****************************************************************************/ /** * Guest/platform management commands for CSV */ enum csv_cmd { CSV_CMD_HGSC_CERT_IMPORT = 0x300, CSV_CMD_MAX, }; /** * struct csv_data_hgsc_cert_import - HGSC_CERT_IMPORT command parameters * * @hgscsk_cert_address: HGSCSK certificate chain * @hgscsk_cert_len: len of HGSCSK certificate * @hgsc_cert_address: HGSC certificate chain * @hgsc_cert_len: len of HGSC certificate */ struct csv_data_hgsc_cert_import { u64 hgscsk_cert_address; /* In */ u32 hgscsk_cert_len; /* In */ u32 reserved; /* In */ u64 hgsc_cert_address; /* In */ u32 hgsc_cert_len; /* In */ } __packed; #ifdef CONFIG_CRYPTO_DEV_SP_PSP #else /* !CONFIG_CRYPTO_DEV_SP_PSP */ #endif /* CONFIG_CRYPTO_DEV_SP_PSP */ #endif /* __PSP_HYGON_H__ */