| 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* |
| 3 | * Copyright(c) 2022, Intel Corporation. All rights reserved. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __INTEL_PXP_FW_INTERFACE_43_H__ |
| 7 | #define __INTEL_PXP_FW_INTERFACE_43_H__ |
| 8 | |
| 9 | #include <linux/types.h> |
| 10 | #include "intel_pxp_cmd_interface_cmn.h" |
| 11 | |
| 12 | /* PXP-Cmd-Op definitions */ |
| 13 | #define PXP43_CMDID_START_HUC_AUTH 0x0000003A |
| 14 | #define PXP43_CMDID_NEW_HUC_AUTH 0x0000003F /* MTL+ */ |
| 15 | #define PXP43_CMDID_INIT_SESSION 0x00000036 |
| 16 | |
| 17 | /* PXP-Packet sizes for MTL's GSCCS-HECI instruction is spec'd at 65K before page alignment*/ |
| 18 | #define PXP43_MAX_HECI_INOUT_SIZE (PAGE_ALIGN(SZ_64K + SZ_1K)) |
| 19 | |
| 20 | /* PXP-Packet size for MTL's NEW_HUC_AUTH instruction */ |
| 21 | #define PXP43_HUC_AUTH_INOUT_SIZE (SZ_4K) |
| 22 | |
| 23 | /* PXP-Input-Packet: HUC Load and Authentication */ |
| 24 | struct pxp43_start_huc_auth_in { |
| 25 | struct pxp_cmd_header ; |
| 26 | __le64 huc_base_address; |
| 27 | } __packed; |
| 28 | |
| 29 | /* PXP-Input-Packet: HUC Auth-only */ |
| 30 | struct pxp43_new_huc_auth_in { |
| 31 | struct pxp_cmd_header ; |
| 32 | u64 huc_base_address; |
| 33 | u32 huc_size; |
| 34 | } __packed; |
| 35 | |
| 36 | /* PXP-Output-Packet: HUC Load and Authentication or Auth-only */ |
| 37 | struct pxp43_huc_auth_out { |
| 38 | struct pxp_cmd_header ; |
| 39 | } __packed; |
| 40 | |
| 41 | /* PXP-Input-Packet: Init PXP session */ |
| 42 | struct pxp43_create_arb_in { |
| 43 | struct pxp_cmd_header ; |
| 44 | /* header.stream_id fields for version 4.3 of Init PXP session: */ |
| 45 | #define PXP43_INIT_SESSION_VALID BIT(0) |
| 46 | #define PXP43_INIT_SESSION_APPTYPE BIT(1) |
| 47 | #define PXP43_INIT_SESSION_APPID GENMASK(17, 2) |
| 48 | u32 protection_mode; |
| 49 | #define PXP43_INIT_SESSION_PROTECTION_ARB 0x2 |
| 50 | u32 sub_session_id; |
| 51 | u32 init_flags; |
| 52 | u32 rsvd[12]; |
| 53 | } __packed; |
| 54 | |
| 55 | /* PXP-Input-Packet: Init PXP session */ |
| 56 | struct pxp43_create_arb_out { |
| 57 | struct pxp_cmd_header ; |
| 58 | u32 rsvd[8]; |
| 59 | } __packed; |
| 60 | |
| 61 | #endif /* __INTEL_PXP_FW_INTERFACE_43_H__ */ |
| 62 | |