<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 16.0.10366.20016">
<TITLE>A question about memblock.reserved</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">H</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">el</FONT><FONT SIZE=2 FACE="Courier New">lo all,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">I</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> mm/memblock.c I see this struct memblock memblo</FONT><FONT SIZE=2 FACE="Courier New">ck which is initialized</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> with</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">empty list</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2>.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<UL DIR=LTR>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] _</FONT><FONT SIZE=2 FACE="Courier New">_initdata_memblock;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_RESERVED_REGIONS] __initdata_memblock;</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS];</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">#e</FONT><FONT SIZE=2 FACE="Courier New">ndif</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">struct memblock memblock __initdata_memblock = {</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .memory.regions = memblock_memory_init_regions,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .memory.cnt = 1, /* empty dummy entry */</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .memory.max = INIT_MEMBLOCK_REGIONS,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .memory.name = "memory",</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .reser</FONT><FONT SIZE=2 FACE="Courier New">ved.regions = memblock_reserved_init_regions,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .reserved.cnt = 1, /* empty dummy entry */</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .reserved.name = "reserved",</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .bottom_up = false,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> .current_limit = MEMBLOCK_ALLOC_ANYWHERE,</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT><FONT SIZE=2 FACE="Courier New">;</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</UL>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">And I guess</FONT> <FONT SIZE=2 FACE="Courier New">thi</FONT><FONT SIZE=2 FACE="Courier New">s struct will be filled during early boot and used du</FONT><FONT SIZE=2 FACE="Courier New">ring boot. (I saw somewhere the memory regions are later moved to buddy allocation system</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> for n</FONT><FONT SIZE=2 FACE="Courier New">ormal use</FONT><FONT SIZE=2 FACE="Courier New">).</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">My questi</FONT><FONT SIZE=2 FACE="Courier New">on is</FONT><FONT SIZE=2 FACE="Courier New"> : we can speicify "reserved-memory" in</FONT><FONT SIZE=2 FACE="Courier New"> the device tree. Some drivers use</FONT> <FONT SIZE=2 FACE="Courier New">the reserved memory</FONT></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">for</FONT><FONT SIZE=2 FACE="Courier New"> its own use.</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">hen, are the '</FONT><FONT SIZE=2 FACE="Courier New">reserved-memory' regions are put in</FONT><FONT SIZE=2 FACE="Courier New">to this memblock.reserved regi</FONT><FONT SIZE=2 FACE="Courier New">ons during</FONT> <FONT SIZE=2 FACE="Courier New">the</FONT> <FONT SIZE=2 FACE="Courier New">boot process?(I mean during dtb parsing).</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">T</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">hank you!</FONT></SPAN></P>
<P DIR=LTR><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">C</FONT></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">han Kim</FONT></SPAN><SPAN LANG="en-us"></SPAN></P>
</BODY>
</HTML>