Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#496 closed enhancement (fixed)

provide sbrk workaround for powerpc 32Mb/short jump problem

Reported by: strauman Owned by: Joel Sherrill
Priority: lowest Milestone: 2
Component: bsps Version: 4.6
Severity: minor Keywords:
Cc: bugs@… Blocked By:
Blocking:

Description

This patch implements 'sbrk' for the powerpc-shared BSP to work around what's known as the '32Mb problem' in combination with run-time loaded code:

Gcc normally generates (powerpc) code doing 'short jumps' which requires all text segments being in the same 32Mb area of memory. However, some run-time loaders use (e.g. heap-) memory violating the stated limitation on hardware with more than 32Mb of memory. (Note that portable loaders are probably not even aware of this Gcc/CPU specific problem)

This patch implements a simple workaround: At boot time, the system is only provided with 32Mb of memory. The user is supposed to load all necessary modules prior to that limit being exhausted. Once that happens, newlib/malloc end up trying to 'sbrk()' for more memory and the implementation provided by this patch will then make the rest of the physical memory available.

Release:
RTEMS-4.6-pre4

Environment:
powerpc-shared BSP

Attachments (1)

ppc-shared-sbrk.diff (5.7 KB) - added by strauman on 12/03/06 at 13:31:12.
ppc-shared-sbrk.diff

Download all attachments as: .zip

Change History (2)

comment:1 Changed on 09/26/03 at 19:45:18 by Joel Sherrill

Status: assignedclosed

State-Changed-From-To: open->closed
State-Changed-Why: Patch applied to 4.6 branch and trunk.

Changed on 12/03/06 at 13:31:12 by strauman

Attachment: ppc-shared-sbrk.diff added

ppc-shared-sbrk.diff

Note: See TracTickets for help on using tickets.