-
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.
drm/i915/pxp: Separate PXP FW interface structures for both v42 and 43
Previously, we only used PXP FW interface version-42 structures for PXP arbitration session on ADL/TGL products and version-43 for HuC authentication on DG2. That worked fine despite not differentiating such versioning of the PXP firmware interaction structures. This was okay back then because the only commands used via version 42 was not used via version 43 and vice versa. With MTL, we'll need both these versions side by side for the same commands (PXP-session) with the older platform feature support. That said, let's create separate files to define the structures and definitions for both version-42 and 43 of PXP FW interfaces. Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221108045628.4187260-2-alan.previn.teres.alexis@intel.com
- Loading branch information
Alan Previn
authored and
Daniele Ceraolo Spurio
committed
Nov 16, 2022
1 parent
5524b5e
commit 07db5bd
Showing
6 changed files
with
100 additions
and
68 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright(c) 2020, Intel Corporation. All rights reserved. | ||
*/ | ||
|
||
#ifndef __INTEL_PXP_FW_INTERFACE_42_H__ | ||
#define __INTEL_PXP_FW_INTERFACE_42_H__ | ||
|
||
#include <linux/types.h> | ||
#include "intel_pxp_cmd_interface_cmn.h" | ||
|
||
/* PXP-Opcode for Init Session */ | ||
#define PXP42_CMDID_INIT_SESSION 0x1e | ||
|
||
/* PXP-Input-Packet: Init Session (Arb-Session) */ | ||
struct pxp42_create_arb_in { | ||
struct pxp_cmd_header header; | ||
u32 protection_mode; | ||
#define PXP42_ARB_SESSION_MODE_HEAVY 0x2 | ||
u32 session_id; | ||
} __packed; | ||
|
||
/* PXP-Output-Packet: Init Session */ | ||
struct pxp42_create_arb_out { | ||
struct pxp_cmd_header header; | ||
} __packed; | ||
|
||
#endif /* __INTEL_PXP_FW_INTERFACE_42_H__ */ |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright(c) 2022, Intel Corporation. All rights reserved. | ||
*/ | ||
|
||
#ifndef __INTEL_PXP_FW_INTERFACE_43_H__ | ||
#define __INTEL_PXP_FW_INTERFACE_43_H__ | ||
|
||
#include <linux/types.h> | ||
#include "intel_pxp_cmd_interface_cmn.h" | ||
|
||
/* PXP-Cmd-Op definitions */ | ||
#define PXP43_CMDID_START_HUC_AUTH 0x0000003A | ||
|
||
/* PXP-Input-Packet: HUC-Authentication */ | ||
struct pxp43_start_huc_auth_in { | ||
struct pxp_cmd_header header; | ||
__le64 huc_base_address; | ||
} __packed; | ||
|
||
/* PXP-Output-Packet: HUC-Authentication */ | ||
struct pxp43_start_huc_auth_out { | ||
struct pxp_cmd_header header; | ||
} __packed; | ||
|
||
#endif /* __INTEL_PXP_FW_INTERFACE_43_H__ */ |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright(c) 2022, Intel Corporation. All rights reserved. | ||
*/ | ||
|
||
#ifndef __INTEL_PXP_FW_INTERFACE_CMN_H__ | ||
#define __INTEL_PXP_FW_INTERFACE_CMN_H__ | ||
|
||
#include <linux/types.h> | ||
|
||
#define PXP_APIVER(x, y) (((x) & 0xFFFF) << 16 | ((y) & 0xFFFF)) | ||
|
||
/* | ||
* there are a lot of status codes for PXP, but we only define the cross-API | ||
* common ones that we actually can handle in the kernel driver. Other failure | ||
* codes should be printed to error msg for debug. | ||
*/ | ||
enum pxp_status { | ||
PXP_STATUS_SUCCESS = 0x0, | ||
PXP_STATUS_OP_NOT_PERMITTED = 0x4013 | ||
}; | ||
|
||
/* Common PXP FW message header */ | ||
struct pxp_cmd_header { | ||
u32 api_version; | ||
u32 command_id; | ||
union { | ||
u32 status; /* out */ | ||
u32 stream_id; /* in */ | ||
}; | ||
/* Length of the message (excluding the header) */ | ||
u32 buffer_len; | ||
} __packed; | ||
|
||
#endif /* __INTEL_PXP_FW_INTERFACE_CMN_H__ */ |
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
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
This file was deleted.
Oops, something went wrong.