From: Simon Glass Date: Sun, 18 Oct 2015 15:55:36 -0600 Subject: [U-Boot] [PATCH 8/9] x86: ivybridge: Measure the MRC code execution time In-Reply-To: <1445205337-32504-1-git-send-email-sjg@chromium.org> References: <1445205337-32504-1-git-send-email-sjg@chromium.org> Message-ID: <1445205337-32504-9-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- arch/x86/cpu/ivybridge/sdram.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/cpu/ivybridge/sdram.c b/arch/x86/cpu/ivybridge/sdram.c index e637909..d9b3dfc 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; -- 2.6.0.rc2.230.g3dd15c0