summaryrefslogtreecommitdiff
path: root/tests/futility
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-09-28 12:39:56 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-02 09:17:10 -0700
commit6d211585f519a3ace76b01a372523207fb695a1c (patch)
treec3987a26c18ade48440658967f34d8712fc732b5 /tests/futility
parent04e441e5f74e107d05578622909410259f6d6f99 (diff)
downloadvboot-6d211585f519a3ace76b01a372523207fb695a1c.tar.gz
futility: updater: Preserve SMMSTORE and add quirk 'eve_smm_store'
The 'SMM store' must be preserved during firmware update. On newer systems, this can be done by preserving FMAP section 'SMMSTORE' (CL:1221210). For Eve, the SMM store did not have its own FMAP section and needs to be reserved by explicit cbfstool calls. BRANCH=None BUG=b:70682365 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility Change-Id: Ica043f51de0170b5c40f61d059437b9572025e2e Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1250464 Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests/futility')
-rwxr-xr-xtests/futility/test_update.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 1b80e2e5..d45e114c 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -287,3 +287,18 @@ if type flashrom >/dev/null 2>&1; then
-i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3 >&2
cmp "${TMP}.emu" "${TMP}.expected.full"
fi
+
+if type cbfstool >/dev/null 2>&1; then
+ echo "SMM STORE" >"${TMP}.smm"
+ truncate -s 262144 "${TMP}.smm"
+ cp -f "${FROM_IMAGE}" "${TMP}.from.smm"
+ cp -f "${TMP}.expected.full" "${TMP}.expected.full_smm"
+ cbfstool "${TMP}.from.smm" add -r RW_LEGACY -n "smm store" \
+ -f "${TMP}.smm" -t raw
+ cbfstool "${TMP}.expected.full_smm" add -r RW_LEGACY -n "smm store" \
+ -f "${TMP}.smm" -t raw -b 0x1bf000
+ test_update "Legacy update (--quirks eve_smm_store)" \
+ "${TMP}.from.smm" "${TMP}.expected.full_smm" \
+ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 \
+ --quirks eve_smm_store
+fi