public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* memory hole close to 4GB on qemu risc-v
@ 2023-08-07  7:50 Wu, Fei
  2023-08-08  8:47 ` Wu, Fei
  0 siblings, 1 reply; 2+ messages in thread
From: Wu, Fei @ 2023-08-07  7:50 UTC (permalink / raw)
  To: u-boot

Hi All,

I am working on enabling PCIe passthrough on qemu risc-v, in order for
the guest to access the host x86 pci resource directly, ram on guest
won't cover this range, so if guest has 4GB ram, two ranges are created:
  1. 2G-3G
  2. 4G-7G

u-boot is not able to handle this but reports:

Reserving 869k for U-Boot at: ff725000
initcall: 0000000080216f94
Reserving 8320k for malloc() at: fef05000
initcall: 0000000080216ee8
Unhandled exception: Store/AMO access fault

EP: 0000000080201a38 RA: 0000000080216f10 TVAL: 00000000fef04f90

It looks like fdtdec_setup_mem_size_base() in u-boot sets ram_base/size
without considering all memory nodes, and board_get_usable_ram_top()
returns 4G-1 that causes gd->relocaddr set to the wrong address which
has no ram backed. More details can be found here:
  https://patchew.org/QEMU/20230731015317.1026996-1-fei2.wu@intel.com/


Can we add support for this multi-range ram setting? Any comments?

Thanks,
Fei.

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

end of thread, other threads:[~2023-08-08 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-07  7:50 memory hole close to 4GB on qemu risc-v Wu, Fei
2023-08-08  8:47 ` Wu, Fei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox