Message ID | 1394640969-25583-5-git-send-email-julien.grall@linaro.org |
---|---|
State | Accepted, archived |
Commit | c84e6224f5c9788cf8356cc2aad32b4a12d9834e |
Headers | show |
On Wed, 2014-03-12 at 16:15 +0000, Julien Grall wrote: > When the the module size is 0, it means that the module was not provided by > the user. It can happen, if the user choose to boot without initrd. > > In this case, both fields (start and size) are zeroed. Therefore, next_module > will return 0 every time if there is other non-zero module after this one. It > will happend "happen" or better "This can happen" > when the XSM module will be added. s/will be/is/ > Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com> > --- > xen/arch/arm/setup.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > index 959744e..31d853d 100644 > --- a/xen/arch/arm/setup.c > +++ b/xen/arch/arm/setup.c > @@ -281,6 +281,9 @@ static paddr_t __init next_module(paddr_t s, paddr_t *end) > paddr_t mod_s = mi->module[i].start; > paddr_t mod_e = mod_s + mi->module[i].size; > > + if ( !mi->module[i].size ) > + continue; > + > if ( mod_s < s ) > continue; > if ( mod_s > lowest )
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index 959744e..31d853d 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -281,6 +281,9 @@ static paddr_t __init next_module(paddr_t s, paddr_t *end) paddr_t mod_s = mi->module[i].start; paddr_t mod_e = mod_s + mi->module[i].size; + if ( !mi->module[i].size ) + continue; + if ( mod_s < s ) continue; if ( mod_s > lowest )
When the the module size is 0, it means that the module was not provided by the user. It can happen, if the user choose to boot without initrd. In this case, both fields (start and size) are zeroed. Therefore, next_module will return 0 every time if there is other non-zero module after this one. It will happend when the XSM module will be added. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- xen/arch/arm/setup.c | 3 +++ 1 file changed, 3 insertions(+)