Skip to contentSkip to conversation

incorrect rmo_top handling in prom_init

DISCUSSION Olaf Hering 2 participants 4 messages Mar 2, 2006 – Mar 4, 2006 PowerPC

lore
Share & tools
lore
#0 lore raw

My iBook1 has 2 memory regions in reg. Depending on how I boot it (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus tree.
rmo_top should be 160MB instead of 32MB.

0 > dev /memory .properties

name                    memory
device_type             memory
reg                     00000000  02000000
                        02000000  08000000
slot-names              00000003
                        DIMM0/BUILT-IN
                        DIMM1/J12
available               00003000 09bfd000
dimm-info               8000040c 08040000 00000000 00000000 0000bc00 00000000 000000be 00bdbf00
                        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
                        8008040c 0a014000 01a08000 80080001 8f040601 01000fa0 60000014 14143220
                        20102010 00000000 00000000 00000000 00000000 00000000 00000000 00001237
                        7fd50000 00000000 01373634 56313641 33445434 44444700 00000001 00519900
                        00000001 01020105 09030701 02020000 00000000 00000000 00000000 000064c7
dimm-types              SDRAM
                        SDRAM
dimm-speeds
                        PC100-222S

ok
0 > boot enet:1.1.1.3,yaboot
CLIENT: 000a27aa0f20 1.1.1.1
SERVER: 0003938574cc 1.1.1.3
Transfer FILE: yaboot \
TFTP-actual=406ff TFTP-adler32=e64fd05f load-size=406ff adler32=e64fd05f

Loading ELF

yaboot starting: loaded at 0x00200000-0x00235ed8 (0x0/0x200000/0xff80a290;sp: 0x0023eb14)
CLIENT: 000a27aa0f20 1.1.1.1
SERVER: 0003938574cc 1.1.1.3
Transfer FILE: yaboot.conf
TFTP-actual=333 TFTP-adler32=1af6149c Config file 'yaboot.conf' read, 819 bytes

fooo xxx yaboot.conf
Welcome to yaboot version 1.3.13.SuSE booted from '/pci@f4000000/ethernet:1.1.1.3,yaboot' Enter "help" to get some basic usage information
boot: i
Please wait, loading kernel...

CLIENT: 000a27aa0f20 1.1.1.1
SERVER: 0003938574cc 1.1.1.3
Transfer FILE: inst32
TFTP-actual=798ffb TFTP-adler32=aaf3b8f5 Allocated 0x00900000 bytes for executable @ 0x00400000
Elf32 kernel loaded...

SuSE Linux zImage starting: loaded at 0x00400000-0x00b93cbc (0x1000000/0x0/0xff80a290; sp: 0x0023e9a4) uncompressing ELF header done. (0x00000100 bytes)
Allocated 0x0078dfb0 bytes for kernel @ 0x02000000
Allocated 0x005aacd6 bytes for initrd @ 0x0278e000
uncompressing kernel done. (0x00431788 bytes)
entering kernel at 0x02010000(278e000/5aacd6/ff80a290)
OF stdout device is: /packages/telnet
initrd_start=0x0278e000
initrd_end=0x02d38cd6
command line:
root_addr_cells: 00000001
root_size_cells: 00000001
scanning memory:
node /memory@0 :

    00000000 02000000
    02000000 08000000

memory layout at init:
memory_limit : 00000000 (16 MB aligned)
alloc_bottom : 02d39000
alloc_top : 02000000
alloc_top_hi : 0a000000
rmo_top : 02000000
ram_top : 0a000000
Booting CPU hw index = 0x00000000
copying OF device tree ...
foo
starting device tree allocs at 02d39000
alloc_up(00100000, 00001000)
Can't allocate initial device-tree chunk

DEFAULT CATCH!, code=900 at %SRR0: 024017a4 %SRR1: 00083030
ok
0 >

#1 lore raw
Quoted 4 lines · Olaf Hering

My iBook1 has 2 memory regions in reg. Depending on how I boot it (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus tree.
rmo_top should be 160MB instead of 32MB.

Does that fix it ?

arch/powerpc/kernel/prom_init.c +1 -1
Index: linux-work/arch/powerpc/kernel/prom_init.c
===================================================================
@@ -978,7 +978,7 @@
 			if (size == 0)
 				continue;
 			prom_debug("    %x %x\n", base, size);
-			if (base == 0)
+			if (base == 0 && (RELOC(of_platform) & PLATFORM_LPAR))
 				RELOC(rmo_top) = size;
 			if ((base + size) > RELOC(ram_top))
 				RELOC(ram_top) = base + size;
#2 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Olaf Hering

My iBook1 has 2 memory regions in reg. Depending on how I boot it (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus tree.
rmo_top should be 160MB instead of 32MB.

Does that fix it ?

My G5 may need similar tweaks. looking.

0 > dev /memory .properties

name                    memory
device_type             memory
reg                     00000000 00000000  10000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
                        00000000 00000000  00000000 
slot-names              0000000f
                        DIMM0/J11
                        DIMM1/J12
                        DIMM2/J13
                        DIMM3/J14
available               00003000 0fbf9000 
bank-names              0000000f
                        64 bit Bank0/J11/J12/front
                        64 bit Bank1/J11/J12/back
                        64 bit Bank2/J13/J14/front
                        64 bit Bank3/J13/J14/back
bank-sizes              10000000 00000000 00000000 00000000 
dimm-info               8008070d 09014000 04607000 82100001 0e040c01 0220c075 
                        70000048 30482a20 75754545 00000000 003c4830 2d550000 
                        00000000 00000000 00000000 000000e7 ad000000 00000000 
                        0148594d 44323136 20363436 41364a2d 4a202041 41033432 
                        06873900 00000000 00000000 00000000 00000000 00000000 
                        00000000 00000000 8008070d 09014000 04607000 82100001 
                        0e040c01 0220c075 70000048 30482a20 75754545 00000000 
                        003c4830 2d550000 00000000 00000000 00000000 000000e7 
                        ad000000 00000000 0148594d 44323136 20363436 41364a2d 
                        4a202041 41033432 06863800 00000000 00000000 00000000 
                        00000000 00000000 00000000 00000000 
                        ... 00000200 bytes total

dimm-types DDR SDRAM
DDR SDRAM

dimm-speeds PC2700U-25330

                        PC2700U-25330

ram-layout-architecture 00000001

ok

#3 lore raw
In reply to Benjamin Herrenschmidt
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Olaf Hering

My iBook1 has 2 memory regions in reg. Depending on how I boot it (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus tree.
rmo_top should be 160MB instead of 32MB.

Does that fix it ?

Yes.