1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2014-2021 Intel Corporation 4 */ 5 6 #ifndef _ABI_GUC_COMMUNICATION_MMIO_ABI_H 7 #define _ABI_GUC_COMMUNICATION_MMIO_ABI_H 8 9 /** 10 * DOC: MMIO based communication 11 * 12 * The MMIO based communication between Host and GuC uses software scratch 13 * registers, where first register holds data treated as message header, 14 * and other registers are used to hold message payload. 15 * 16 * For Gen9+, GuC uses software scratch registers 0xC180-0xC1B8, 17 * but no H2G command takes more than 8 parameters and the GuC FW 18 * itself uses an 8-element array to store the H2G message. 19 * 20 * +-----------+---------+---------+---------+ 21 * | MMIO[0] | MMIO[1] | ... | MMIO[n] | 22 * +-----------+---------+---------+---------+ 23 * | header | optional payload | 24 * +======+====+=========+=========+=========+ 25 * | 31:28|type| | | | 26 * +------+----+ | | | 27 * | 27:16|data| | | | 28 * +------+----+ | | | 29 * | 15:0|code| | | | 30 * +------+----+---------+---------+---------+ 31 * 32 * The message header consists of: 33 * 34 * - **type**, indicates message type 35 * - **code**, indicates message code, is specific for **type** 36 * - **data**, indicates message data, optional, depends on **code** 37 * 38 * The following message **types** are supported: 39 * 40 * - **REQUEST**, indicates Host-to-GuC request, requested GuC action code 41 * must be priovided in **code** field. Optional action specific parameters 42 * can be provided in remaining payload registers or **data** field. 43 * 44 * - **RESPONSE**, indicates GuC-to-Host response from earlier GuC request, 45 * action response status will be provided in **code** field. Optional 46 * response data can be returned in remaining payload registers or **data** 47 * field. 48 */ 49 50 #define GUC_MAX_MMIO_MSG_LEN 8 51 52 #endif /* _ABI_GUC_COMMUNICATION_MMIO_ABI_H */ 53