On 23/09/2016 17:36, 조현권 wrote:
Hi
Hello, Sorry for the late reply.
I am experimenting Xen with my embedded system environment and got a question in next_module() function. / / /static paddr_t __init next_module(paddr_t s, paddr_t *end)/ /{/ / struct bootmodules *mi = &bootinfo.modules;/ / paddr_t lowest = ~(paddr_t)0;/ / int i;/ / / / for ( i = 0; i < mi->nr_mods; i++ )/ / {/ / 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 )/ / continue;/ / if ( mod_s > *end )/ / continue;/ / lowest = mod_s;/ / *end = min(*end, mod_e);/ / }/ / return lowest;/ /}/ The job of next_module() function is excluding module exist RAM range between s and *end and finding empty space which can be heap space. But Its function does not work if module range is bigger than s and *end range. (Case when module range is mod_s <= s and mod_e >= *end) / if ( mod_s < s )/ / continue;/ / / Above condition passes the case and xen consider range s and *end is free space. Is it expected result or mistake?
The code is assuming that the module will always fit in a bank. I am not sure why you would want to have the module crossing the boundary between 2 banks.
Can you provide the list of banks and the position of the modules? Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel