From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A96D621CEB108 for ; Tue, 19 Sep 2017 12:15:22 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 37AF5267C0; Tue, 19 Sep 2017 19:18:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 37AF5267C0 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F3EC5D6A6; Tue, 19 Sep 2017 19:18:25 +0000 (UTC) From: Laszlo Ersek To: edk2-devel-01 Cc: Aleksei Kovura , Gerd Hoffmann , Igor Mammedov , Jordan Justen , Ruiyu Ni Date: Tue, 19 Sep 2017 21:18:14 +0200 Message-Id: <20170919191815.3004-3-lersek@redhat.com> In-Reply-To: <20170919191815.3004-1-lersek@redhat.com> References: <20170919191815.3004-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 19 Sep 2017 19:18:27 +0000 (UTC) Subject: [PATCH 2/3] OvmfPkg/QemuVideoDxe/VbeShim: rename Status to Segment0AllocationStatus X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Sep 2017 19:15:22 -0000 This clarifies the purpose of the local variable in InstallVbeShim(). Cc: Aleksei Kovura Cc: Gerd Hoffmann Cc: Igor Mammedov Cc: Jordan Justen Cc: Ruiyu Ni Ref: https://bugs.launchpad.net/qemu/+bug/1715700 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek --- OvmfPkg/QemuVideoDxe/VbeShim.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.c b/OvmfPkg/QemuVideoDxe/VbeShim.c index 4c4517e9da27..bc90e067266d 100644 --- a/OvmfPkg/QemuVideoDxe/VbeShim.c +++ b/OvmfPkg/QemuVideoDxe/VbeShim.c @@ -63,7 +63,7 @@ InstallVbeShim ( EFI_PHYSICAL_ADDRESS Segment0, SegmentC, SegmentF; UINTN Segment0Pages; IVT_ENTRY *Int0x10; - EFI_STATUS Status; + EFI_STATUS Segment0AllocationStatus; UINTN Pam1Address; UINT8 Pam1; UINTN SegmentCPages; @@ -87,10 +87,14 @@ InstallVbeShim ( // Segment0Pages = 1; Int0x10 = (IVT_ENTRY *)(UINTN)Segment0 + 0x10; - Status = gBS->AllocatePages (AllocateAddress, EfiBootServicesCode, - Segment0Pages, &Segment0); + Segment0AllocationStatus = gBS->AllocatePages ( + AllocateAddress, + EfiBootServicesCode, + Segment0Pages, + &Segment0 + ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Segment0AllocationStatus)) { EFI_PHYSICAL_ADDRESS Handler; // @@ -109,8 +113,12 @@ InstallVbeShim ( // Otherwise we'll overwrite the Int10h vector, even though we may not own // the page at zero. // - DEBUG ((EFI_D_INFO, "%a: failed to allocate page at zero: %r\n", - __FUNCTION__, Status)); + DEBUG (( + DEBUG_INFO, + "%a: failed to allocate page at zero: %r\n", + __FUNCTION__, + Segment0AllocationStatus + )); } else { // // We managed to allocate the page at zero. SVN r14218 guarantees that it -- 2.14.1.3.gb7cf6e02401b