diff options
author | Simon Glass <sjg@chromium.org> | 2012-09-07 16:57:26 -0700 |
---|---|---|
committer | Katie Roberts-Hoffman <katierh@chromium.org> | 2012-09-10 20:41:47 -0700 |
commit | 08ed1b3b2403d40204cb6641678b9a01b27aea7d (patch) | |
tree | c6ccb5c43bc74b5642a7902b0ba98aca0147d118 | |
parent | 5a592e94b5fb26eb2ca5b65121fca0f37e270492 (diff) | |
download | vboot-08ed1b3b2403d40204cb6641678b9a01b27aea7d.tar.gz |
Don't copy BMP data on ARMfirmware-snow-2695.90.B
This just chews up memory and wastes time on ARM, since the data is already
in memory.
BUG=chrome-os-partner:13492
BRANCH=snow
TEST=manual
Build and boot on snow with manually modified code, to see that the bmpfv
pointer is in the same region as the bmp region.
Build and boot on link and see that displaying screens is still fast.
Change-Id: I98349b73671e38fa6cace966b6953a2abf129fab
Reviewed-on: https://gerrit.chromium.org/gerrit/32629
Reviewed-by: Mike Truty <truty@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
(cherry picked from commit c92c81ecf517536d29da3cc75e4ea4d922cb28e2)
Reviewed-on: https://gerrit.chromium.org/gerrit/32869
Reviewed-by: Katie Roberts-Hoffman <katierh@chromium.org>
Tested-by: Katie Roberts-Hoffman <katierh@chromium.org>
-rw-r--r-- | firmware/Makefile | 5 | ||||
-rw-r--r-- | firmware/lib/vboot_display.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/Makefile b/firmware/Makefile index 87971c85..90e96f01 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -48,6 +48,11 @@ CFLAGS += -DUNROLL_LOOPS # Way to do things. See chrome-os-partner:7689, and the commit message # that made this change. CFLAGS += -DRANDOM_POWER_OFF + +# On x86 we don't actually read the GBB data into RAM until it is needed. +# Therefore it makes sense to cache it rather than reading it each time. +# Enable this feature. +CFLAGS += -DCOPY_BMP_DATA endif INCLUDES = \ diff --git a/firmware/lib/vboot_display.c b/firmware/lib/vboot_display.c index 88adc464..ca3360b3 100644 --- a/firmware/lib/vboot_display.c +++ b/firmware/lib/vboot_display.c @@ -188,8 +188,12 @@ VbError_t VbDisplayScreenFromGBB(VbCommonParams* cparams, uint32_t screen, /* Copy bitmap data from GBB into RAM for speed */ if (!bmpfv) { +#ifdef COPY_BMP_DATA bmpfv = (uint8_t*)VbExMalloc(gbb->bmpfv_size); Memcpy(bmpfv, ((uint8_t*)gbb) + gbb->bmpfv_offset, gbb->bmpfv_size); +#else + bmpfv = ((uint8_t *)gbb) + gbb->bmpfv_offset; +#endif } /* Sanity-check the bitmap block header */ |