lmb_phys_mem_size() vs. lmb_end_of_DRAM()

Anton Blanchard anton at samba.org
Thu Feb 5 12:25:11 EST 2004

> It looks to me like lmb_phys_mem_size() will return the largest valid
> physical address on the system while lmb_end_of_DRAM() is used just for
> usable RAM.
> lmb_phys_mem_size() determines how big the kernel's ZONE_DMA is and
> lmb_end_of_DRAM() is used to figure out everything else like bootmem
> sizes and the zone start/end_pfn values.
> Can we just abolish the use of lmb_end_of_DRAM(), and bootmem reserve
> the I/O areas?  We'll probably have some unused struct pages, but that
> should be just about the only side-effect, and it keeps from having the
> confusing distinction.  That's what we do on x86 at least.

On POWER4 and newer the IO hole sits above memory, so
__pa(lmb_end_of_DRAM()) == lmb_phys_mem_size(). The only place we care
about this distinction is POWER3.

It is similar to x86, 270 has 3G MEM - 1 G IO - 15G MEM. The nighthawk
is worse, it has 1G MEM - 3G IO - 63G MEM.

x86 doesnt have struct pages backing IO regions does it? On ppc64 we need
to create a mem_map array big enough to hit the top of RAM, so it seems to
me that we have to use lmb_end_of_DRAM().

So we currently do have struct pages for the IO region, we should probably
reserve them.

sparc64 passes in the size of the hole to free_area_init_node, I guess
we should be doing this too.


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/

More information about the Linuxppc64-dev mailing list