freebsd-nq/stand
Ian Lepore 12b92a343c Save and restore r9 register in arm ubldr. In old gcc 4.2, r9 was a callee-
saved register, but in arm EABI it may be either callee-saved or dedicated
to some special purpose (such as a TLS pointer).  It appears clang does not
treat it as a callee-saved register (instead using it as another work
register, similar to r12).

Another important side effect of these changes is that saving an extra
register in the push/pop statements keeps the stack aligned to an 8-byte
boundary during the self_reloc() call, as it always should have been.

As stated in the PR...

Essentially the important caller-saved registers are pushed (r0, r1, r9, lr)
before the relocation call, and popped after.  Then r8/r9 are saved as usual
for the syscall trampoline, and lr is stored in r8 (now free) as a
callee-saved value before calling into `main`.

The call to `main` can no longer be a tail call because we must restore r9
especially after main returns (although since we have used r8 to hold lr we
must also restore this).

PR:		224008
2017-12-10 21:51:27 +00:00
..
arm Save and restore r9 register in arm ubldr. In old gcc 4.2, r9 was a callee- 2017-12-10 21:51:27 +00:00
arm64
common Create interp class. 2017-12-08 19:57:16 +00:00
efi boot1.c needs EFI_ZFS_BOOT too, so add it globally. Otherwise we'll 2017-12-08 19:57:26 +00:00
fdt
ficl This path belongs in ficl/Makefile, not the common defines for users 2017-12-08 22:19:41 +00:00
ficl32
forth
geli No need to include the userland md5.h, the kernel one is just fine. 2017-12-05 21:37:45 +00:00
i386 Avoid setting -Wno-tentative-definition-incomplete-type with gcc. 2017-12-07 22:11:23 +00:00
kshim
libsa Put the files we're copying over into a few variables and add them to 2017-12-08 19:57:06 +00:00
libsa32
man
mips Tweaks to the beri boot loader so that it builds w/o warnings. 2017-12-02 00:07:31 +00:00
ofw e_entry can be smaller than a pointer. Cast it to an intptr_t before 2017-12-03 04:55:04 +00:00
powerpc Provide a md_load64 prototype. 2017-12-03 04:55:28 +00:00
sparc64 Delcare md_load in libofw.h. Make all prototypes match for ofw 2017-12-03 04:54:49 +00:00
uboot
usb
userboot Make putenv and getenv match the userland definition of these 2017-12-06 02:00:00 +00:00
zfs Mark two things as unused (since they are only sometimes used) and 2017-12-03 04:55:33 +00:00
zfs32
defs.mk Stop building with the standard system headers. 2017-12-05 21:38:19 +00:00
fdt.mk
ficl.mk This path belongs in ficl/Makefile, not the common defines for users 2017-12-08 22:19:41 +00:00
loader.mk Create interp class. 2017-12-08 19:57:16 +00:00
Makefile
Makefile.amd64 Switch to proper MK_LOADER_GELI tests. 2017-12-04 01:14:12 +00:00
Makefile.arm
Makefile.arm64
Makefile.i386 Switch to proper MK_LOADER_GELI tests. 2017-12-04 01:14:12 +00:00
Makefile.inc Minor flags cleanup 2017-12-02 00:06:58 +00:00
Makefile.mips
Makefile.powerpc
Makefile.sparc64
uboot.mk