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.web11.1.1597254531556401497 for ; Wed, 12 Aug 2020 10:48:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Rs4qFHqN; 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=1597254529; 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=+/MzOi2UF9innZkpxoYA+p9Awc+kH8uJiesgyGjJTqY=; b=Rs4qFHqN9rRrh2jxcn5zBzyye/SVlmWMsdBcs6G9Gjrc10ygfkHQaCl94LiUb8scIKXQsw anWj0axPOYHwkhEGQ0+2DbltBrcNOqX2f8qIarlg10Ee4+c8pe0NiwiuLIz1kEJvmfBV1P HACiAmRDyqE9MVIsTfp5RJWZlVohxS4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597254530; 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=+/MzOi2UF9innZkpxoYA+p9Awc+kH8uJiesgyGjJTqY=; b=Hz2HBDqCz4oEVo/lUKTMDynFPksB4yXXB9neUikwwfsP/n169kvl9bLCwt4eoAV0+KYpuV 9SC+JY/B925wKXY97VpJVV0xELv9JYSMUOykw1AjVIlxhGMy76Utsgdr2owrHh6zwcVS9F k96Uc8gz/hmqxuwJsTHGkqFMWYIU6P4= 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-350-X0Vnz8PKO1mIn1fihI_ekQ-1; Wed, 12 Aug 2020 13:48:45 -0400 X-MC-Unique: X0Vnz8PKO1mIn1fihI_ekQ-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 718B1106B24F; Wed, 12 Aug 2020 17:48:44 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-114-34.ams2.redhat.com [10.36.114.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 41BE819D7F; Wed, 12 Aug 2020 17:48:43 +0000 (UTC) Subject: Re: [edk2-devel] UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload To: devel@edk2.groups.io, avinok@gmail.com References: Cc: Maurice Ma , Guo Dong , Benjamin You From: "Laszlo Ersek" Message-ID: <84de6b28-1a7b-ac17-2aa3-8b6a89aed821@redhat.com> Date: Wed, 12 Aug 2020 19:48:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit CC'ing Maurice, Guo, Benjamin Thanks Laszlo On 08/12/20 16:22, Andrey V wrote: > Hi > > I've encountered a problem after using the patch from SBL (slimboot) https://github.com/slimbootloader/slimbootloader/pull/809 > The SBL supports resource allocation above the 4GB, but it fails on ASSERT [PciHostBridgeDxe] /home/andreyv/edk2/edk2/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c(120): Bridge->Mem.Limit < 0x0000000100000000ULL > > The proposed workaround for this is something like in function AdjustRootBridgeResource() of  UefiPayloadPkg\Library\PciHostBridgeLib\PciHostBridgeSupport.c : > > VOID > > AdjustRootBridgeResource ( > > IN  PCI_ROOT_BRIDGE_APERTURE *Io, > > IN  PCI_ROOT_BRIDGE_APERTURE *Mem, > > IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G, > > IN  PCI_ROOT_BRIDGE_APERTURE *PMem, > > IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G > > ) > > { > > Io->Base = 0x1000; > > Io->Limit = 0xEFFF; > > Mem ->Base = 0x80000000; > > Mem ->Limit = 0xCFFFFFFF; > > PMem ->Base = MAX_UINT64; > > PMem ->Limit = 0; > > MemAbove4G->Base = MAX_UINT64; > > MemAbove4G->Limit = 0; > > PMemAbove4G->Base = 0x400000000ULL; > > PMemAbove4G->Limit = 0x7FFFFFFFFULL; > > } > > It is working in my board using SBL, but still with a following error > > PciHostBridge driver failed to set EFI_MEMORY_UC to MMIO aperture - Out of Resources. > > Can someone help to resolve this issue ? > > Andrey > > > >