From 2503b6d7fbfdecef90b3c22b23c03a2420d4660b Mon Sep 17 00:00:00 2001 From: Gaurav Kashyap Date: Mon, 8 Jul 2019 15:28:50 -0700 Subject: avb: Fix antirollback check for non HLOS images Fix the check for Update Rollback syscall returned from TZ. Change-Id: I2ed86277b2f150a569c4425f65cacc756470f77d --- QcomModulePkg/Library/avb/libavb/avb_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/QcomModulePkg/Library/avb/libavb/avb_util.c b/QcomModulePkg/Library/avb/libavb/avb_util.c index b419f1b64a..b253e2016e 100644 --- a/QcomModulePkg/Library/avb/libavb/avb_util.c +++ b/QcomModulePkg/Library/avb/libavb/avb_util.c @@ -723,12 +723,14 @@ EFI_STATUS UpdateRollbackSyscall () Status = EFI_FAILURE; return Status; } - if (SysCallRsp->status != EFI_SUCCESS) { + if (SysCallRsp->status != 1) { Status = SysCallRsp->status; DEBUG(( EFI_D_ERROR, "TZ_UPDATE_ROLLBACK_VERSION_ID failed, " "Status = (0x%x)\r\n", Status)); return Status; } + } else { + DEBUG ((EFI_D_WARN, "UpdateRollbackSyscall: Older TZ, skipping update")); } return Status; } -- cgit v1.2.3