From owner-svn-src-all@freebsd.org Thu Jan 21 01:25:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9045A8A247; Thu, 21 Jan 2016 01:25:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2CAD18B8; Thu, 21 Jan 2016 01:25:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0L1PSF3005707; Thu, 21 Jan 2016 01:25:28 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0L1PSG5005703; Thu, 21 Jan 2016 01:25:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201601210125.u0L1PSG5005703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 21 Jan 2016 01:25:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294480 - in stable/10/sys/boot: i386/zfsboot pc98/boot2 pc98/libpc98 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jan 2016 01:25:30 -0000 Author: jhb Date: Thu Jan 21 01:25:28 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 Modified: stable/10/sys/boot/i386/zfsboot/zfsboot.c stable/10/sys/boot/pc98/boot2/boot2.c stable/10/sys/boot/pc98/libpc98/biosdisk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- stable/10/sys/boot/i386/zfsboot/zfsboot.c Thu Jan 21 01:15:40 2016 (r294479) +++ stable/10/sys/boot/i386/zfsboot/zfsboot.c Thu Jan 21 01:25:28 2016 (r294480) @@ -238,7 +238,7 @@ bios_getmem(void) v86.es = VTOPSEG(&smap); v86.edi = VTOPOFF(&smap); v86int(); - if ((v86.efl & 1) || (v86.eax != SMAP_SIG)) + if (V86_CY(v86.efl) || (v86.eax != SMAP_SIG)) break; /* look for a low-memory segment that's large enough */ if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0) && @@ -285,7 +285,7 @@ bios_getmem(void) v86.addr = 0x15; /* int 0x15 function 0xe801*/ v86.eax = 0xe801; v86int(); - if (!(v86.efl & 1)) { + if (!V86_CY(v86.efl)) { bios_extmem = ((v86.ecx & 0xffff) + ((v86.edx & 0xffff) * 64)) * 1024; } } @@ -320,7 +320,7 @@ int13probe(int drive) v86.edx = drive; v86int(); - if (!(v86.efl & 0x1) && /* carry clear */ + if (!V86_CY(v86.efl) && /* carry clear */ ((v86.edx & 0xff) != (drive & DRV_MASK))) { /* unit # OK */ if ((v86.ecx & 0x3f) == 0) { /* absurd sector size */ return(0); /* skip device */ Modified: stable/10/sys/boot/pc98/boot2/boot2.c ============================================================================== --- stable/10/sys/boot/pc98/boot2/boot2.c Thu Jan 21 01:15:40 2016 (r294479) +++ stable/10/sys/boot/pc98/boot2/boot2.c Thu Jan 21 01:25:28 2016 (r294480) @@ -326,7 +326,7 @@ bd_getbigeom(int bunit) v86.addr = 0x1b; v86.eax = 0x8400 | unit; v86int(); - if (v86.efl & 0x1) + if (V86_CY(v86.efl)) return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff); } Modified: stable/10/sys/boot/pc98/libpc98/biosdisk.c ============================================================================== --- stable/10/sys/boot/pc98/libpc98/biosdisk.c Thu Jan 21 01:15:40 2016 (r294479) +++ stable/10/sys/boot/pc98/libpc98/biosdisk.c Thu Jan 21 01:25:28 2016 (r294480) @@ -824,7 +824,7 @@ bd_chs_io(struct open_disk *od, daddr_t v86.es = VTOPSEG(dest); v86.ebp = VTOPOFF(dest); v86int(); - return (v86.efl & 0x1); + return (V86_CY(v86.efl)); } static int @@ -959,7 +959,7 @@ bd_getgeom(struct open_disk *od) od->od_cyl = v86.ecx; od->od_hds = (v86.edx >> 8) & 0xff; od->od_sec = v86.edx & 0xff; - if (v86.efl & 0x1) + if (V86_CY(v86.efl)) return(1); } @@ -1010,7 +1010,7 @@ bd_getbigeom(int bunit) v86.addr = 0x1b; v86.eax = 0x8400 | unit; v86int(); - if (v86.efl & 0x1) + if (V86_CY(v86.efl)) return 0x4F020F; /* 1200KB FD C:80 H:2 S:15 */ return ((v86.ecx & 0xffff) << 16) | (v86.edx & 0xffff); }