From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.groups.io with SMTP id smtpd.web10.7899.1608211434128289203 for ; Thu, 17 Dec 2020 05:23:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JdG72dFl; spf=pass (domain: redhat.com, ip: 216.205.24.124, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608211432; 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=P7kEJ/ThS86fFBLdJb/AO7Ah1JOLwVfgvu3HOCfWi68=; b=JdG72dFlP5aOcYSDXk1oHb4ZBQ5NFMdqQpbSkZNBYJ8sXzgXnQJny7v/pWDWDl+AR34q6S yrS2wkyAeGC/9ZIbpYTDcIEm0UjJsPp6IH4/MoDT8CAnwNIsOhHP4VrVY4AOfArr0BjzGJ DOS3k1IFlGn0d2vW2IWBn7Jv4bzBS5M= 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-311-0dFmttx6OviDFInBd68jxw-1; Thu, 17 Dec 2020 08:23:50 -0500 X-MC-Unique: 0dFmttx6OviDFInBd68jxw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 08A3E801B12; Thu, 17 Dec 2020 13:23:49 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-115-40.ams2.redhat.com [10.36.115.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 763A860CE7; Thu, 17 Dec 2020 13:23:43 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v2 0/4] Add extra pci roots support for Arm To: Jiahui Cen , "Ni, Ray" , "devel@edk2.groups.io" Cc: "Justen, Jordan L" , "ard.biesheuvel@arm.com" , "leif@nuviainc.com" , "xieyingtai@huawei.com" , "miaoyubo@huawei.com" , "xuxiaoyang2@huawei.com" , Alex Williamson References: <20201109130511.5946-1-cenjiahui@huawei.com> <5d2daf54-a57b-c4bd-a757-cf6b710cd4e5@huawei.com> From: "Laszlo Ersek" Message-ID: Date: Thu, 17 Dec 2020 14:23:42 +0100 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 12/15/20 13:52, Jiahui Cen wrote: > For x86, Linux does not handle the pci resource assignment. But for arm, it > would assign all the pci resources, unless we explicitly let Linux preserve > PCI resource alignment made by firmware, using "PCI Boot Configuration" > _DSM function. This difference between x86 and arm seems inexplicable to me. > What do you think of adding "PCI Boot Configuration" _DSM function into > dsdt table to make kernel use firmware's resource configuration? The relevant kernel commits seem to be: - 18e94a338436 ("PCI: Make a shareable UUID for PCI firmware ACPI _DSM", 2015-04-08) - a78cf9657ba5 ("PCI/ACPI: Evaluate PCI Boot Configuration _DSM", 2019-06-21) I've also read now section "4.6.5. _DSM for Ignoring PCI Boot Configurations" in the "PCI(TM) Firmware Specification, Revision 3.1, December 13, 2010". Basically if this _DSM#5 function exists, it tells the OS whether it is required to honor the firmware-assigned resources (value 0), or if it is free to reassign (value 1). If the function does not exist at all, then, "the operating system may continue to use the legacy handling regarding the boot configuration". Without knowing more, I consider it a bug that aarch64 Linux uses a default strategy (in the absence of the _DSM#5 function) that is the opposite of the x86 default. But, you seem to be right that there is a specified way to convince arm64 Linux otherwise. Can you indeed add this _DSM#5 function to the "virt" machine's ACPI generator, returning value 0, and see if it makes a difference? Thanks! Laszlo