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>
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);
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;