From: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
To: Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Julien Grall <julien.grall@linaro.org>
Cc: Roy Franz <roy.franz@linaro.org>, xen-devel <xen-devel@lists.xen.org>
Subject: EFI boot Issue with setup_xenheap_mappings()
Date: Wed, 8 Oct 2014 18:58:07 -0500 [thread overview]
Message-ID: <5435CF8F.3010202@amd.com> (raw)
Hi All,
After we resolved the flushing and tlbi issues previously discussed, I
ran into a couple more issues. Please note that the available memory
regions retrieved from EFI system table are:
(XEN) RAM: 0000008001000000 - 0000008007ffdfff <- (1)
(XEN) RAM: 0000008007ffe000 - 0000008007ffffff
(XEN) RAM: 0000008008000000 - 000000801fffdfff
(XEN) RAM: 000000801fffe000 - 000000801fffffff
(XEN) RAM: 0000008020000000 - 000000802fffffff
(XEN) RAM: 0000008030001000 - 00000083f0ffffff
(XEN) RAM: 00000083f1000000 - 00000083f101ffff
(XEN) RAM: 00000083f1020000 - 00000083fbbb1fff
(XEN) RAM: 00000083fc4b8000 - 00000083fc4b8fff
(XEN) RAM: 00000083fc6a4000 - 00000083fec25fff
(XEN) RAM: 00000083fec26000 - 00000083fee8bfff
(XEN) RAM: 00000083fee8c000 - 00000083ff225fff
(XEN) RAM: 00000083ff226000 - 00000083ff263fff
(XEN) RAM: 00000083ff265000 - 00000083ff2c4fff
(XEN) RAM: 00000083ffe70000 - 00000083ffffffff
Note:
(1) Physical memory actually started at 0x80_0000_0000, the first 16MB
is used by UEFI.
ISSUE 1:
Data abort is happening at:
start_xen()
-> setup_mm()
-> init_boot_pages()
-> bootmem_region_add()
-> Accessing bootmem_region_list causing data abort !!!
bootmem_region_list is initialized by "init_boot_pages()" at the first
calling of "bootmem_region_add()". It points to VA 0x800000000000, which
is at the beginning of the 1:1 mapping of RAM region (slots 256) (see
include/asm-arm/config.h for complete ARM64 memory layout).
So, I looked at how the page table is setup for this region. This is
done at the following place:
start_xen()
-> setup_mm()
-> setup_xenheap_mappings(bank_start>>PAGE_SHIFT,
bank_size>>PAGE_SHIFT)
Inside setup_xenheap_mapping():
offset = pfn_to_pdx(base_mfn - xenheap_mfn_start).
where:
base_mfn = 0x8000000
xenheap_mfn_start = 0x8010000
This results in the math above to fail, and resulting in invalid offset,
invalid vaddr, and invalid pte for this region.
So, I put a hack where I set base_mfn and xenheap_mfn_start to 0x8010000
in the code above (not sure if this is the right things to do), and this
seems to resolve issue 1 continue all the way to
setup_frame_table_mapping().
ISSUE 2:
Here, it is also getting data abort when accessing frame_table (at
0x800000000 = 32GB). It seems that the page table for this region is
also messed up.
Need a break and more investigation at this point.
Suravee
next reply other threads:[~2014-10-08 23:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 23:58 Suravee Suthikulanit [this message]
2014-10-09 8:51 ` EFI boot Issue with setup_xenheap_mappings() Ian Campbell
2014-10-09 12:11 ` Ian Campbell
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=5435CF8F.3010202@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=roy.franz@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.