summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8183/decompressor.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-06-26 13:42:04 +0800
committerPatrick Georgi <pgeorgi@google.com>2018-07-26 11:34:05 +0000
commit03e9cb9b35a33f29d3fb0039960237eaea2f7ce6 (patch)
tree06b6ff31159aff1da9e9938441a2aa17fe060eff /src/soc/mediatek/mt8183/decompressor.c
parent4c067c85507c786a661642c10583c71b80a9855c (diff)
downloadcoreboot-03e9cb9b35a33f29d3fb0039960237eaea2f7ce6.tar.xz
mediatek/mt8183: Enable bootblock self-decompression
MT8183 only allows booting from eMMC, so we have to do eMMC emulation from an external source, for example EC, which makes the size of bootblock very important. A fully functional bootblock (that can boot into verstage or romstage) is about 38000 bytes. If self decompression (CONFIG_COMPRESS_BOOTBLOCK) is enabled, only 25088 (66%) bytes are needed. Inspired from crosreview.com/1070018. BUG=b:80501386 TEST=manually flashed into kukui and boots into romstage. Change-Id: I7a739866a4ea3bcafe2ff7b9e88d5ed00f3f3e40 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/27599 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/soc/mediatek/mt8183/decompressor.c')
-rw-r--r--src/soc/mediatek/mt8183/decompressor.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8183/decompressor.c b/src/soc/mediatek/mt8183/decompressor.c
new file mode 100644
index 0000000000..d4a55b36c1
--- /dev/null
+++ b/src/soc/mediatek/mt8183/decompressor.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <bootblock_common.h>
+#include <soc/mmu_operations.h>
+
+void decompressor_soc_init(void)
+{
+ mtk_mmu_init();
+}