diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-08-02 18:15:01 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:21 -0700 |
commit | 5dad067ac97e48cfccb2306e0ec69156b167f10a (patch) | |
tree | 191d9845f0d42991127666438cd46d9b525db57c /common/cmd_vboot_twostop.c | |
parent | 7a8e76669ac5cc5c0c4bd9c89570882dbc1bc706 (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 'common/cmd_vboot_twostop.c')
-rw-r--r-- | common/cmd_vboot_twostop.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/cmd_vboot_twostop.c b/common/cmd_vboot_twostop.c index a3131f27495..d956c528cd4 100644 --- a/common/cmd_vboot_twostop.c +++ b/common/cmd_vboot_twostop.c @@ -220,12 +220,17 @@ static void wipe_unused_memory(const void const *fdt, /* 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)cdata, (uintptr_t)cdata + sizeof(*cdata)); memory_wipe_exclude(&wipe, (uintptr_t)cparams->gbb_data, (uintptr_t)cparams->gbb_data + cparams->gbb_size); + /* 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" |