1 /** @file 2 HTE handling routines for MRC use. 3 4 Copyright (c) 2013-2015 Intel Corporation. 5 6 This program and the accompanying materials 7 are licensed and made available under the terms and conditions of the BSD License 8 which accompanies this distribution. The full text of the license may be found at 9 http://opensource.org/licenses/bsd-license.php 10 11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 13 14 **/ 15 #ifndef __HTE_H 16 #define __HTE_H 17 18 #define STATIC static 19 #define VOID void 20 21 #if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L) 22 typedef uint32_t UINT32; 23 typedef uint16_t UINT16; 24 typedef uint8_t UINT8; 25 #endif 26 27 typedef enum 28 { 29 MrcNoHaltSystemOnError, 30 MrcHaltSystemOnError, 31 MrcHaltHteEngineOnError, 32 MrcNoHaltHteEngineOnError 33 } HALT_TYPE; 34 35 typedef enum 36 { 37 MrcMemInit, MrcMemTest 38 } MEM_INIT_OR_TEST; 39 40 #define READ_TRAIN 1 41 #define WRITE_TRAIN 2 42 43 #define HTE_MEMTEST_NUM 2 44 #define HTE_LOOP_CNT 5 // EXP_LOOP_CNT field of HTE_CMD_CTL. This CANNOT be less than 4 45 #define HTE_LFSR_VICTIM_SEED 0xF294BA21 // Random seed for victim. 46 #define HTE_LFSR_AGRESSOR_SEED 0xEBA7492D // Random seed for aggressor. 47 UINT32 48 HteMemInit( 49 MRC_PARAMS *CurrentMrcData, 50 UINT8 MemInitFlag, 51 UINT8 HaltHteEngineOnError); 52 53 UINT16 54 BasicWriteReadHTE( 55 MRC_PARAMS *CurrentMrcData, 56 UINT32 Address, 57 UINT8 FirstRun, 58 UINT8 Mode); 59 60 UINT16 61 WriteStressBitLanesHTE( 62 MRC_PARAMS *CurrentMrcData, 63 UINT32 Address, 64 UINT8 FirstRun); 65 66 VOID 67 HteMemOp( 68 UINT32 Address, 69 UINT8 FirstRun, 70 UINT8 IsWrite); 71 72 #endif 73