/* * Copyright (C) 2019 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ #ifndef __AMDGPU_UMC_H__ #define __AMDGPU_UMC_H__ #include"amdgpu_ras.h" #include"amdgpu_mca.h" /* * (addr / 256) * 4096, the higher 26 bits in ErrorAddr * is the index of 4KB block
*/ #define ADDR_OF_4KB_BLOCK(addr) (((addr) & ~0xffULL) << 4) /* * (addr / 256) * 8192, the higher 26 bits in ErrorAddr * is the index of 8KB block
*/ #define ADDR_OF_8KB_BLOCK(addr) (((addr) & ~0xffULL) << 5) /* * (addr / 256) * 32768, the higher 26 bits in ErrorAddr * is the index of 8KB block
*/ #define ADDR_OF_32KB_BLOCK(addr) (((addr) & ~0xffULL) << 7) /* channel index is the index of 256B block */ #define ADDR_OF_256B_BLOCK(channel_index) ((channel_index) << 8) /* offset in 256B block */ #define OFFSET_IN_256B_BLOCK(addr) ((addr) & 0xffULL)
/* Page retirement tag */ #define UMC_ECC_NEW_DETECTED_TAG 0x1 /* * a flag to indicate v2 of channel index stored in eeprom * * v1 (legacy way): store channel index within a umc instance in eeprom * range in UMC v12: 0 ~ 7 * v2: store global channel index in eeprom * range in UMC v12: 0 ~ 127 * * NOTE: it's better to store it in eeprom_table_record.mem_channel, * but there is only 8 bits in mem_channel, and the channel number may * increase in the future, we decide to save it in * eeprom_table_record.retired_page. retired_page is useless in v2, * we depend on eeprom_table_record.address instead of retired_page in v2. * Only 48 bits are saved on eeprom, use bit 47 here.
*/ #define UMC_CHANNEL_IDX_V2 BIT_ULL(47)
/* * save nps value to eeprom_table_record.retired_page[47:40], * the channel index flag above will be retired.
*/ #define UMC_NPS_SHIFT 40 #define UMC_NPS_MASK 0xffULL
/* three column bits and one row bit in MCA address flip * in bad page retirement
*/ #define RETIRE_FLIP_BITS_NUM 4
struct amdgpu_umc { /* max error count in one ras query call */
uint32_t max_ras_err_cnt_per_query; /* number of umc channel instance with memory map register access */
uint32_t channel_inst_num; /* number of umc instance with memory map register access */
uint32_t umc_inst_num;
/* Total number of umc node instance including harvest one */
uint32_t node_inst_num;
/* UMC regiser per channel offset */
uint32_t channel_offs; /* how many pages are retired in one UE */
uint32_t retire_unit; /* channel index table of interleaved memory */ const uint32_t *channel_idx_tbl; struct ras_common_if *ras_if;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.