freebsd-skq/sys/amd64
Konstantin Belousov d367236183 Several bug fixes and robustness improvements for the AP boot page
table allocation.

At the time that mp_bootaddress() is called, phys_avail[] array does
not reflect some memory reservations already done, like kernel
placement.  Recent changes to DMAP protection which make kernel text
read-only in DMAP revealed this, where on some machines AP boot page
tables selection appears to intersect with the kernel itself.

Fix this by checking the addresses selected using the same algorithm
as bootaddr_rwx().  Also, try to chomp pages for the page table not
only at the start of the contiguous range, but also at the end.  This
should improve robustness when the only suitable range is already
consumed by the kernel.

Reported and tested by: Michael Gmelin <freebsd@grem.de>
Reviewed by:    jhb
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Approved by:    re (gjb)
Differential revision:  https://reviews.freebsd.org/D16907
2018-08-28 18:47:02 +00:00
..
acpica Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
amd64 Several bug fixes and robustness improvements for the AP boot page 2018-08-28 18:47:02 +00:00
cloudabi32 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
cloudabi64 Use TO_PTR() to convert integers to pointers. 2017-11-26 14:45:56 +00:00
conf Revert drm2 removal. 2018-08-24 00:02:00 +00:00
ia32 Use SMAP on amd64. 2018-07-29 20:47:00 +00:00
include Merge amd64 and i386 <machine/intr_machdep.h> headers. 2018-08-20 12:31:39 +00:00
linux Futex support functions in linux.ko and linux32.ko on amd64 should be 2018-08-07 18:29:10 +00:00
linux32 Futex support functions in linux.ko and linux32.ko on amd64 should be 2018-08-07 18:29:10 +00:00
pci sys/amd64: further adoption of SPDX licensing ID tags. 2017-11-27 15:03:07 +00:00
sgx Rename assym.s to assym.inc 2018-03-20 17:58:51 +00:00
vmm Update L1TF workaround to sustain L1D pollution from NMI. 2018-08-19 18:47:16 +00:00
Makefile Bring the tags and links entries for amd64 up to date. 2015-10-27 22:59:24 +00:00