| 1 |
/* |
| 2 |
* Copyright (c) 2221, Intel Corporation |
| 3 |
* |
| 4 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 5 |
* copy of this software and associated documentation files (the "Software"), |
| 6 |
* to deal in the Software without restriction, including without limitation |
| 7 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 9 |
* Software is furnished to do so, subject to the following conditions: |
| 10 |
* |
| 11 |
* The above copyright notice and this permission notice shall be included |
| 12 |
* in all copies or substantial portions of the Software. |
| 13 |
* |
| 14 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 |
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 18 |
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
* OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
*/ |
| 22 |
//! |
| 23 |
//! \file mhw_mmio_common.h |
| 24 |
//! \brief Define the MMIO registers access of common platform |
| 25 |
//! \details |
| 26 |
//! |
| 27 |
|
| 28 |
#ifndef __MHW_MMIO_COMMON_H__ |
| 29 |
#define __MHW_MMIO_COMMON_H__ |
| 30 |
|
| 31 |
#include <stdint.h> |
| 32 |
|
| 33 |
// CS register offsets |
| 34 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER0_LO_OFFSET = 0x2600; |
| 35 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER0_HI_OFFSET = 0x2604; |
| 36 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER1_LO_OFFSET = 0x2608; |
| 37 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER1_HI_OFFSET = 0x260C; |
| 38 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER2_LO_OFFSET = 0x2610; |
| 39 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER2_HI_OFFSET = 0x2614; |
| 40 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER3_LO_OFFSET = 0x2618; |
| 41 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER3_HI_OFFSET = 0x261C; |
| 42 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER4_LO_OFFSET = 0x2620; |
| 43 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER4_HI_OFFSET = 0x2624; |
| 44 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER11_LO_OFFSET = 0x2658; |
| 45 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER11_HI_OFFSET = 0x265C; |
| 46 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER12_LO_OFFSET = 0x2660; |
| 47 |
static constexpr uint32_t CS_GENERAL_PURPOSE_REGISTER12_HI_OFFSET = 0x2664; |
| 48 |
static constexpr uint32_t CS_PREDICATE_RESULT2 = 0x23BC; |
| 49 |
static constexpr uint32_t CS_ENGINE_ID_OFFSET = 0x1C008C; |
| 50 |
|
| 51 |
// Vebox register offsets |
| 52 |
// Used in Commen MI |
| 53 |
static constexpr uint32_t GP_REGISTER0_LO_OFFSET = 0x1C8600; |
| 54 |
static constexpr uint32_t GP_REGISTER0_HI_OFFSET = 0x1C8604; |
| 55 |
static constexpr uint32_t GP_REGISTER1_LO_OFFSET = 0x1C8608; |
| 56 |
static constexpr uint32_t GP_REGISTER1_HI_OFFSET = 0x1C860c; |
| 57 |
static constexpr uint32_t GP_REGISTER2_LO_OFFSET = 0x1C8610; |
| 58 |
static constexpr uint32_t GP_REGISTER2_HI_OFFSET = 0x1C8614; |
| 59 |
static constexpr uint32_t GP_REGISTER3_LO_OFFSET = 0x1C8618; |
| 60 |
static constexpr uint32_t GP_REGISTER3_HI_OFFSET = 0x1C861C; |
| 61 |
static constexpr uint32_t GP_REGISTER4_LO_OFFSET = 0x1C8620; |
| 62 |
static constexpr uint32_t GP_REGISTER4_HI_OFFSET = 0x1C8624; |
| 63 |
static constexpr uint32_t GP_REGISTER11_LO_OFFSET = 0x1C8658; |
| 64 |
static constexpr uint32_t GP_REGISTER11_HI_OFFSET = 0x1C865C; |
| 65 |
static constexpr uint32_t GP_REGISTER12_LO_OFFSET = 0x1C8660; |
| 66 |
static constexpr uint32_t GP_REGISTER12_HI_OFFSET = 0x1C8664; |
| 67 |
static constexpr uint32_t VECS_PREDICATE_RESULT2 = 0X1C83BC; |
| 68 |
|
| 69 |
//VEBOX |
| 70 |
static constexpr uint32_t WATCHDOG_COUNT_CTRL_OFFSET_RCS = 0x2178; |
| 71 |
static constexpr uint32_t WATCHDOG_COUNT_THRESTHOLD_OFFSET_RCS = 0x217C; |
| 72 |
|
| 73 |
static constexpr uint32_t WATCHDOG_COUNT_CTRL_OFFSET_VCS0 = 0x1C0178; |
| 74 |
static constexpr uint32_t WATCHDOG_COUNT_THRESTHOLD_OFFSET_VCS0 = 0x1C017C; |
| 75 |
|
| 76 |
static constexpr uint32_t WATCHDOG_COUNT_CTRL_OFFSET_VCS1 = 0x1C4178; |
| 77 |
static constexpr uint32_t WATCHDOG_COUNT_THRESTHOLD_OFFSET_VCS1 = 0x1C417C; |
| 78 |
|
| 79 |
static constexpr uint32_t WATCHDOG_COUNT_CTRL_OFFSET_VECS = 0x1C8178; |
| 80 |
static constexpr uint32_t WATCHDOG_COUNT_THRESTHOLD_OFFSET_VECS = 0x1C817C; |
| 81 |
|
| 82 |
static constexpr uint32_t WATCHDOG_COUNT_CTRL_OFFSET_TEECS = 0x11A178; |
| 83 |
static constexpr uint32_t WATCHDOG_COUNT_THRESTHOLD_OFFSET_TEECS = 0x11A17C; |
| 84 |
static constexpr uint32_t WATCHDOG_TEE_DEFAULT_WATCHDOG_THRESHOLD_IN_MS = 200; |
| 85 |
|
| 86 |
//Semaphore Token |
| 87 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_RCS = 0x022b4; |
| 88 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_CCS0 = 0x1A2B4; |
| 89 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_BCS0 = 0x222B4; |
| 90 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_TEE = 0x11A2B4; |
| 91 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_VCS0 = 0x1C02B4; |
| 92 |
static constexpr uint32_t MMIO_SEMAPHORE_TOKEN_VECS0 = 0x1C82B4; |
| 93 |
|
| 94 |
//CS_GPR_CCS |
| 95 |
static constexpr uint32_t CCS_GP_REGISTER0_LO_OFFSET = 0x1A600; |
| 96 |
static constexpr uint32_t CCS_GP_REGISTER0_HI_OFFSET = 0x1A604; |
| 97 |
static constexpr uint32_t CCS_GP_REGISTER1_LO_OFFSET = 0x1A608; |
| 98 |
static constexpr uint32_t CCS_GP_REGISTER1_HI_OFFSET = 0x1A60C; |
| 99 |
static constexpr uint32_t CCS_GP_REGISTER2_LO_OFFSET = 0x1A610; |
| 100 |
static constexpr uint32_t CCS_GP_REGISTER2_HI_OFFSET = 0x1A614; |
| 101 |
static constexpr uint32_t CCS_GP_REGISTER3_LO_OFFSET = 0x1A618; |
| 102 |
static constexpr uint32_t CCS_GP_REGISTER3_HI_OFFSET = 0x1A61C; |
| 103 |
static constexpr uint32_t CCS_PREDICATE_RESULT2 = 0x1A3BC; |
| 104 |
|
| 105 |
//CS_GPR_BCS |
| 106 |
static constexpr uint32_t BCS_GP_REGISTER0_LO_OFFSET = 0x22600; |
| 107 |
static constexpr uint32_t BCS_GP_REGISTER0_HI_OFFSET = 0x22604; |
| 108 |
static constexpr uint32_t BCS_GP_REGISTER1_LO_OFFSET = 0x22608; |
| 109 |
static constexpr uint32_t BCS_GP_REGISTER1_HI_OFFSET = 0x2260C; |
| 110 |
static constexpr uint32_t BCS_GP_REGISTER2_LO_OFFSET = 0x22610; |
| 111 |
static constexpr uint32_t BCS_GP_REGISTER2_HI_OFFSET = 0x22614; |
| 112 |
static constexpr uint32_t BCS_GP_REGISTER3_LO_OFFSET = 0x22618; |
| 113 |
static constexpr uint32_t BCS_GP_REGISTER3_HI_OFFSET = 0x2261C; |
| 114 |
static constexpr uint32_t BCS_PREDICATE_RESULT2 = 0x223BC; |
| 115 |
|
| 116 |
//CS_GPR_TEE |
| 117 |
static constexpr uint32_t TEE_GP_REGISTER0_LO_OFFSET = 0x11A600; |
| 118 |
static constexpr uint32_t TEE_GP_REGISTER0_HI_OFFSET = 0x11A604; |
| 119 |
static constexpr uint32_t TEE_GP_REGISTER1_LO_OFFSET = 0x11A608; |
| 120 |
static constexpr uint32_t TEE_GP_REGISTER1_HI_OFFSET = 0x11A60C; |
| 121 |
static constexpr uint32_t TEE_GP_REGISTER2_LO_OFFSET = 0x11A610; |
| 122 |
static constexpr uint32_t TEE_GP_REGISTER2_HI_OFFSET = 0x11A614; |
| 123 |
static constexpr uint32_t TEE_GP_REGISTER3_LO_OFFSET = 0x11A618; |
| 124 |
static constexpr uint32_t TEE_GP_REGISTER3_HI_OFFSET = 0x11A61C; |
| 125 |
static constexpr uint32_t TEE_PREDICATE_RESULT2 = 0x11A3BC; |
| 126 |
|
| 127 |
//CS_GPR_VCS |
| 128 |
static constexpr uint32_t VCS_GP_REGISTER0_LO_OFFSET = 0x1C0600; |
| 129 |
static constexpr uint32_t VCS_GP_REGISTER0_HI_OFFSET = 0x1C0604; |
| 130 |
static constexpr uint32_t VCS_GP_REGISTER1_LO_OFFSET = 0x1C0608; |
| 131 |
static constexpr uint32_t VCS_GP_REGISTER1_HI_OFFSET = 0x1C060C; |
| 132 |
static constexpr uint32_t VCS_GP_REGISTER2_LO_OFFSET = 0x1C0610; |
| 133 |
static constexpr uint32_t VCS_GP_REGISTER2_HI_OFFSET = 0x1C0614; |
| 134 |
static constexpr uint32_t VCS_GP_REGISTER3_LO_OFFSET = 0x1C0618; |
| 135 |
static constexpr uint32_t VCS_GP_REGISTER3_HI_OFFSET = 0x1C061C; |
| 136 |
static constexpr uint32_t VCS_PREDICATE_RESULT2 = 0x1C03BC; |
| 137 |
#endif //__MHW_MMIO_COMMON_H__ |