Created attachment 164376 [details] i386/boot: use macros from <machine/psl.h> to represent eflags's bits Hello, Some i386/boot's source code contains some checks of the EFLAGS's bits. In the same time the <machine/psl.h> header file provides macros which represents these bits. Let's use human readable names instead of numbers. Additionally indentation fixed and empty lines removed.
The patch appears to have a lot of unrelated whitespace diffs. Most of the i386 boot code already uses PSL_* constants via the nested include of <machine/psl.h> in btxv86.h. In general the boot code uses V86_CY() to check the carry flag and it looks like a few places just weren't updated to use that. I've uploaded a change that I think fixes all the stragglers. I haven't built it yet to test though. https://github.com/bsdjhb/freebsd/compare/boot_i386_eflags.diff
I've verified the patch builds ok and the md5 sums of the affected object files are identical (so no functional change).
A commit references this bug: Author: jhb Date: Thu Dec 24 06:22:42 UTC 2015 New revision: 292682 URL: https://svnweb.freebsd.org/changeset/base/292682 Log: Fix remaining direct tests of the carry flag in the v86 %eflags via a magic number to use V86_CY() instead. These should have been fixed as part of the cleanup in r226746 but were missed. The md5 sums of the object files were unchanged, so there should be no functional change. PR: 205424 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com> MFC after: 1 week Changes: head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/pc98/boot2/boot2.c head/sys/boot/pc98/libpc98/biosdisk.c
A commit references this bug: Author: jhb Date: Thu Jan 21 01:25:28 UTC 2016 New revision: 294480 URL: https://svnweb.freebsd.org/changeset/base/294480 Log: MFC 292682: Fix remaining direct tests of the carry flag in the v86 %eflags via a magic number to use V86_CY() instead. These should have been fixed as part of the cleanup in r226746 but were missed. The md5 sums of the object files were unchanged, so there should be no functional change. PR: 205424 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com> Changes: _U stable/10/ stable/10/sys/boot/i386/zfsboot/zfsboot.c stable/10/sys/boot/pc98/boot2/boot2.c stable/10/sys/boot/pc98/libpc98/biosdisk.c