From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Julien Grall <julien.grall@citrix.com>,
Shannon Zhao <shannon.zhao@linaro.org>,
xen-devel <xen-devel@lists.xen.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Parth Dixit <parth.dixit@linaro.org>,
andrew@fubar.geek.nz,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
David Vrabel <david.vrabel@citrix.com>,
Roger Pau Monne <roger.pau@citrix.com>
Cc: Hangaohuai <hangaohuai@huawei.com>,
"Huangpeng (Peter)" <peter.huangpeng@huawei.com>
Subject: Re: Design doc of adding ACPI support for arm64 on Xen - version 5
Date: Tue, 1 Sep 2015 20:35:03 +0800 [thread overview]
Message-ID: <55E59B77.2090905@huawei.com> (raw)
In-Reply-To: <55E58BC7.7090403@citrix.com>
On 2015/9/1 19:28, Julien Grall wrote:
> Hi Shannon,
> On 01/09/15 05:12, Shannon Zhao wrote:
>> I tried this. Directly use the "kinfo->gnttab_start = __pa(_stext)" as
>> the address where these tables are mapped to Dom0. But the value of
>> gnttab_start is lower than the start of RAM, so Dom0 ingore these
>> regions and boot failed. see early_init_dt_add_memory_arch()
>
> Can you elaborate? How Linux will fail? If this region is marked as
> reserved in the UEFI memory map, Linux will mark the memory as reserved.
>
> Furthermore, *ioremap is used in order to map the EFI tables so I don't
> see a reason to fail.
>
It's fine to parse EFI table but fails to parse ACPI table.
It doesn't add the memblock since it doesn't pass below check in
early_init_dt_add_memory_arch:
if (base + size < phys_offset) {
pr_warning("Ignoring memory block 0x%llx - 0x%llx\n",
base, base + size);
return;
}
It's due to kinfo->gnttab_start (e.g. 0x87e00000) lower than the memory
start address (e.g. 0x90000000).
Then Linux will fail at parsing ACPI table.
ACPI: Interpreter enabled
ACPI: Using GIC for interrupt routing
Unhandled fault: alignment fault (0x96000021) at 0xffffff8000068184
Internal error: : 96000021 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.2.0-rc6+ #143
Hardware name: (null) (DT)
task: ffffffc008870000 ti: ffffffc00884c000 task.ti: ffffffc00884c000
PC is at acpi_get_phys_id+0x264/0x290
LR is at acpi_get_phys_id+0x178/0x290
>>>>
>>>> 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.
>>>
>>
>> So can we use the same way for Dom0? I think the Linux will reserve the
>> regions for EFI in reserve_regions(). Therefore, Dom0 will not use these
>> reserved regions for other use.
>
> Jan had some concerned about putting the EFI tables in RAM owned by DOM0
> (see [1]).
>
> Can you explain how Linux behave with EFI tables. I.e:
> - Where tables are expected to live (RAM, others...)?
I'm not sure about this.
> - Are thoses regions freed at some point to be re-use?
I look at how Linux reserve these regions. See it in reserve_regions()
(arch/arm64/kernel/efi.c). It uses memblock_add() to add them to global
memblock and then uses memblock_reserve() to reserve them (like
allocating some memory) for certain use (here we use them to store the
tables). And I didn't see other places call memblock_free() to free them.
--
Shannon
next prev parent reply other threads:[~2015-09-01 12:35 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 9:45 Design doc of adding ACPI support for arm64 on Xen - version 5 Shannon Zhao
2015-08-28 12:55 ` Julien Grall
2015-08-29 1:00 ` Shannon Zhao
2015-08-31 7:33 ` Jan Beulich
2015-08-31 11:44 ` Julien Grall
2015-08-31 12:03 ` Shannon Zhao
2015-08-31 12:34 ` Julien Grall
2015-09-01 4:12 ` Shannon Zhao
2015-09-01 11:28 ` Julien Grall
2015-09-01 12:35 ` Shannon Zhao [this message]
2015-09-01 13:40 ` Julien Grall
2015-09-01 14:03 ` Jan Beulich
2015-09-01 14:20 ` Julien Grall
2015-09-02 6:02 ` Shannon Zhao
2015-09-02 8:41 ` Jan Beulich
2015-09-02 9:18 ` Christoffer Dall
2015-09-02 11:15 ` Julien Grall
2015-09-02 9:25 ` Shannon Zhao
2015-09-02 12:30 ` Jan Beulich
2015-09-02 11:09 ` Julien Grall
2015-09-02 12:02 ` Shannon Zhao
2015-09-02 12:52 ` Julien Grall
2015-09-02 13:26 ` Ian Campbell
2015-09-02 13:48 ` Julien Grall
2015-09-02 13:54 ` Ian Campbell
2015-09-02 13:57 ` Christoffer Dall
2015-09-02 15:27 ` Leif Lindholm
2015-09-02 15:37 ` Ard Biesheuvel
2015-09-02 14:00 ` Jan Beulich
2015-09-02 12:58 ` Ian Campbell
2015-08-28 15:06 ` Jan Beulich
2015-08-29 1:29 ` Shannon Zhao
2015-08-31 7:39 ` Jan Beulich
2015-08-31 8:51 ` Shannon Zhao
2015-08-31 9:40 ` Jan Beulich
2015-08-31 11:31 ` Shannon Zhao
2015-08-31 11:46 ` Jan Beulich
2015-09-02 12:54 ` Ian Campbell
2015-09-02 13:59 ` Shannon Zhao
2015-09-02 14:24 ` Ian Campbell
2015-09-02 12:18 ` Ian Campbell
2015-09-07 3:37 ` Shannon Zhao
2015-09-07 10:47 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E59B77.2090905@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=andrew@fubar.geek.nz \
--cc=boris.ostrovsky@oracle.com \
--cc=christoffer.dall@linaro.org \
--cc=david.vrabel@citrix.com \
--cc=hangaohuai@huawei.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@citrix.com \
--cc=parth.dixit@linaro.org \
--cc=peter.huangpeng@huawei.com \
--cc=roger.pau@citrix.com \
--cc=shannon.zhao@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).