Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2757852pxb; Sat, 6 Feb 2021 06:52:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDQzBv+AFiKn6ER1u8efB4la3F6nEVjxSOvnXTBYZaA0YOG/sCk/xIOyku0B6Wxt3T7aCJ X-Received: by 2002:a05:6402:20e:: with SMTP id t14mr8709479edv.178.1612623153531; Sat, 06 Feb 2021 06:52:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612623153; cv=none; d=google.com; s=arc-20160816; b=AAMdS71DapIucw9ktZQ+s2xAHwkrQj+nW8BNcxIqaz6k4jac0pCXd+7WYakrlbqa+9 4QXLjA6TCCHxuHe4QN6GmCEUkjSkTZl009HcNy2B//0r3OPcQbDHT4+/vA7jH27Kcy+h /ss6rjyqKjWsltZUH87aV5sEMku6GimEtn+PHve8s5OVHp+04bo+EZ5sO383TKEbVkmY 13RyvbYrRladiwL8U77GG/lnVzCfUkArKpvdclRw7XZXqO/PcCbJHbZjhNk62XkvWiJO +gVl1IkdVN+Yp74gVHqAXR1CgZl8uq5fAw+EGFoE2ySHiXpq0hUOErZroEIsxXcFVQpt yjiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=cClwywxUl7u5pO6OhsEPu4tXpoQHI2ZLXVU7hVav1HQ=; b=pMrvxSrvkS+RrfWxretotHc3Ek9DuiqCwl1orLK+2KRq8iWUPBLmOpLo5auCtf/iA7 ia4CN4nIaU7WLpbTjw68CYIRRed+VLtlOZNKlE3JZV7PWkLQlIDFnRtcYJ2iuReo18i1 +gga4QnJZCdhiNWhj8OuQpi2d+y5n7Ct6tRxW+Y6RIq2g1CRE1tHBmq64deayPncwBVE nhGUOTJqSnDEh72JM9a7xyDPYyUTcYQFMLyn46xfUZBAcADrr5eNYi5AJyZroIPTVaVo vtWaXXDrDH8XR7rdYEti9chbX5qt4z67sSsfhKptUVMp+hPllRFCQelaN5zNQEAxSWRz GrNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j15si8554392edw.310.2021.02.06.06.52.09; Sat, 06 Feb 2021 06:52:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbhBFOoz (ORCPT + 99 others); Sat, 6 Feb 2021 09:44:55 -0500 Received: from mga01.intel.com ([192.55.52.88]:38614 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbhBFOof (ORCPT ); Sat, 6 Feb 2021 09:44:35 -0500 IronPort-SDR: a2qNEI5UXs4KfVIVKO5WH4im873sfSpEINnr1jp4CQJBAi5D8dWUEwQ3CVGdvPmPc1wlODPiEU 0BsU+y+Kv/Tw== X-IronPort-AV: E=McAfee;i="6000,8403,9886"; a="200566038" X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="200566038" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2021 06:43:43 -0800 IronPort-SDR: HGqnJti6aRK6R4Nn8qJg7qmkjRQmtiWxGRDKjfLy4uCQ1fk2/EpLmfHvLhYnCXzit/JDG5i+MU 54uCHU348rqg== X-IronPort-AV: E=Sophos;i="5.81,158,1610438400"; d="scan'208";a="394360222" Received: from twinkler-lnx.jer.intel.com ([10.12.91.138]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2021 06:43:42 -0800 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next 4/6] mei: hbm: add client dma hbm messages Date: Sat, 6 Feb 2021 16:43:23 +0200 Message-Id: <20210206144325.25682-4-tomas.winkler@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210206144325.25682-1-tomas.winkler@intel.com> References: <20210206144325.25682-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alexander Usyskin Define structures for client DMA HBM protocol. The protocol requires passing dma buffer address and the buffer id. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h index 9577a2cc0733..b10606550613 100644 --- a/drivers/misc/mei/hw.h +++ b/drivers/misc/mei/hw.h @@ -142,6 +142,12 @@ #define MEI_HBM_CAPABILITIES_REQ_CMD 0x13 #define MEI_HBM_CAPABILITIES_RES_CMD 0x93 +#define MEI_HBM_CLIENT_DMA_MAP_REQ_CMD 0x14 +#define MEI_HBM_CLIENT_DMA_MAP_RES_CMD 0x94 + +#define MEI_HBM_CLIENT_DMA_UNMAP_REQ_CMD 0x15 +#define MEI_HBM_CLIENT_DMA_UNMAP_RES_CMD 0x95 + /* * MEI Stop Reason * used by hbm_host_stop_request.reason @@ -679,4 +685,51 @@ struct hbm_capability_response { u8 capability_granted[3]; } __packed; +/** + * struct hbm_client_dma_map_request - client dma map request from host to fw + * + * @hbm_cmd: bus message command header + * @client_buffer_id: client buffer id + * @reserved: reserved + * @address_lsb: DMA address LSB + * @address_msb: DMA address MSB + * @size: DMA size + */ +struct hbm_client_dma_map_request { + u8 hbm_cmd; + u8 client_buffer_id; + u8 reserved[2]; + u32 address_lsb; + u32 address_msb; + u32 size; +} __packed; + +/** + * struct hbm_client_dma_unmap_request + * client dma unmap request from the host to the firmware + * + * @hbm_cmd: bus message command header + * @status: unmap status + * @client_buffer_id: client buffer id + * @reserved: reserved + */ +struct hbm_client_dma_unmap_request { + u8 hbm_cmd; + u8 status; + u8 client_buffer_id; + u8 reserved; +} __packed; + +/** + * struct hbm_client_dma_response + * client dma unmap response from the firmware to the host + * + * @hbm_cmd: bus message command header + * @status: command status + */ +struct hbm_client_dma_response { + u8 hbm_cmd; + u8 status; +} __packed; + #endif -- 2.26.2