summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/Makefile5
-rw-r--r--firmware/lib/vboot_display.c4
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 */