10a8e247dSMichal Wajdeczko /* SPDX-License-Identifier: MIT */ 20a8e247dSMichal Wajdeczko /* 30a8e247dSMichal Wajdeczko * Copyright © 2014-2021 Intel Corporation 40a8e247dSMichal Wajdeczko */ 50a8e247dSMichal Wajdeczko 60a8e247dSMichal Wajdeczko #ifndef _ABI_GUC_ACTIONS_ABI_H 70a8e247dSMichal Wajdeczko #define _ABI_GUC_ACTIONS_ABI_H 80a8e247dSMichal Wajdeczko 9572f2a5cSMichal Wajdeczko /** 1077b6f79dSJohn Harrison * DOC: HOST2GUC_SELF_CFG 11572f2a5cSMichal Wajdeczko * 1277b6f79dSJohn Harrison * This message is used by Host KMD to setup of the `GuC Self Config KLVs`_. 13572f2a5cSMichal Wajdeczko * 14572f2a5cSMichal Wajdeczko * This message must be sent as `MMIO HXG Message`_. 15572f2a5cSMichal Wajdeczko * 16572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 17572f2a5cSMichal Wajdeczko * | | Bits | Description | 18572f2a5cSMichal Wajdeczko * +===+=======+==============================================================+ 19572f2a5cSMichal Wajdeczko * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ | 20572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 21572f2a5cSMichal Wajdeczko * | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ | 22572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 23572f2a5cSMichal Wajdeczko * | | 27:16 | DATA0 = MBZ | 24572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 2577b6f79dSJohn Harrison * | | 15:0 | ACTION = _`GUC_ACTION_HOST2GUC_SELF_CFG` = 0x0508 | 26572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 2777b6f79dSJohn Harrison * | 1 | 31:16 | **KLV_KEY** - KLV key, see `GuC Self Config KLVs`_ | 28572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 2977b6f79dSJohn Harrison * | | 15:0 | **KLV_LEN** - KLV length | 30572f2a5cSMichal Wajdeczko * | | | | 3177b6f79dSJohn Harrison * | | | - 32 bit KLV = 1 | 3277b6f79dSJohn Harrison * | | | - 64 bit KLV = 2 | 33572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 3477b6f79dSJohn Harrison * | 2 | 31:0 | **VALUE32** - Bits 31-0 of the KLV value | 35572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 3677b6f79dSJohn Harrison * | 3 | 31:0 | **VALUE64** - Bits 63-32 of the KLV value (**KLV_LEN** = 2) | 37572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 38572f2a5cSMichal Wajdeczko * 39572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 40572f2a5cSMichal Wajdeczko * | | Bits | Description | 41572f2a5cSMichal Wajdeczko * +===+=======+==============================================================+ 42572f2a5cSMichal Wajdeczko * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ | 43572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 44572f2a5cSMichal Wajdeczko * | | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_ | 45572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 4677b6f79dSJohn Harrison * | | 27:0 | DATA0 = **NUM** - 1 if KLV was parsed, 0 if not recognized | 47572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 48572f2a5cSMichal Wajdeczko */ 4977b6f79dSJohn Harrison #define GUC_ACTION_HOST2GUC_SELF_CFG 0x0508 50572f2a5cSMichal Wajdeczko 5177b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_REQUEST_MSG_LEN (GUC_HXG_REQUEST_MSG_MIN_LEN + 3u) 5277b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0 53*962bd34bSBorislav Petkov #define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_KEY (0xffffU << 16) 5477b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_REQUEST_MSG_1_KLV_LEN (0xffff << 0) 5577b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_REQUEST_MSG_2_VALUE32 GUC_HXG_REQUEST_MSG_n_DATAn 5677b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_REQUEST_MSG_3_VALUE64 GUC_HXG_REQUEST_MSG_n_DATAn 57572f2a5cSMichal Wajdeczko 5877b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN 5977b6f79dSJohn Harrison #define HOST2GUC_SELF_CFG_RESPONSE_MSG_0_NUM GUC_HXG_RESPONSE_MSG_0_DATA0 60572f2a5cSMichal Wajdeczko 61572f2a5cSMichal Wajdeczko /** 6277b6f79dSJohn Harrison * DOC: HOST2GUC_CONTROL_CTB 63572f2a5cSMichal Wajdeczko * 6477b6f79dSJohn Harrison * This H2G action allows Vf Host to enable or disable H2G and G2H `CT Buffer`_. 65572f2a5cSMichal Wajdeczko * 66572f2a5cSMichal Wajdeczko * This message must be sent as `MMIO HXG Message`_. 67572f2a5cSMichal Wajdeczko * 68572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 69572f2a5cSMichal Wajdeczko * | | Bits | Description | 70572f2a5cSMichal Wajdeczko * +===+=======+==============================================================+ 71572f2a5cSMichal Wajdeczko * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_HOST_ | 72572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 73572f2a5cSMichal Wajdeczko * | | 30:28 | TYPE = GUC_HXG_TYPE_REQUEST_ | 74572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 75572f2a5cSMichal Wajdeczko * | | 27:16 | DATA0 = MBZ | 76572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 7777b6f79dSJohn Harrison * | | 15:0 | ACTION = _`GUC_ACTION_HOST2GUC_CONTROL_CTB` = 0x4509 | 78572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 7977b6f79dSJohn Harrison * | 1 | 31:0 | **CONTROL** - control `CTB based communication`_ | 80572f2a5cSMichal Wajdeczko * | | | | 8177b6f79dSJohn Harrison * | | | - _`GUC_CTB_CONTROL_DISABLE` = 0 | 8277b6f79dSJohn Harrison * | | | - _`GUC_CTB_CONTROL_ENABLE` = 1 | 83572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 84572f2a5cSMichal Wajdeczko * 85572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 86572f2a5cSMichal Wajdeczko * | | Bits | Description | 87572f2a5cSMichal Wajdeczko * +===+=======+==============================================================+ 88572f2a5cSMichal Wajdeczko * | 0 | 31 | ORIGIN = GUC_HXG_ORIGIN_GUC_ | 89572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 90572f2a5cSMichal Wajdeczko * | | 30:28 | TYPE = GUC_HXG_TYPE_RESPONSE_SUCCESS_ | 91572f2a5cSMichal Wajdeczko * | +-------+--------------------------------------------------------------+ 92572f2a5cSMichal Wajdeczko * | | 27:0 | DATA0 = MBZ | 93572f2a5cSMichal Wajdeczko * +---+-------+--------------------------------------------------------------+ 94572f2a5cSMichal Wajdeczko */ 9577b6f79dSJohn Harrison #define GUC_ACTION_HOST2GUC_CONTROL_CTB 0x4509 96572f2a5cSMichal Wajdeczko 9777b6f79dSJohn Harrison #define HOST2GUC_CONTROL_CTB_REQUEST_MSG_LEN (GUC_HXG_REQUEST_MSG_MIN_LEN + 1u) 9877b6f79dSJohn Harrison #define HOST2GUC_CONTROL_CTB_REQUEST_MSG_0_MBZ GUC_HXG_REQUEST_MSG_0_DATA0 9977b6f79dSJohn Harrison #define HOST2GUC_CONTROL_CTB_REQUEST_MSG_1_CONTROL GUC_HXG_REQUEST_MSG_n_DATAn 10077b6f79dSJohn Harrison #define GUC_CTB_CONTROL_DISABLE 0u 10177b6f79dSJohn Harrison #define GUC_CTB_CONTROL_ENABLE 1u 102572f2a5cSMichal Wajdeczko 10377b6f79dSJohn Harrison #define HOST2GUC_CONTROL_CTB_RESPONSE_MSG_LEN GUC_HXG_RESPONSE_MSG_MIN_LEN 10477b6f79dSJohn Harrison #define HOST2GUC_CONTROL_CTB_RESPONSE_MSG_0_MBZ GUC_HXG_RESPONSE_MSG_0_DATA0 105572f2a5cSMichal Wajdeczko 106572f2a5cSMichal Wajdeczko /* legacy definitions */ 107572f2a5cSMichal Wajdeczko 1080a8e247dSMichal Wajdeczko enum intel_guc_action { 1090a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_DEFAULT = 0x0, 1100a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_REQUEST_PREEMPTION = 0x2, 1110a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_REQUEST_ENGINE_RESET = 0x3, 1120a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_ALLOCATE_DOORBELL = 0x10, 1130a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_DEALLOCATE_DOORBELL = 0x20, 1140a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_LOG_BUFFER_FILE_FLUSH_COMPLETE = 0x30, 1150a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_UK_LOG_ENABLE_LOGGING = 0x40, 1160a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_FORCE_LOG_BUFFER_FLUSH = 0x302, 1170a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_ENTER_S_STATE = 0x501, 1180a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_EXIT_S_STATE = 0x502, 11956bc8874SMatthew Brost INTEL_GUC_ACTION_GLOBAL_SCHED_POLICY_CHANGE = 0x506, 12056bc8874SMatthew Brost INTEL_GUC_ACTION_SCHED_CONTEXT = 0x1000, 12156bc8874SMatthew Brost INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_SET = 0x1001, 12256bc8874SMatthew Brost INTEL_GUC_ACTION_SCHED_CONTEXT_MODE_DONE = 0x1002, 12356bc8874SMatthew Brost INTEL_GUC_ACTION_SCHED_ENGINE_MODE_SET = 0x1003, 12456bc8874SMatthew Brost INTEL_GUC_ACTION_SCHED_ENGINE_MODE_DONE = 0x1004, 12556bc8874SMatthew Brost INTEL_GUC_ACTION_CONTEXT_RESET_NOTIFICATION = 0x1008, 12656bc8874SMatthew Brost INTEL_GUC_ACTION_ENGINE_FAILURE_NOTIFICATION = 0x1009, 1272584b354SJohn Harrison INTEL_GUC_ACTION_HOST2GUC_UPDATE_CONTEXT_POLICIES = 0x100B, 128216d56c5SVinay Belgaumkar INTEL_GUC_ACTION_SETUP_PC_GUCRC = 0x3004, 1290a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_AUTHENTICATE_HUC = 0x4000, 1308781f051SJohn Harrison INTEL_GUC_ACTION_GET_HWCONFIG = 0x4100, 13156bc8874SMatthew Brost INTEL_GUC_ACTION_REGISTER_CONTEXT = 0x4502, 13256bc8874SMatthew Brost INTEL_GUC_ACTION_DEREGISTER_CONTEXT = 0x4503, 13356bc8874SMatthew Brost INTEL_GUC_ACTION_DEREGISTER_CONTEXT_DONE = 0x4600, 134c2aa552fSMatthew Brost INTEL_GUC_ACTION_REGISTER_CONTEXT_MULTI_LRC = 0x4601, 13577b6f79dSJohn Harrison INTEL_GUC_ACTION_CLIENT_SOFT_RESET = 0x5507, 13677cdd054SUmesh Nerlige Ramappa INTEL_GUC_ACTION_SET_ENG_UTIL_BUFF = 0x550A, 13777b6f79dSJohn Harrison INTEL_GUC_ACTION_STATE_CAPTURE_NOTIFICATION = 0x8002, 13877b6f79dSJohn Harrison INTEL_GUC_ACTION_NOTIFY_FLUSH_LOG_BUFFER_TO_FILE = 0x8003, 13977b6f79dSJohn Harrison INTEL_GUC_ACTION_NOTIFY_CRASH_DUMP_POSTED = 0x8004, 14077b6f79dSJohn Harrison INTEL_GUC_ACTION_NOTIFY_EXCEPTION = 0x8005, 1410a8e247dSMichal Wajdeczko INTEL_GUC_ACTION_LIMIT 1420a8e247dSMichal Wajdeczko }; 1430a8e247dSMichal Wajdeczko 144216d56c5SVinay Belgaumkar enum intel_guc_rc_options { 145216d56c5SVinay Belgaumkar INTEL_GUCRC_HOST_CONTROL, 146216d56c5SVinay Belgaumkar INTEL_GUCRC_FIRMWARE_CONTROL, 147216d56c5SVinay Belgaumkar }; 148216d56c5SVinay Belgaumkar 1490a8e247dSMichal Wajdeczko enum intel_guc_preempt_options { 1500a8e247dSMichal Wajdeczko INTEL_GUC_PREEMPT_OPTION_DROP_WORK_Q = 0x4, 1510a8e247dSMichal Wajdeczko INTEL_GUC_PREEMPT_OPTION_DROP_SUBMIT_Q = 0x8, 1520a8e247dSMichal Wajdeczko }; 1530a8e247dSMichal Wajdeczko 1540a8e247dSMichal Wajdeczko enum intel_guc_report_status { 1550a8e247dSMichal Wajdeczko INTEL_GUC_REPORT_STATUS_UNKNOWN = 0x0, 1560a8e247dSMichal Wajdeczko INTEL_GUC_REPORT_STATUS_ACKED = 0x1, 1570a8e247dSMichal Wajdeczko INTEL_GUC_REPORT_STATUS_ERROR = 0x2, 1580a8e247dSMichal Wajdeczko INTEL_GUC_REPORT_STATUS_COMPLETE = 0x4, 1590a8e247dSMichal Wajdeczko }; 1600a8e247dSMichal Wajdeczko 1610a8e247dSMichal Wajdeczko enum intel_guc_sleep_state_status { 1620a8e247dSMichal Wajdeczko INTEL_GUC_SLEEP_STATE_SUCCESS = 0x1, 1630a8e247dSMichal Wajdeczko INTEL_GUC_SLEEP_STATE_PREEMPT_TO_IDLE_FAILED = 0x2, 1640a8e247dSMichal Wajdeczko INTEL_GUC_SLEEP_STATE_ENGINE_RESET_FAILED = 0x3 1650a8e247dSMichal Wajdeczko #define INTEL_GUC_SLEEP_STATE_INVALID_MASK 0x80000000 1660a8e247dSMichal Wajdeczko }; 1670a8e247dSMichal Wajdeczko 1680a8e247dSMichal Wajdeczko #define GUC_LOG_CONTROL_LOGGING_ENABLED (1 << 0) 1690a8e247dSMichal Wajdeczko #define GUC_LOG_CONTROL_VERBOSITY_SHIFT 4 1700a8e247dSMichal Wajdeczko #define GUC_LOG_CONTROL_VERBOSITY_MASK (0xF << GUC_LOG_CONTROL_VERBOSITY_SHIFT) 1710a8e247dSMichal Wajdeczko #define GUC_LOG_CONTROL_DEFAULT_LOGGING (1 << 8) 1720a8e247dSMichal Wajdeczko 173f5718a72SAlan Previn enum intel_guc_state_capture_event_status { 174f5718a72SAlan Previn INTEL_GUC_STATE_CAPTURE_EVENT_STATUS_SUCCESS = 0x0, 175f5718a72SAlan Previn INTEL_GUC_STATE_CAPTURE_EVENT_STATUS_NOSPACE = 0x1, 176f5718a72SAlan Previn }; 177f5718a72SAlan Previn 178f5718a72SAlan Previn #define INTEL_GUC_STATE_CAPTURE_EVENT_STATUS_MASK 0x000000FF 179f5718a72SAlan Previn 1800a8e247dSMichal Wajdeczko #endif /* _ABI_GUC_ACTIONS_ABI_H */ 181