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