From: Ian Campbell Date: Thu, 26 Sep 2013 11:35:38 +0000 (+0100) Subject: xen/arm: cope with modules outside of "visible" RAM X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6256 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ac5a04eda393de164a03148bfa0ed75b0f68e97d;p=xen.git xen/arm: cope with modules outside of "visible" RAM This can happen if modules are in a bank which we can't cope with e.g. due to being non-contiguous. Signed-off-by: Ian Campbell Reviewed-by: Julien Grall Acked-by: Tim Deegan --- diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 82158978e2..02200ff883 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -390,6 +390,12 @@ static void __init setup_mm(unsigned long dtb_paddr, size_t dtb_size) e = n = ram_end; } + /* Module in RAM which we cannot see here, due to not handling + * non-contiguous memory regions yet + */ + if ( e > ram_end ) + e = ram_end; + /* Avoid the xenheap */ if ( s < ((xenheap_mfn_start+xenheap_pages) << PAGE_SHIFT) && (xenheap_mfn_start << PAGE_SHIFT) < e )