#3322 closed defect (fixed)

powerPC bsp not booting with memory larger than 256Mb

Reported by: Eric Tremblay Owned by: Éric Tremblay <e.tremblay@…>
Priority: normal Milestone:
Component: arch/powerpc Version:
Severity: normal Keywords: powerpc boot
Cc: Blocked By:


Whenever memory available to the bsp is greater than 256Mb the bootloader remain stuck after decompressing the kernel.

My understanding of the problem is that the bootloader only give access to the 1st 256Mb of RAM but when more memory is used the kernel and other components are stored in the top of the RAM beyond the first 256Mb.

The provided patch gives top of the RAM access to the system so it can correctly boot.

I am using:

  • source from rtems release 4.11.3
  • Qemu v2.5.0
  • Host system is Ubuntu Linux 16.04.1 in a VM (x86 64bits)

The problem is easily reproducible with Qemu with the following command but could surely affect hardware too:

qemu-system-ppc -M prep -kernel ./hello.ralf -bios /home/qemu_fakerom/qemu_fakerom.bin -cpu 750cxe -nographic -no-reboot -m 384

Console output:

Processor/Bus? frequencies (Hz): 300000000/100000000
Time Base Divisor: 1000
Memory Size: 18000000
Residual: 102afd4 (length 27148)

PCI: Probing PCI hardware

RTEMS 4.x/PPC load:
Uncompressing the kernel...
Kernel at 0x00000000, size=0x495b0
Initrd at 0x00000000, size=0x0
Residual data at 0x0004a000
Command line at 0x00051000
Now booting... <<<<< execution stuck here

Attachments (1)

qemu_powerpc_largememory.diff (2.4 KB) - added by Eric Tremblay on 03/19/18 at 15:09:27.
Corrected comments and removed unnecessary label in assembly file.

Download all attachments as: .zip

Change History (6)

comment:1 Changed on 03/16/18 at 17:43:19 by Joel Sherrill

I wanted to note two things:

  • Chris is supposed to be given access to real hardware to test this on.
  • Sebastian committed a change to switch qemuppc to use the shared linker script. This might impact your patch. Please update the patch if needed per the master.

comment:2 Changed on 03/17/18 at 10:05:10 by Sebastian Huber

We have two Qemu PowerPC BSPs qemuprep and qemuppc. I touched qemuppc. This ticket is for qemuprep?

comment:3 Changed on 03/17/18 at 14:30:28 by Joel Sherrill

The patch touches code used by motorola_shared and beatnik. The patch has only been tested on qemu. We need it tested on hardware.

Changed on 03/19/18 at 15:09:27 by Eric Tremblay

Corrected comments and removed unnecessary label in assembly file.

comment:4 Changed on 03/21/18 at 05:59:24 by Sebastian Huber

Ticker runs with beatnik BSP on MVME6100:

MVME6100> tftpGet -c141.14.128.53 -s141.14.133.59 -m255.255.240.0 -a04000000 -fticker.ralf
Network Loading from: /dev/enet0
Loading File: ticker.ralf
Load Address: 04000000
Download Buffer Size = User Defined

Client IP Address      =
Server IP Address      =
Gateway IP Address     =
Subnet IP Address Mask =

Network File Load in Progress...

Bytes Received =&215224, Bytes Loaded =&215224
Bytes/Second   =&215224, Elapsed Time =1 Second(s)
MVME6100> go -a04000000
config addr is 0xf1000cf8
config data is 0xf1000cfc
Welcome to RTEMS rtems-5.0.0 (PowerPC/Generic (classic FPU)/beatnik)
CPU: MPC7457
Board Type: MVME6100-0163 (S/N E173D29)
Bus Clock Freq:   133333333 Hz
CPU Clock Freq:  1266666654 Hz
Memory:           536870912 bytes
Now BSP_mem_size = 0x1fe00000
Configuration.work_space_size = 16110
Page table setup finished; will activate it NOW...
Going to start PCI buses scanning and initialization
Number of PCI buses found is : 3
MSR 0x2003032
Exit from bspstart
unable to find the universe in pci config space
Tundra Tsi148 PCI-VME bridge detected at 0x81100000, IRQ 84
Tsi148 Outbound Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x20000000 0x0e000000 0x90000000 A32, SUP, D32, SCT
1:    0x00000000 0x00ff0000 0x9f000000 A24, SUP, D32, SCT
2:    0x00000000 0x00010000 0x9fff0000 A16, SUP, D32, SCT
7:    0x00000000 0x01000000 0x9e000000 CSR, SUP, D32, SCT
Tsi148 Inbound Ports:
Port  VME-Addr   Size       PCI-Adrs   Mode:
0:    0x90000000 0x1fe00000 0x00000000 A32, PGM, DAT, SUP, USR, MBLT, BLT
vmeTsi148 IRQ manager: looking for registers on VME...
Trying to find CSR on VME...
vmeTsi148 - IRQ manager using VME CSR to flush FIFO

*** TEST TOOLS: 7.3.0 20180125 (RTEMS 5, RSB 4b3e0f8e3d6998b84a2503dd2e11578989b1672b, Newlib 3.0.0)
TA1  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA2  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA3  - rtems_clock_get_tod - 09:00:00   12/31/1988
TA1  - rtems_clock_get_tod - 09:00:05   12/31/1988

comment:5 Changed on 03/21/18 at 05:59:37 by Éric Tremblay <e.tremblay@…>

Owner: set to Éric Tremblay <e.tremblay@…>
Resolution: fixed
Status: newclosed

In 5cf0656/rtems:

bsps/powerpc: Support more than 256MiB of RAM

Close #3322.

Note: See TracTickets for help on using tickets.