Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Oct 2019 18:39:08 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r354198 - stable/12/sys/arm64/arm64
Message-ID:  <201910301839.x9UId8m7007059@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Oct 30 18:39:07 2019
New Revision: 354198
URL: https://svnweb.freebsd.org/changeset/base/354198

Log:
  MFC r353895:
  Apply r353893 to arm64.

Modified:
  stable/12/sys/arm64/arm64/locore.S
  stable/12/sys/arm64/arm64/machdep.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/arm64/arm64/locore.S
==============================================================================
--- stable/12/sys/arm64/arm64/locore.S	Wed Oct 30 18:38:44 2019	(r354197)
+++ stable/12/sys/arm64/arm64/locore.S	Wed Oct 30 18:39:07 2019	(r354198)
@@ -132,6 +132,7 @@ virtdone:
 	str	x1,  [x0]	/* modulep */
 	str	x26, [x0, 8]	/* kern_l1pt */
 	str	x29, [x0, 16]	/* kern_delta */
+	adr	x25, initstack
 	str	x25, [x0, 24]	/* kern_stack */
 	str	x24, [x0, 32]	/* kern_l0pt */
 

Modified: stable/12/sys/arm64/arm64/machdep.c
==============================================================================
--- stable/12/sys/arm64/arm64/machdep.c	Wed Oct 30 18:38:44 2019	(r354197)
+++ stable/12/sys/arm64/arm64/machdep.c	Wed Oct 30 18:39:07 2019	(r354198)
@@ -702,7 +702,9 @@ init_proc0(vm_offset_t kstack)
 
 	proc_linkup0(&proc0, &thread0);
 	thread0.td_kstack = kstack;
-	thread0.td_pcb = (struct pcb *)(thread0.td_kstack) - 1;
+	thread0.td_kstack_pages = KSTACK_PAGES;
+	thread0.td_pcb = (struct pcb *)(thread0.td_kstack +
+	    thread0.td_kstack_pages * KSTACK_PAGES) - 1;
 	thread0.td_pcb->pcb_fpflags = 0;
 	thread0.td_pcb->pcb_fpusaved = &thread0.td_pcb->pcb_fpustate;
 	thread0.td_pcb->pcb_vfpcpu = UINT_MAX;



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