Re: Kexec on ARM - memory detection

2017-04-28 Thread Pratyush Anand



On Wednesday 26 April 2017 10:45 PM, Kristian Kielhofner wrote:

On Fri, Apr 21, 2017 at 6:27 AM, Pratyush Anand  wrote:

Hi Kristian,

Sorry, I missed this mail.
Are you still on it, or it is solved?


  No problem, I'm still experiencing the issue but I haven't
investigated it further.




How does kexec-tools see above memory ranges?
As per your /proc/iomem, it should have been
4200-5fff (0)

Can you put some extra debug print in your code and check why do you have
above behavior?



  Can you point towards some examples or documentation for what you're
looking for?


kexec-tools:kexec/arch/arm/kexec-arm.c:get_memory_ranges() is telling you that 
you have

MEMORY RANGES
00012028b6d27010-bea6aee70004 (0)

However, you /proc/iomem is telling you:

4200-5fff : System RAM

get_memory_ranges() is reading /proc/iomem and finding out the available ram 
locations. So, can you debug this kexec-tools function and see why you do not 
get the range which is coming from /proc/iomem


~Pratyush



___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec


Re: [PATCH] kexec: allocate buffer in top-down, if specified, correctly

2017-04-28 Thread Thiago Jung Bauermann
Am Freitag, 28. April 2017, 09:51:39 BRT schrieb AKASHI Takahiro:
> On Thu, Apr 27, 2017 at 07:00:04PM -0300, Thiago Jung Bauermann wrote:
> > Hello,
> > 
> > Am Mittwoch, 26. April 2017, 17:22:09 BRT schrieb AKASHI Takahiro:
> > > The current kexec_locate_mem_hole(kbuf.top_down == 1) stops searching at
> > > the first memory region that has enough space for requested size even if
> > > some of higher regions may also have.
> > 
> > kexec_locate_mem_hole expects arch_kexec_walk_mem to walk memory from top
> > to bottom if top_down is true. That is what powerpc's version does.
> 
> Ah, I haven't noticed that, but x86 doesn't have arch_kexec_walk_mem and
> how can it work for x86?

Looking at v4.9's kexec_add_buffer, the logic has been this way before I 
factored kexec_locate_mem_hole out of it. So x86 has been behaving this way 
for a while.

> > Isn't it possible to walk resources from top to bottom?
> 
> Yes, it will be, but it seems to me that such a behavior is not intuitive
> and even confusing if it doesn't come with explicit explanation.

Yes, I should have put a comment pointing out that assumption.

-- 
Thiago Jung Bauermann
IBM Linux Technology Center


___
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec