Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2020 10:03:11 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360247 - head/stand
Message-ID:  <202004241003.03OA3B2x053200@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Fri Apr 24 10:03:11 2020
New Revision: 360247
URL: https://svnweb.freebsd.org/changeset/base/360247

Log:
  Build the arm64 loader with -ffixed-x18
  
  This stops the compiler from using the x18 register. Some UEFI
  implementations assume this will be preserved when calling the Boot
  Services.
  
  MFC after:	2 weeks
  Sponsored by:	Innovate UK

Modified:
  head/stand/defs.mk

Modified: head/stand/defs.mk
==============================================================================
--- head/stand/defs.mk	Fri Apr 24 09:32:20 2020	(r360246)
+++ head/stand/defs.mk	Fri Apr 24 10:03:11 2020	(r360247)
@@ -119,7 +119,7 @@ SSP_CFLAGS=
 # currently has no /boot/loader, but may soon.
 CFLAGS+=	-ffreestanding ${CFLAGS_NO_SIMD}
 .if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+=	-mgeneral-regs-only -fPIC
+CFLAGS+=	-mgeneral-regs-only -ffixed-x18 -fPIC
 .elif ${MACHINE_CPUARCH} == "riscv"
 CFLAGS+=	-march=rv64imac -mabi=lp64
 .else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004241003.03OA3B2x053200>