public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] early_malloc() vs. enable_caches()
@ 2012-07-28 15:46 Tomas Hlavacek
  2012-07-29  9:42 ` Albert ARIBAUD
  2012-07-29 10:53 ` Graeme Russ
  0 siblings, 2 replies; 7+ messages in thread
From: Tomas Hlavacek @ 2012-07-28 15:46 UTC (permalink / raw)
  To: u-boot

Hello!

I am working on early_malloc() for U-Boot Driver Model (this malloc is
going to serve for internal DM structures during early init and it has it's
minimalistic heap in global data).

My question is how to correctly switch from early allocator to full-scale
malloc and when to enable caches.

The current state (on ARM) is:
1) gd = id;
3) enable_caches();
3) mem_malloc_init();

Proposed sequence for mallocator (in order no to loose any data from old
and not-relocated part of GD):

1) gd_old = gd;
2) gd = id;
3) mem_malloc_init();
4) relocation of DM structures
5) early_malloc_disab()
6) enable_caches();

Does it make sense? It actually boils down to one fundamental question:
When I have not-rellocated data locked in cache-lines, do I loose them once
enable_caches() is called?

Thanks,
Tomas

-- 
Tom?? Hlav??ek <tmshlvck@gmail.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-29 22:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-28 15:46 [U-Boot] early_malloc() vs. enable_caches() Tomas Hlavacek
2012-07-29  9:42 ` Albert ARIBAUD
2012-07-29 10:25   ` [U-Boot] [U-Boot-DM] " Marek Vasut
2012-07-29 10:53 ` Graeme Russ
2012-07-29 12:15   ` Marek Vasut
2012-07-29 13:19   ` Tomas Hlavacek
2012-07-29 22:34     ` Graeme Russ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox