From nobody Thu Nov 14 16:49:37 2024 Delivered-To: importer@patchew.org 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+45540+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1565697473; cv=none; d=zoho.com; s=zohoarc; b=i7FVSoyih7kgkdXjuP0PrdA0SP+nAnQ4C7GHOJbJYHvxXkKGyRZ6q/xuGP6rqRPwehE/GYJ9NqCoZiR1MUrhnJJih1IAMEbhteIHcNVKlLuJTucAe24QeRll6TIcMtRRy0QA/RZInpIgqsI8TTxAv1nGaJOSZ4PegqNSbr1h3J0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565697473; h=Content-Type: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=2fpkrjY5W9lzKmQ57tEGWC8wxYu2+Zbp9ZU8kOtPFZ8=; b=a9PAORrL0Av914qrc6VcyN8wA5cjnu7rbwq7VFCke+UFN6TcApYT6LN6nEWu7P9TKoWQarmDHZf7x6zHqTuw4pNU9byBYhutFYqK1pLemUJrV9wHpluZ3Js5YGJHG70+rnzDCBdK5EQQtYwx0Ge52hELZyrj5XG9IOKs2iJ1xCI= 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+45540+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1565697473091892.9440870489167; Tue, 13 Aug 2019 04:57:53 -0700 (PDT) Return-Path: X-Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by groups.io with SMTP; Tue, 13 Aug 2019 04:57:51 -0700 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+45540+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: tshFiBo75oKp6/rg1WM7Wix4AFcyxcizAtrq2i/DwpcajnSO3hYWKq3U1m+BYFL6B/zh9Euxry S3HNTDs9qjr+8vulASqOjH+pdaGVLJAEcwChjKfxWs7K46k4MLlg04ue6ObnLnTtlZidvEqMjJ KlmocxMGZ+bJPH7FN8QGvamY9fhbYsp22L9iMS/lHOv2P6oxVuzR2w+ur/xrkK/lQVV9+nj9iF hO4S9nysxmFP6Y1UN4lJ40i6mPKN4xfvgVTyje9zxZmXEji4dCtca9DE4pBfwRApLAtcwShXU2 mSI= X-SBRS: 2.7 X-MesageID: 4198435 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,381,1559534400"; d="scan'208";a="4198435" From: "Anthony PERARD" To: CC: Laszlo Ersek , Jordan Justen , Julien Grall , , Ard Biesheuvel , Anthony PERARD Subject: [edk2-devel] [PATCH v5 24/35] OvmfPkg/XenPlatformPei: Reserve VGA memory region, to boot Linux Date: Tue, 13 Aug 2019 12:31:08 +0100 Message-ID: <20190813113119.14804-25-anthony.perard@citrix.com> In-Reply-To: <20190813113119.14804-1-anthony.perard@citrix.com> References: <20190813113119.14804-1-anthony.perard@citrix.com> MIME-Version: 1.0 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,anthony.perard@citrix.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1565697472; bh=2fpkrjY5W9lzKmQ57tEGWC8wxYu2+Zbp9ZU8kOtPFZ8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=TLQQVNqag/dYgrqkANlSFxJHGem1Nk7rt2YenkZ/ektfqIkeElXmeMwjQzZLgn2a6ei jeMsnN4n8GyKuLZShJncyBnVBLF6jfEogfbZjBTmSQ/JfaVH6L8r5ylVZ0JYK07B2MjKb HNEGE92J/DG52zAv95FtCqEo3+SP3BA907E= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Linux panic if the VGA region isn't reserved. When Linux is booted on EFI system, it expects the memory at 0xa0000 to _not_ be conventional memory. Otherwise a variable isn't initialised properly and Linux panic when a virtual console/terminal is asked to be created. See for more detail: https://lists.xenproject.org/archives/html/xen-devel/2019-03/msg02139.html Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1689 Signed-off-by: Anthony PERARD Acked-by: Laszlo Ersek --- Notes: v3: - fix commit message OvmfPkg/XenPlatformPei/Xen.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c index c4506def9a..c41fecdc48 100644 --- a/OvmfPkg/XenPlatformPei/Xen.c +++ b/OvmfPkg/XenPlatformPei/Xen.c @@ -294,6 +294,12 @@ XenPublishRamRegions ( Status =3D XenGetE820Map (&E820Map, &E820EntriesCount); ASSERT_EFI_ERROR (Status); =20 + AddMemoryBaseSizeHob (0, 0xA0000); + // + // Video memory + Legacy BIOS region, to allow Linux to boot. + // + AddReservedMemoryBaseSizeHob (0xA0000, BASE_1MB - 0xA0000, TRUE); + LapicBase =3D PcdGet32 (PcdCpuLocalApicBaseAddress); LapicEnd =3D LapicBase + SIZE_1MB; AddIoMemoryRangeHob (LapicBase, LapicEnd); @@ -312,6 +318,16 @@ XenPublishRamRegions ( Base =3D ALIGN_VALUE (Entry->BaseAddr, (UINT64)EFI_PAGE_SIZE); End =3D (Entry->BaseAddr + Entry->Length) & ~(UINT64)EFI_PAGE_MASK; =20 + // + // Ignore the first 1MB, this is handled before the loop. + // + if (Base < BASE_1MB) { + Base =3D BASE_1MB; + } + if (Base >=3D End) { + continue; + } + switch (Entry->Type) { case EfiAcpiAddressRangeMemory: AddMemoryRangeHob (Base, End); --=20 Anthony PERARD -=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 (#45540): https://edk2.groups.io/g/devel/message/45540 Mute This Topic: https://groups.io/mt/32851684/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-