From 01562b6cb567dca5440b65250da2580db52b31e8 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 11 May 2015 14:19:37 -0500 Subject: [PATCH] imd: don't recover on limit == 0 If the limit of the large starting region was set with a NULL pointer then the limit field will be 0. If the limit is zero then no attempt to recover is necessary as there is no region to recover. This prevented an early call cbmem_find() from hanging a rambi device. The config was with vboot enabled and was way before memory init in the sequence. Change-Id: I7163d93c31ecef2c108a6dde0206dc0b6f158b5c Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/10175 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi Reviewed-by: Paul Menzel --- src/lib/imd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/imd.c b/src/lib/imd.c index 02fc2b3363..612e3f10d0 100644 --- a/src/lib/imd.c +++ b/src/lib/imd.c @@ -411,6 +411,9 @@ void imd_handle_init_partial_recovery(struct imd *imd) struct imd_root_pointer *rp; struct imdr *imdr; + if (imd->lg.limit == 0) + return; + imd_handle_init(imd, (void *)imd->lg.limit); /* Initialize root pointer for the large regions. */