Author: markj
Date: Tue Oct 22 17:22:10 2019
New Revision: 353895
URL: https://svnweb.freebsd.org/changeset/base/353895

Log:
  Apply r353893 to arm64.
  
  Reported by:  Jenkins (hardware CI lab)
  MFC after:    1 week
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/locore.S
  head/sys/arm64/arm64/machdep.c

Modified: head/sys/arm64/arm64/locore.S
==============================================================================
--- head/sys/arm64/arm64/locore.S       Tue Oct 22 17:21:23 2019        
(r353894)
+++ head/sys/arm64/arm64/locore.S       Tue Oct 22 17:22:10 2019        
(r353895)
@@ -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: head/sys/arm64/arm64/machdep.c
==============================================================================
--- head/sys/arm64/arm64/machdep.c      Tue Oct 22 17:21:23 2019        
(r353894)
+++ head/sys/arm64/arm64/machdep.c      Tue Oct 22 17:22:10 2019        
(r353895)
@@ -745,7 +745,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;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to