diff options
| author | Simon Glass <sjg@chromium.org> | 2015-10-18 15:55:36 -0600 | 
|---|---|---|
| committer | Simon Glass <sjg@chromium.org> | 2015-10-21 07:46:51 -0600 | 
| commit | fd8f4729ac6520e59dd1d3f57d503d8abe345ac5 (patch) | |
| tree | 3be919d96966c805b4b217c25ee28200b2c47cb0 /arch/x86/cpu/ivybridge/sdram.c | |
| parent | e9b3967c0c8faefb46213d6698c4bc21bf91598a (diff) | |
x86: ivybridge: Measure the MRC code execution time
This code takes about 450ms without the MRC cache and about 27ms with the
cache. Add a debug timer so that this time can be displayed.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/cpu/ivybridge/sdram.c')
| -rw-r--r-- | arch/x86/cpu/ivybridge/sdram.c | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index e63790963c9..d9b3dfc12cd 100644 --- a/arch/x86/cpu/ivybridge/sdram.c +++ b/arch/x86/cpu/ivybridge/sdram.c @@ -336,9 +336,11 @@ int sdram_initialise(struct pei_data *pei_data)  	if (data) {  		int rv;  		int (*func)(struct pei_data *); +		ulong start;  		debug("Calling MRC at %p\n", data);  		post_code(POST_PRE_MRC); +		start = get_timer(0);  		func = (int (*)(struct pei_data *))data;  		rv = func(pei_data);  		post_code(POST_MRC); @@ -356,6 +358,7 @@ int sdram_initialise(struct pei_data *pei_data)  			printf("Nonzero MRC return value.\n");  			return -EFAULT;  		} +		debug("MRC execution time %lu ms\n", get_timer(start));  	} else {  		printf("UEFI PEI System Agent not found.\n");  		return -ENOSYS; | 
