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. This
can happen when the XSM module is added.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
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 )