forked from AMDESE/sev-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding newest psp-sev.h file. Supports get_id2
Todo, add get_id2 support to sev-tool
- Loading branch information
1 parent
68f56ca
commit a3647d5
Showing
1 changed file
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Userspace interface for AMD Secure Encrypted Virtualization (SEV) | ||
* platform management commands. | ||
|
@@ -6,12 +7,7 @@ | |
* | ||
* Author: Brijesh Singh <[email protected]> | ||
* | ||
* SEV spec 0.14 is available at: | ||
* http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
* SEV API specification is available at: https://developer.amd.com/sev/ | ||
*/ | ||
|
||
#ifndef __PSP_SEV_USER_H__ | ||
|
@@ -30,7 +26,8 @@ enum { | |
SEV_PDH_GEN, | ||
SEV_PDH_CERT_EXPORT, | ||
SEV_PEK_CERT_IMPORT, | ||
SEV_GET_ID, | ||
SEV_GET_ID, /* This command is deprecated, use SEV_GET_ID2 */ | ||
SEV_GET_ID2, | ||
|
||
SEV_MAX, | ||
}; | ||
|
@@ -125,7 +122,7 @@ struct sev_user_data_pdh_cert_export { | |
} __attribute__((packed)); | ||
|
||
/** | ||
* struct sev_user_data_get_id - GET_ID command parameters | ||
* struct sev_user_data_get_id - GET_ID command parameters (deprecated) | ||
* | ||
* @socket1: Buffer to pass unique ID of first socket | ||
* @socket2: Buffer to pass unique ID of second socket | ||
|
@@ -135,6 +132,16 @@ struct sev_user_data_get_id { | |
__u8 socket2[64]; /* Out */ | ||
} __attribute__((packed)); | ||
|
||
/** | ||
* struct sev_user_data_get_id2 - GET_ID command parameters | ||
* @address: Buffer to store unique ID | ||
* @length: length of the unique ID | ||
*/ | ||
struct sev_user_data_get_id2 { | ||
__u64 address; /* In */ | ||
__u32 length; /* In/Out */ | ||
} __attribute__((packed)); | ||
|
||
/** | ||
* struct sev_issue_cmd - SEV ioctl parameters | ||
* | ||
|