Author: dim Date: Wed May 1 18:06:53 2013 New Revision: 250151 URL: http://svnweb.freebsd.org/changeset/base/250151
Log: MFC r249846: When rebooting (exiting) from the BTX loader, make sure to restore the GDT from the correct segment, otherwise a triple fault would be caused. In some virtual environments (VMware, VirtualBox, etc) this could lead to a unhandled error or hang in the guest emulation software. Thanks to avg and jhb for a few hints in the right direction. Noticed by: Jeremy Chadwick <j...@koitsu.org> (and many others) Modified: stable/7/sys/boot/i386/btx/btx/btx.S stable/7/sys/boot/pc98/btx/btx/btx.S Directory Properties: stable/7/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/6/sys/boot/i386/btx/btx/btx.S stable/6/sys/boot/pc98/btx/btx/btx.S stable/8/sys/boot/i386/btx/btx/btx.S stable/8/sys/boot/pc98/btx/btx/btx.S stable/9/sys/boot/i386/btx/btx/btx.S stable/9/sys/boot/pc98/btx/btx/btx.S Directory Properties: stable/6/sys/ (props changed) stable/8/sys/ (props changed) stable/8/sys/boot/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/7/sys/boot/i386/btx/btx/btx.S ============================================================================== --- stable/7/sys/boot/i386/btx/btx/btx.S Wed May 1 17:59:41 2013 (r250150) +++ stable/7/sys/boot/i386/btx/btx/btx.S Wed May 1 18:06:53 2013 (r250151) @@ -246,7 +246,7 @@ exit: cli # Disable interrupts /* * Restore the GDT in case we caught a kernel trap. */ - lgdt gdtdesc # Set GDT + lgdt %cs:gdtdesc # Set GDT /* * To 16 bits. */ Modified: stable/7/sys/boot/pc98/btx/btx/btx.S ============================================================================== --- stable/7/sys/boot/pc98/btx/btx/btx.S Wed May 1 17:59:41 2013 (r250150) +++ stable/7/sys/boot/pc98/btx/btx/btx.S Wed May 1 18:06:53 2013 (r250151) @@ -246,7 +246,7 @@ exit: cli # Disable interrupts /* * Restore the GDT in case we caught a kernel trap. */ - lgdt gdtdesc # Set GDT + lgdt %cs:gdtdesc # Set GDT /* * To 16 bits. */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"