]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 279929:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Apr 2015 19:03:11 +0000 (19:03 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 9 Apr 2015 19:03:11 +0000 (19:03 +0000)
commit089f951f1f9df4bff8d941022b2e9f60927f8dce
tree6b47fc902fade40881c5013e7c6375b9a3650442
parent86e3ef8e248606439811b5ad992d7b74761877b3
MFC 279929:
Allow the EFI loader to work with large kernels and/or modules
(for example, a large mfsroot).  Note that for EFI the kernel and
modules (as well as other metadata files such as splash screens or
memory disk images) are loaded into a statically-sized staging area.
When the EFI loader exits it copies this staging area down to the
location the kernel expects to run at.
- Add bounds checking to the copy routines to fail attempts to access
  memory outside of the staging area.  Previously loading a combined
  kernel + modules larger than the staging size (32MB) would overflow
  the staging area trashing whatever memory was afterwards.  Under
  Intel's OVMF firmware for qemu this resulted in fatal faults in the
  firmware itself.  Now the attempt will fail with ENOMEM.
- Allow the staging area size to be configured at compile time via
  an EFI_STAGING_SIZE variable in src.conf or on the command line.
  It accepts the size of the staging area in MB.  The default size
  remains 32MB.

git-svn-id: svn://svn.freebsd.org/base/stable/10@281319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/boot/amd64/efi/Makefile
sys/boot/amd64/efi/copy.c