From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfSW0-0005Ex-Fx for qemu-devel@nongnu.org; Tue, 07 Apr 2015 08:22:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YfSVx-0004lu-99 for qemu-devel@nongnu.org; Tue, 07 Apr 2015 08:22:00 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:16890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YfSVw-0004kv-Kx for qemu-devel@nongnu.org; Tue, 07 Apr 2015 08:21:57 -0400 Message-ID: <5523CB0A.9060006@huawei.com> Date: Tue, 7 Apr 2015 20:18:18 +0800 From: Shannon Zhao MIME-Version: 1.0 References: <1428055432-12120-1-git-send-email-zhaoshenglong@huawei.com> <1428346052.2973.26.camel@deneb.redhat.com> <55234469.9060404@huawei.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 00/20] Generate ACPI v5.1 tables and expose it to guest over fw_cfg on ARM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: hangaohuai@huawei.com, Igor Mammedov , Alexander Spyridakis , "Michael S. Tsirkin" , Claudio Fontana , QEMU Developers , "Huangpeng (Peter)" , Hanjun Guo , Mark Salter , Paolo Bonzini , Laszlo Ersek , Christoffer Dall , Shannon Zhao On 2015/4/7 20:07, Peter Maydell wrote: > On 7 April 2015 at 03:43, Shannon Zhao wrote: >> The ACPI table entry: >> Method (_CBA, 0, NotSerialized) // _CBA: Configuration Base Address >> { >> Return (0x3F000000) >> } >> Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings >> { >> Name (RBUF, ResourceTemplate () >> { >> WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, >> 0x0000, // Granularity >> 0x0000, // Range Minimum >> 0x000F, // Range Maximum >> 0x0000, // Translation Offset >> 0x0010, // Length >> ,, ) >> DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, >> 0x00000000, // Granularity >> 0x10000000, // Range Minimum >> 0x3EFF0000, // Range Maximum >> 0x00000000, // Translation Offset >> 0x2EFF0000, // Length > > In all the other sections, the Length entry is (rangemax - rangemin) + 1, > but in this one it is not, which suggests an error. Probably your > rangemax here is wrong, since 0x3eff0000 is actually the first address > in the IO window. > So sorry that the ACPI table entry I pasted is the old version while the code is update. + aml_append(rbuf, + aml_dword_memory(aml_pos_decode, aml_min_fixed, aml_max_fixed, + aml_cacheable, aml_ReadWrite, + 0x0000, info->pcie_mmio_base, + info->pcie_mmio_base + info->pcie_mmio_size - 1, + 0x0000, info->pcie_mmio_size)); > (If ACPI is effectively describing the length of the range in > two separate places, it's a shame it doesn't sanity check that > they both agree...) >