mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-08-22 00:42:01 +02:00

The version is obtained via a dedicated MKHI GSC HECI command. The compatibility version is what we want to match against for the GSC, so we need to call the FW version checker after obtaining the version. Since this is the first time we send a GSC HECI command via the GSCCS, this patch also introduces common infrastructure to send such commands to the GSC. Communication with the GSC FW is done via input/output buffers, whose addresses are provided via a GSCCS command. The buffers contain a generic header and a client-specific packet (e.g. PXP, HDCP); the clients don't care about the header format and/or the GSCCS command in the batch, they only care about their client-specific header. This patch therefore introduces helpers that allow the callers to automatically fill in the input header, submit the GSCCS job and decode the output header, to make it so that the caller only needs to worry about their client-specific input and output messages. v3: squash of 2 separate patches ahead of merge, so that the common functions and their first user are added at the same time Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Cc: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: John Harrison <John.C.Harrison@Intel.Com> #v1 Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
47 lines
999 B
C
47 lines
999 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2023 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _ABI_GSC_COMMAND_HEADER_ABI_H
|
|
#define _ABI_GSC_COMMAND_HEADER_ABI_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct intel_gsc_mtl_header {
|
|
u32 validity_marker;
|
|
#define GSC_HECI_VALIDITY_MARKER 0xA578875A
|
|
|
|
u8 heci_client_id;
|
|
|
|
u8 reserved1;
|
|
|
|
u16 header_version;
|
|
#define MTL_GSC_HEADER_VERSION 1
|
|
|
|
/* FW allows host to decide host_session handle as it sees fit. */
|
|
u64 host_session_handle;
|
|
|
|
/* handle generated by FW for messages that need to be re-submitted */
|
|
u64 gsc_message_handle;
|
|
|
|
u32 message_size; /* lower 20 bits only, upper 12 are reserved */
|
|
|
|
/*
|
|
* Flags mask:
|
|
* Bit 0: Pending
|
|
* Bit 1: Session Cleanup;
|
|
* Bits 2-15: Flags
|
|
* Bits 16-31: Extension Size
|
|
* According to internal spec flags are either input or output
|
|
* we distinguish the flags using OUTFLAG or INFLAG
|
|
*/
|
|
u32 flags;
|
|
#define GSC_OUTFLAG_MSG_PENDING BIT(0)
|
|
#define GSC_INFLAG_MSG_CLEANUP BIT(1)
|
|
|
|
u32 status;
|
|
} __packed;
|
|
|
|
#endif
|