From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: Design doc of adding ACPI support for arm64 on Xen - version 5 Date: Mon, 31 Aug 2015 13:34:34 +0100 Message-ID: <55E449DA.6080309@citrix.com> References: <55E02DC5.4090202@huawei.com> <55E05A2F.1090305@citrix.com> <55E1042C.6000308@linaro.org> <55E43E36.90108@citrix.com> <55E4428C.7020308@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55E4428C.7020308@huawei.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Shannon Zhao , Shannon Zhao , xen-devel , Christoffer Dall , Ian Campbell , Stefano Stabellini , Stefano Stabellini , Jan Beulich , Parth Dixit , andrew@fubar.geek.nz, Boris Ostrovsky , David Vrabel , Roger Pau Monne Cc: Hangaohuai , "Huangpeng (Peter)" List-Id: xen-devel@lists.xenproject.org On 31/08/2015 13:03, Shannon Zhao wrote: >>> Currently I use the last RAM bank(kinfo->mem.bank[nr_banks - 1]) to >>> calculate the start address of non-RAM place. I'm not sure there will be >>> no MMIO at that place. Do you have any good idea to find such sure and >>> safe non-ram place? >> >> It's not a safe place because with the direct mapping for the RAM, DOM0 >> RAM could live in the last bank. > > I put the tables after the last bank currently. I misread your suggestion and though you were planning to use the last host memory bank region for the UEFI tables. So what you are suggesting is not safe at all, what does ensure you that there is no MMIO right after the last DOM0 bank? The DOM0 RAM region may lives at the edge of a host RAM bank. > >> Furthermore, for the grant table >> region, we are re-using the RAM region used by Xen (find_gnttab_region), >> so it may clash with it too because Xen is relocated as high as possible. >> > > Oh, I didn't realize this. > >> Although, given that the grant table region will be found by Linux when >> ACPI is used (see your section 3.), we could be able to re-use the Xen >> region to store the new tables/structures. >> > > So you mean it's fine to put the tables after last bank of Dom0 RAM? No, see my answer above. I'm suggesting to re-use the same trick as we do for the grant table region. We know that this region will never be allocated in the DOM0 address space either because of the direct mapping or because it's very unlikely in the case of the non-direct mapping (Xen RAM region is very high). > > In addition, how does UEFI find the space to place the tables? Could we > use the same way? I think that those tables are living in the RAM and region used are marked as reserved. Regards, -- Julien Grall