Lines Matching refs:buff
111 unsigned char *buff) in __encode_table_header_to_buff() argument
113 uint32_t *pp = (uint32_t *) buff; in __encode_table_header_to_buff()
123 unsigned char *buff) in __decode_table_header_from_buff() argument
125 uint32_t *pp = (uint32_t *)buff; in __decode_table_header_from_buff()
135 unsigned char *buff) in __update_table_header() argument
143 .buf = buff, in __update_table_header()
147 *(uint16_t *)buff = EEPROM_HDR_START; in __update_table_header()
148 __encode_table_header_to_buff(&control->tbl_hdr, buff + EEPROM_ADDRESS_SIZE); in __update_table_header()
232 unsigned char buff[EEPROM_ADDRESS_SIZE + EEPROM_TABLE_HEADER_SIZE]; in amdgpu_ras_eeprom_correct_header_tag() local
236 memset(buff, 0, EEPROM_ADDRESS_SIZE + EEPROM_TABLE_HEADER_SIZE); in amdgpu_ras_eeprom_correct_header_tag()
240 ret = __update_table_header(control, buff); in amdgpu_ras_eeprom_correct_header_tag()
248 unsigned char buff[EEPROM_ADDRESS_SIZE + EEPROM_TABLE_HEADER_SIZE] = { 0 }; in amdgpu_ras_eeprom_reset_table() local
263 ret = __update_table_header(control, buff); in amdgpu_ras_eeprom_reset_table()
276 unsigned char buff[EEPROM_ADDRESS_SIZE + EEPROM_TABLE_HEADER_SIZE] = { 0 }; in amdgpu_ras_eeprom_init() local
283 .buf = buff, in amdgpu_ras_eeprom_init()
308 __decode_table_header_from_buff(hdr, &buff[2]); in amdgpu_ras_eeprom_init()
342 unsigned char *buff) in __encode_table_record_to_buff() argument
348 buff[i++] = record->err_type; in __encode_table_record_to_buff()
350 buff[i++] = record->bank; in __encode_table_record_to_buff()
353 memcpy(buff + i, &tmp, 8); in __encode_table_record_to_buff()
357 memcpy(buff + i, &tmp, 6); in __encode_table_record_to_buff()
360 buff[i++] = record->mem_channel; in __encode_table_record_to_buff()
361 buff[i++] = record->mcumc_id; in __encode_table_record_to_buff()
364 memcpy(buff + i, &tmp, 6); in __encode_table_record_to_buff()
369 unsigned char *buff) in __decode_table_record_from_buff() argument
375 record->err_type = buff[i++]; in __decode_table_record_from_buff()
377 record->bank = buff[i++]; in __decode_table_record_from_buff()
379 memcpy(&tmp, buff + i, 8); in __decode_table_record_from_buff()
383 memcpy(&tmp, buff + i, 6); in __decode_table_record_from_buff()
387 record->mem_channel = buff[i++]; in __decode_table_record_from_buff()
388 record->mcumc_id = buff[i++]; in __decode_table_record_from_buff()
390 memcpy(&tmp, buff + i, 6); in __decode_table_record_from_buff()
432 unsigned char buff[EEPROM_ADDRESS_SIZE + in amdgpu_ras_eeprom_check_err_threshold() local
439 .buf = buff, in amdgpu_ras_eeprom_check_err_threshold()
456 __decode_table_header_from_buff(hdr, &buff[2]); in amdgpu_ras_eeprom_check_err_threshold()
477 unsigned char *buffs, *buff; in amdgpu_ras_eeprom_process_recods() local
529 buff = &buffs[i * (EEPROM_ADDRESS_SIZE + EEPROM_TABLE_RECORD_SIZE)]; in amdgpu_ras_eeprom_process_recods()
543 msg->buf = buff; in amdgpu_ras_eeprom_process_recods()
546 buff[0] = ((control->next_addr >> 8) & 0xff); in amdgpu_ras_eeprom_process_recods()
547 buff[1] = (control->next_addr & 0xff); in amdgpu_ras_eeprom_process_recods()
551 __encode_table_record_to_buff(control, record, buff + EEPROM_ADDRESS_SIZE); in amdgpu_ras_eeprom_process_recods()
571 buff = &buffs[i*(EEPROM_ADDRESS_SIZE + EEPROM_TABLE_RECORD_SIZE)]; in amdgpu_ras_eeprom_process_recods()
574 __decode_table_record_from_buff(control, record, buff + EEPROM_ADDRESS_SIZE); in amdgpu_ras_eeprom_process_recods()