summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2011-08-02 18:15:01 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:21 -0700
commit5dad067ac97e48cfccb2306e0ec69156b167f10a (patch)
tree191d9845f0d42991127666438cd46d9b525db57c /lib
parent7a8e76669ac5cc5c0c4bd9c89570882dbc1bc706 (diff)
Prevent the LP0 vector from being wiped out.
It was observed that the sleep recovery fails when Kaen is in dev mode. Further investigation has shown that the LP0 vector space is set to all zeros when the system is in dev mode, which clearly prevents it from resuming operations properly. Then it turned out that the recently introduced memory u-boot wipeout fails to exclude the LP0 vector space, so it gets erased. For some reason u-boot does this in two different places in the code, so the fix adds exclusion of the LP0 vector space in those spaces. BUG=chrome-os-partner:5152 TEST=manual Build a new u-boot image, install it on a kaen. Then bring up the kaen in normal and developer mode, login, close the lid and open it back a few times. Before the fix the machine would hang every single attempt at closing the lid when in dev mode, after the fix it enters and exits sleep state seamlessly in both dev and normal modes. Change-Id: I9ec31495bca41abed68de8559560f0b1fcdd4969 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/5193 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/vboot/bootstub_entry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/vboot/bootstub_entry.c b/lib/vboot/bootstub_entry.c
index 0bae5f0b54..89351adbaa 100644
--- a/lib/vboot/bootstub_entry.c
+++ b/lib/vboot/bootstub_entry.c
@@ -149,10 +149,15 @@ static void wipe_unused_memory(const void const *fdt_ptr, vb_global_t *global)
/* Excludes stack, fdt, gd, bd, heap, u-boot, framebuffer, etc. */
memory_wipe_exclude(&wipe, get_current_sp() - STACK_MARGIN, config.end);
- /* Excludes the shared date between bootstub and main firmware. */
+ /* Excludes the shared data between bootstub and main firmware. */
memory_wipe_exclude(&wipe, (uintptr_t)global,
(uintptr_t)global + sizeof(*global));
+ /* Excludes the LP0 vector. */
+ memory_wipe_exclude(&wipe,
+ (uintptr_t)TEGRA_LP0_ADDR,
+ (uintptr_t)(TEGRA_LP0_ADDR + TEGRA_LP0_SIZE));
+
memory_wipe_execute(&wipe);
#else
printf("wipe_unused_memory depends on fdt_decode_memory which"