All of lore.kernel.org
 help / color / mirror / Atom feed
* Fail to start Dom0 in ARM highmem.
@ 2014-10-28 15:47 Iurii Konovalenko
  2014-10-28 17:13 ` Julien Grall
  0 siblings, 1 reply; 7+ messages in thread
From: Iurii Konovalenko @ 2014-10-28 15:47 UTC (permalink / raw)
  To: xen-devel

Hello, all!

I try to bring up Xen on Renesas Lager board (r8a7790 SoC - R-Car H2).
Xen revision is 4.4.
I try to run Linux (kernel 3.14 + LTSI patches) as Dom0.
This SoC support ARM LPAE. Physical address is 40-bit long.
Board has 4GB of RAM. Adress Map is following:
0x00_4000_0000 - 0x00_7FFF_FFFF 1 GBytes of RAM
0x01_4000_0000 - 0x01_FFFF_FFFF 3 GBytes of RAM
I want to provide 1 GB of memory for Dom0.
As there is not enough memory for Dom0 in first bank of memory, it is
allocated by Xen from second bank on pa 0x01_4000_0000 -
0x01_7FFF_FFFF.
And in context of this task I've faced with problem. Here is log print:
>(XEN) Populate P2M 0x140000000->0x180000000 (1:1 mapping for dom0)
>(XEN) Loading kernel from boot module 2
>(XEN) Loading zImage from 0000000072000040 to 0000000140008000-0000000140327aa8
>(XEN)
>(XEN) ****************************************
>(XEN) Panic on CPU 0:
>(XEN) Unable to map translate guest address
>(XEN) ****************************************

My investigations show, that it is because of type cast truncating.
In file xen/arch/arm/kernel.c in line 152 we call
    rc = gvirt_to_maddr(load_addr + offs, &ma);
where load_addr has type paddr_t (64-bit), in my case
0x0000000140008000, but function deceleration is
    static inline int gvirt_to_maddr(vaddr_t va, paddr_t *pa)
where va has type vaddr_t (32-bit), in my case is truncated to 0x40008000
That's why bits 33-40 are lost and function fails.

Could you please provide any suggestions, is it possible to start Dom0
with 1:1 mapping and memory in second bank (over32-bit high memory)?

Best regards.

Iurii Konovalenko | Senior Software Engineer
GlobalLogic

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-11-06 13:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 15:47 Fail to start Dom0 in ARM highmem Iurii Konovalenko
2014-10-28 17:13 ` Julien Grall
2014-10-29  8:24   ` Ian Campbell
2014-10-29 17:35     ` Andrii Anisov
2014-10-30 10:07       ` Ian Campbell
2014-10-30 11:19         ` Andrii Anisov
2014-11-06 13:09           ` Iurii Konovalenko

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.