Date: Mon, 28 Apr 2014 23:46:04 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265064 - stable/10/sys/boot/arm/uboot Message-ID: <201404282346.s3SNk4t1007506@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Mon Apr 28 23:46:04 2014 New Revision: 265064 URL: http://svnweb.freebsd.org/changeset/base/265064 Log: MFC r257210, r258527: No hardfloat in ubldr, save/restore r9 for api calls. Modified: stable/10/sys/boot/arm/uboot/Makefile stable/10/sys/boot/arm/uboot/start.S Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Mon Apr 28 23:16:46 2014 (r265063) +++ stable/10/sys/boot/arm/uboot/Makefile Mon Apr 28 23:46:04 2014 (r265064) @@ -90,7 +90,7 @@ CFLAGS+= -I. CLEANFILES+= vers.c loader.help -CFLAGS+= -ffreestanding +CFLAGS+= -ffreestanding -msoft-float LDFLAGS= -nostdlib -static LDFLAGS+= -T ldscript.generated Modified: stable/10/sys/boot/arm/uboot/start.S ============================================================================== --- stable/10/sys/boot/arm/uboot/start.S Mon Apr 28 23:16:46 2014 (r265063) +++ stable/10/sys/boot/arm/uboot/start.S Mon Apr 28 23:46:04 2014 (r265064) @@ -39,9 +39,10 @@ _start: ldr ip, =uboot_address str sp, [ip] - /* Save U-Boot's r8 */ + /* Save U-Boot's r8 and r9 */ ldr ip, =saved_regs str r8, [ip, #0] + str r9, [ip, #4] #ifdef _ARM_ARCH_6 mrc p15, 0, r2, c1, c0, 0 @@ -57,21 +58,24 @@ _start: * syscall() */ ENTRY(syscall) - /* Save caller's lr and r8 */ + /* Save caller's lr, r8 and r9 */ ldr ip, =saved_regs - str lr, [ip, #4] str r8, [ip, #8] - /* Restore U-Boot's r8 */ + str r9, [ip, #12] + str lr, [ip, #16] + /* Restore U-Boot's r8 and r9 */ ldr r8, [ip, #0] + ldr r9, [ip, #4] /* Call into U-Boot */ ldr lr, =return_from_syscall ldr ip, =syscall_ptr ldr pc, [ip] return_from_syscall: - /* Restore loader's r8 and lr */ + /* Restore loader's r8, r9 and lr */ ldr ip, =saved_regs + ldr lr, [ip, #16] + ldr r9, [ip, #12] ldr r8, [ip, #8] - ldr lr, [ip, #4] /* Return to caller */ mov pc, lr @@ -90,5 +94,7 @@ uboot_address: saved_regs: .long 0 /* U-Boot's r8 */ + .long 0 /* U-Boot's r9 */ .long 0 /* Loader's r8 */ + .long 0 /* Loader's r9 */ .long 0 /* Loader's lr */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404282346.s3SNk4t1007506>