From nobody Mon Feb 9 12:43:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47412+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47412+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568749832; cv=none; d=zoho.com; s=zohoarc; b=Xw7SKB//Hsn22IGv6I/1h1eh/UWOK9AmYR62tr20CSUnmutsOWOMt4HHhTij1HaTPujK3vF49h+AaUgYsizI/xA2EvANRVvil+2AdQ4pBY5DeIdWThy3IcGff7n7vB/qgwTHWy4nmDt5Q4JjACwTnVc8BouVWREOFDg+ruo7PhQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568749832; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=rApVVf59o5W/vWrNRUO5QZJykKQDBlVYXNQRbh8Xdiw=; b=XtxUQsUFppKwChHkPiR/N4g3P1+Th3VkjDV1XMhTUOBD7FOucGCspFixi7k/QWQ5jhiVr3tiOWSwWR/ujAfNvXFhWlR3OEXCV3sikQQQ2ntCs/iQqn6iHrN3CtFFHn9vToN6syODnldZDWZ3oay5QHH1KyHumrEd31jUyEFco8c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47412+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1568749832396166.89721724738627; Tue, 17 Sep 2019 12:50:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id SEu7YY1788612xOyqa6orM4H; Tue, 17 Sep 2019 12:50:31 -0700 X-Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 17 Sep 2019 12:50:31 -0700 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C6C7A8980E0; Tue, 17 Sep 2019 19:50:30 +0000 (UTC) X-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 8BE79600C4; Tue, 17 Sep 2019 19:50:29 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , David Woodhouse , Jordan Justen Subject: [edk2-devel] [PATCH 25/35] OvmfPkg/VideoDxe: document EFI_EDID_OVERRIDE_PROTOCOL.GetEdid() call Date: Tue, 17 Sep 2019 21:49:25 +0200 Message-Id: <20190917194935.24322-26-lersek@redhat.com> In-Reply-To: <20190917194935.24322-1-lersek@redhat.com> References: <20190917194935.24322-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Tue, 17 Sep 2019 19:50:30 +0000 (UTC) Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com X-Gm-Message-State: hFwPfXQ5eHPxbSLAs2aOgNYpx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1568749831; bh=YFOOtzymYqcBFBl/c3XiE8d2iIbvc2sP+JHr4Mg0W2M=; h=Cc:Date:From:Reply-To:Subject:To; b=svdEYww6qETLryjgyXKWgEGEeOVn7MMiFJiYnBpO1zh6Y3kNnGDT0EKq40hm53Ty0e9 w72M2dYjxOSIcal9pMa1zPdiug8acnjViW0qgheXGlu3OJ6K48lsppU7X54kYM2A7nvX6 F0JRmnasss63YBSONNKnPEoExuyJGXEqRpo= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" According to the UEFI spec -- and to the edk2 header "MdePkg/Include/Protocol/EdidOverride.h" too --, EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID takes an (EFI_HANDLE*), and not an EFI_HANDLE, as second parameter ("ChildHandle"). This is probably [*] a bug in the UEFI spec. Given that this CSM module (VideoDxe) had been used for a long time on physical platforms before it was moved to OvmfPkg, keep the current "ChildHandle" argument, just cast it explicitly. [*] The edk2 tree contains no other GetEdid() call, and also no GetEdid() implementation. The edk2-platforms tree contains two GetEdid() calls, at commit 022c212167e0, in files - "Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.c", - "Drivers/OptionRomPkg/CirrusLogic5430Dxe/Edid.c". From these, the first passes an (EFI_HANDLE*) as "ChildHandle", the second passes an EFI_HANDLE. It's difficult to draw a conclusion. :/ No functional changes. (I've also requested a non-normative (informative) clarification for the UEFI spec: , in the direction that matches this patch.) Cc: Ard Biesheuvel Cc: David Woodhouse Cc: Jordan Justen Signed-off-by: Laszlo Ersek --- Notes: build-tested only OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c b/OvmfPkg/Csm/BiosT= hunk/VideoDxe/BiosVideo.c index 0640656dba14..995136adee27 100644 --- a/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c +++ b/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c @@ -1402,9 +1402,13 @@ BiosVideoCheckForVbe ( goto Done; } =20 + // + // Cast "ChildHandle" to (EFI_HANDLE*) in order to work around the spe= c bug + // in UEFI v2.8, reported as Mantis#2018. + // Status =3D EdidOverride->GetEdid ( EdidOverride, - BiosVideoPrivate->Handle, + (EFI_HANDLE *) BiosVideoPrivate->Handle, &EdidAttributes, &EdidOverrideDataSize, (UINT8 **) &EdidOverrideDataBlock --=20 2.19.1.3.g30247aa5d201 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47412): https://edk2.groups.io/g/devel/message/47412 Mute This Topic: https://groups.io/mt/34180226/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-