Author: kib
Date: Sat Dec  7 00:23:19 2019
New Revision: 355474
URL: https://svnweb.freebsd.org/changeset/base/355474

Log:
  amd64: properly set the start of the io permission bitmap for BSP
  
  ... after the initial common TSS is copied into its final location
  during PCPU reallocation.
  
  Reported by:  pho
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Fri Dec  6 23:59:23 2019        (r355473)
+++ head/sys/amd64/amd64/pmap.c Sat Dec  7 00:23:19 2019        (r355474)
@@ -1771,6 +1771,8 @@ pmap_bootstrap(vm_paddr_t *firstaddr)
        pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu));
        amd64_bsp_pcpu_init1(&__pcpu[0]);
        amd64_bsp_ist_init(&__pcpu[0]);
+       __pcpu[0].pc_common_tss.tss_iobase = sizeof(struct amd64tss) +
+           IOPERM_BITMAP_SIZE;
        memcpy(__pcpu[0].pc_gdt, temp_bsp_pcpu.pc_gdt, NGDT *
            sizeof(struct user_segment_descriptor));
        gdt_segs[GPROC0_SEL].ssd_base = (uintptr_t)&__pcpu[0].pc_common_tss;
_______________________________________________
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