1 /* 2 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> 4 * 5 * Ported from Intel released Quark UEFI BIOS 6 * QuarkSocPkg/QuarkNorthCluster/MemoryInit/Pei 7 * 8 * SPDX-License-Identifier: Intel 9 */ 10 11 #ifndef _HTE_H_ 12 #define _HTE_H_ 13 14 enum { 15 MRC_MEM_INIT, 16 MRC_MEM_TEST 17 }; 18 19 enum { 20 READ_TRAIN, 21 WRITE_TRAIN 22 }; 23 24 /* 25 * EXP_LOOP_CNT field of HTE_CMD_CTL 26 * 27 * This CANNOT be less than 4! 28 */ 29 #define HTE_LOOP_CNT 5 30 31 /* random seed for victim */ 32 #define HTE_LFSR_VICTIM_SEED 0xF294BA21 33 34 /* random seed for aggressor */ 35 #define HTE_LFSR_AGRESSOR_SEED 0xEBA7492D 36 37 u32 hte_mem_init(struct mrc_params *mrc_params, u8 flag); 38 u16 hte_basic_write_read(struct mrc_params *mrc_params, u32 addr, 39 u8 first_run, u8 mode); 40 u16 hte_write_stress_bit_lanes(struct mrc_params *mrc_params, 41 u32 addr, u8 first_run); 42 void hte_mem_op(u32 addr, u8 first_run, u8 is_write); 43 44 #endif /* _HTE_H_ */ 45