From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.120]) by mx.groups.io with SMTP id smtpd.web10.741.1587141838621507973 for ; Fri, 17 Apr 2020 09:43:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M5NTJwtZ; spf=pass (domain: redhat.com, ip: 205.139.110.120, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587141837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g1mk3GH4cp7cshmSPWb4jE8GeSWMr9M/OwgFDlwTrhA=; b=M5NTJwtZu7XUPrlEUQq/NluCFVLTxB+FxNGSSQ6AFP67Lf7xDSzVGN7njj6yG6OJCrcsj8 X9Jlj3tN2iMbjr3P3WhmH0lCgr/5aqCQtP51y81GTelfDWpzhK4aC7XL/y4xJFfzStETaL aCmuOCypAZEpVTGayvz+T+Sf9GF0olg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-326-pwsV9qUzO6iHBAOk0p061A-1; Fri, 17 Apr 2020 12:43:56 -0400 X-MC-Unique: pwsV9qUzO6iHBAOk0p061A-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7263800D53; Fri, 17 Apr 2020 16:43:54 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-253.ams2.redhat.com [10.36.113.253]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98A6319C70; Fri, 17 Apr 2020 16:43:53 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH 05/13] OvmfPkg: Add VBE2 mode info structure to LegacyVgaBios.h To: devel@edk2.groups.io, rebecca@bsdio.com Cc: Jordan Justen , Ard Biesheuvel References: <46c18f7e321bd66ca4f1eb0c2c8b1e2c0514f951.1586991816.git.rebecca@bsdio.com> From: "Laszlo Ersek" Message-ID: <4b3a0795-0582-4ce9-83b4-195dd7b9c589@redhat.com> Date: Fri, 17 Apr 2020 18:43:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <46c18f7e321bd66ca4f1eb0c2c8b1e2c0514f951.1586991816.git.rebecca@bsdio.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 04/16/20 01:09, Rebecca Cran wrote: > bhyve uses the older VESA BIOS Extensions 2.0, so add the mode info > structure to IndustryStandard/LegacyVgaBios.h > > Signed-off-by: Rebecca Cran > --- > .../Include/IndustryStandard/LegacyVgaBios.h | 39 +++++++++++++++++++ > 1 file changed, 39 insertions(+) This header file currently only exists in support of "OvmfPkg/QemuVideoDxe/VbeShim.c". But, I still agree that VBE2_MODE_INFO belongs here. So it's OK. > diff --git a/OvmfPkg/Include/IndustryStandard/LegacyVgaBios.h b/OvmfPkg/Include/IndustryStandard/LegacyVgaBios.h > index 317dac3a56..016ff95a5d 100644 > --- a/OvmfPkg/Include/IndustryStandard/LegacyVgaBios.h > +++ b/OvmfPkg/Include/IndustryStandard/LegacyVgaBios.h > @@ -88,4 +88,43 @@ typedef struct { > } VBE_MODE_INFO; > #pragma pack () > > +typedef struct { > + UINT16 ModeAttr; > + UINT8 WindowAAttr; > + UINT8 WindowBAttr; > + UINT16 WindowGranularityKB; > + UINT16 WindowSizeKB; > + UINT16 WindowAStartSegment; > + UINT16 WindowBStartSegment; > + UINT32 WindowPositioningAddress; > + UINT16 BytesPerScanLine; > + > + UINT16 Width; > + UINT16 Height; > + UINT8 CharCellWidth; > + UINT8 CharCellHeight; > + UINT8 NumPlanes; > + UINT8 BitsPerPixel; > + UINT8 NumBanks; > + UINT8 MemoryModel; > + UINT8 BankSizeKB; > + UINT8 NumImagePagesLessOne; > + UINT8 Vbe3; > + > + UINT8 RedMaskSize; > + UINT8 RedMaskPos; > + UINT8 GreenMaskSize; > + UINT8 GreenMaskPos; > + UINT8 BlueMaskSize; > + UINT8 BlueMaskPos; > + UINT8 ReservedMaskSize; > + UINT8 ReservedMaskPos; > + UINT8 DirectColorModeInfo; > + > + UINT32 LfbAddress; > + UINT32 OffScreenAddress; > + UINT16 OffScreenSizeKB; > +} VBE2_MODE_INFO; > +#pragma pack () > + > #endif > I'm not going to review the contents of the new structure, so I'm going to give an A-b, not an R-b. However, the "#pragma pack ()" that you add at the end is unbalanced. The pre-patch file already brackets the whole set of structs with #pragma pack (1) ... #pragma pack () Thus, you need not add any #pragma, just insert the VBE2_MODE_INFO typedef between the existent pragmas. Put differently: please remove the "#pragma pack ()" right after "VBE_MODE_INFO" (*not* after VBE2_MODE_INFO), as a part of this patch. With that update: Acked-by: Laszlo Ersek Thanks Laszlo