Subject: Re: G4, 2GB RAM report (fwd)
To: None <,>
From: Tsubai Masanari <>
List: port-powerpc
Date: 08/10/2000 22:35:11
>For folks only on port-powerpc, the current powerpc pmap doesn't size
>things well when the machine has 2GB of memory. It calculates the number
>of bytes in the system in an integer quantity. 2GB > INT_MAX, so bad
>things happen.

The Programming Environments Manual says:  Page Table Size

In a 32-bit implementation, the minimum size for a page table is 64 Kbytes
(2^10 PTEGs of 64 bytes each). However, it is recommended that the total
number of PTEGs in the page table be at least half the number of physical
page frames to be mapped. While avoidance of hash collisions cannot be ...


	if (physmem < 0x800)
		ptab_cnt = 0x400;
	else {
		ptab_cnt = HTABENTS;
		ptab_cnt = (physmem + 1) / 2;
		/* Align 2^n. */
		for (i = 0; i < 32; i++)
			if ((1U << i) >= ptab_cnt) {
				ptab_cnt = 1 << i;
#endif /* HTABENTS */