HomeFreeBSD

Preserve the registers containing argc, argv, and return address values

Description

Preserve the registers containing argc, argv, and return address values
passed in from u-boot across the call to self_reloc and any other early-init
code, and restore them before calling main().

The self_reloc() routine uses r0 and r1 (and calling it uses lr), and
depending on what values get left in them, main() would intermittantly lock
up trying to interpret them as argc and argv values. This problem affected
the self-relocatable ubldr.bin but not ubldr (the elf version).

Details

Provenance
ianAuthored on
Parents
rS316373: MFC r314947:
Branches
Unknown
Tags
Unknown