Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2018 02:03:00 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341805 - head/sys/powerpc/booke
Message-ID:  <201812110203.wBB230Mo021827@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Tue Dec 11 02:03:00 2018
New Revision: 341805
URL: https://svnweb.freebsd.org/changeset/base/341805

Log:
  powerpc/booke: Don't get and use the load offset for TOC on APs
  
  The code was a near exact copy of the code in startup, but it doesn't need
  the complexity since the kernel is already relocated.  With
  VM_MIN_KERNEL_ADDRESS as currently set to KERNBASE, this doesn't cause a
  problem, because it's a zero offset.  However, when KERNBASE is changed to a
  physical load address, it then has a non-zero offset, and ends up with an
  invalid stack pointer, causing the AP to hang.

Modified:
  head/sys/powerpc/booke/locore.S

Modified: head/sys/powerpc/booke/locore.S
==============================================================================
--- head/sys/powerpc/booke/locore.S	Tue Dec 11 01:49:06 2018	(r341804)
+++ head/sys/powerpc/booke/locore.S	Tue Dec 11 02:03:00 2018	(r341805)
@@ -549,14 +549,9 @@ bp_kernload:
 	add	%r2,%r1,%r2
 	mtspr	SPR_SPRG8, %r2
 
-	/* Get load offset */
-	ld	%r31,-0x8000(%r2) /* First TOC entry is TOC base */
-	subf    %r31,%r31,%r2	/* Subtract from real TOC base to get base */
-
 	/* Set up the stack pointer */
 	ld	%r1,TOC_REF(tmpstack)(%r2)
 	addi	%r1,%r1,TMPSTACKSZ-96
-	add	%r1,%r1,%r31
 #else
 /*
  * Setup a temporary stack



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