CONFIG_HIGHMEM problems
Tilmann Bitterberg
tibit-ibm at bitterberg.de
Fri Sep 8 22:55:07 EST 2000
Hi,
I tried your experimental CONFIG_HIGHMEM support. My machine is
an RS/6K 44P-170 (POWER3-II) with 2Gig of RAM. Kernel is a recent
BK snapshot.
After looking at arch/ppc/mm/init.c:pmac_find_end_of_memory, I
realized that there is no chance to return a total of more than
ram_limit (which is in 512MB in my case).
I do not have discontinous memory so phys_mem.n_regions == 1
Problem: After freeing all init stuff I get a
Machine check in kernel mode
Caused by (from: SRR1=81032) Machine check.
TRAP 0200
TASK = co1a5ff0[0] 'swapper'
Last syscall: 120
My bootlog with the attached patch is: (long lines are wrapped)
I have found 2048MB RAM
set_phys_avail: klimit (-1071201084), kstart (0), ksize (2543616)
Total memory = 640MB; using 2048kB for hash table (at c0800000)
Linux version 2.4.0-test8 (root at karl.de.ibm.com) (gcc version 2.95.2)
Boot arguments: root=/dev/sda2 mem=2048M console=ttyS0,9600
OpenPIC addrs: ffc00000 feff7c00 feef7c00
RTAS Event Scan Rate: 1 (2999 jiffies)
On node 0 totalpages: 524288
zone(0): 163840 pages.
zone(1): 0 pages.
zone(2): 360448 pages.
Kernel command line: root=/dev/sda2 mem=2048M console=ttyS0,9600
OpenPIC Version 1.2 (8 CPUs and 1 IRQ sources) at ffc00000
OpenPIC timer frequency is not set
time_init: decrementer frequency = 100.004166 MHz
Console: colour dummy device 80x25
Calibrating delay loop... 799.54 BogoMIPS
Memory: 1927816k available (1376k kernel code, 864k data, 244k init, \
1441792k highmem)
Dentry-cache hash table entries: 262144 (order: 9, 2097152 bytes)
Buffer-cache hash table entries: 131072 (order: 7, 524288 bytes)
Page-cache hash table entries: 524288 (order: 9, 2097152 bytes)
Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes)
POSIX conformance testing by UNIFIX
[...]
Freeing unused kernel memory: 244k init 32k prep 16k pmac
Mem-info:
Free pages: 1919936kB (1441792kB HighMem)
( Free: 479984, lru_cache: 4 (256 512 768) )
00 DMA: 2*4kB 3*8kB 2*16kB 0*32kB 2*64kB 2*128kB 0*256kB \
1*512kB 0*1024kB 233*2048kB = 478144k)
L00 Normal: = 0kB)
00 HighMem: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB \
0*512kB 0*1024kB 704*2048kB = 144)
Swap cache: add 0, delete 0, find 0/0
Free swap: 0kB
524288 pages of RAM
360448 pages of HIGHMEM
481835 free pages
42261 reserved pages
0 pages shared
0 pages swap cached
0 pages in page table cache
Buffer memory: 16kB
Process Pid Ctx Ctx<<4 Last Sys pc task
swapper 1 0 0 120 ?00000000 c2a1c000 current
kswapd 2 0 0 -1 ?00000000 c067c000
kflushd 3 0 0 -1 ?00000000 c067a000
kupdate 4 0 0 -1 ?00000000 c0678000
Thanks in advance
Tilmann
--
/usr/games/fortune: No such file or directory
-------------- next part --------------
--- linux-2.4.0-test8-pre4/arch/ppc/mm/init.c.orig Mon Feb 2 09:32:36 1970
+++ linux-2.4.0-test8-pre4/arch/ppc/mm/init.c Mon Feb 2 09:31:29 1970
@@ -1284,6 +1291,8 @@
{
unsigned long a, total;
unsigned long ram_limit = 0xe0000000 - KERNELBASE;
+ unsigned long real_ram;
memory_node = find_devices("memory");
if (memory_node == NULL) {
@@ -1303,18 +1312,28 @@
* in mem_map).
*/
get_mem_prop("reg", &phys_mem);
+ printk("I have found %ldMB RAM\n", (unsigned long) phys_mem.regions[0].size>>20);
if (phys_mem.n_regions == 0)
panic("No RAM??");
a = phys_mem.regions[0].address;
if (a != 0)
panic("RAM doesn't start at physical address 0");
if (__max_memory == 0 || __max_memory > ram_limit)
__max_memory = ram_limit;
+
+ real_ram = phys_mem.regions[0].size;
+
if (phys_mem.regions[0].size >= __max_memory) {
phys_mem.regions[0].size = __max_memory;
phys_mem.n_regions = 1;
}
+#ifdef CONFIG_HIGHMEM /* tibit */
+ total = real_ram;
+#else
total = phys_mem.regions[0].size;
+#endif /* CONFIG_HIGHMEM */
if (phys_mem.n_regions > 1) {
printk("RAM starting at 0x%x is not contiguous\n",
More information about the Linuxppc-dev
mailing list