From owner-freebsd-ppc@freebsd.org Fri May 10 23:29:29 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB9DE158BD92 for ; Fri, 10 May 2019 23:29:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 53E148FDCF for ; Fri, 10 May 2019 23:29:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 14C25158BD91; Fri, 10 May 2019 23:29:29 +0000 (UTC) Delivered-To: ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2FC7158BD90 for ; Fri, 10 May 2019 23:29:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D9CA8FDCD for ; Fri, 10 May 2019 23:29:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 8D97E6F26 for ; Fri, 10 May 2019 23:29:27 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x4ANTRF5053598 for ; Fri, 10 May 2019 23:29:27 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x4ANTRh4053596 for ppc@FreeBSD.org; Fri, 10 May 2019 23:29:27 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ppc@FreeBSD.org Subject: [Bug 233863] Various PowerMac G5 models may require kern.smp.disabled=1 and must set usefdt=1 which causes net interface reorder Date: Fri, 10 May 2019 23:29:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ppc@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 May 2019 23:29:30 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233863 --- Comment #39 from Mark Millard --- (In reply to Mark Millard from comment #38) I forgot to warn that head -r347463 without any patching has world messed up for older powerpc64 processors like the 970 family: it is using the newer instruction cmpb in its strcmp implementation in libc. I dealt with this issue with a patch that avoids cmpb: (not appropriate or required for head -r345758 were the previouosly-attached patches are targeted) # svnlite diff /mnt/usr/src/ Index: /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S (revision 347463) +++ /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S (working copy) @@ -88,9 +88,16 @@ .Lstrcmp_compare_by_word: ld %r5,0(%r3) /* Load double words. */ ld %r6,0(%r4) - xor %r8,%r8,%r8 /* %r8 <- Zero. */ + lis %r8,32639 /* 0x7f7f */ + ori %r8,%r8,32639 /* 0x7f7f7f7f */ + rldimi %r8,%r8,32,0 /* 0x7f7f7f7f'7f7f7f7f */ xor %r0,%r5,%r6 /* Check if double words are different. */ - cmpb %r7,%r5,%r8 /* Check if double words contain zero. */ + /* Check for zero vs. not bytes: */ + and %r9,%r5,%r8 /* 0x00->0x00, 0x80->0x00, other->ms-bit-in-byte=3D=3D0 */ + add %r9,%r9,%r8 /* ->0x7f, ->0x7f,=20=20=20=20=20 ->ms-bit-in-byte=3D=3D1 */ + nor %r7,%r9,%r5 /* ->0x80, ->0x00,=20=20=20=20=20 ->ms-bit-in-byte=3D=3D0 */ + andc %r7,%r7,%r8 /* ->0x80, ->0x00, ->0x00 */ + /* sort of like cmpb %r7,%r5,%r8 for %r8 be= ing zero */ /* * If double words are different or contain zero, @@ -104,7 +111,12 @@ ldu %r5,8(%r3) /* Load double words. */ ldu %r6,8(%r4) xor %r0,%r5,%r6 /* Check if double words are different. */ - cmpb %r7,%r5,%r8 /* Check if double words contain zero. */ + /* Check for zero vs. not bytes: */ + and %r9,%r5,%r8 /* 0x00->0x00, 0x80->0x00, other->ms-bit-in-byte=3D=3D0 */ + add %r9,%r9,%r8 /* ->0x7f, ->0x7f,=20=20=20=20=20 ->ms-bit-in-byte=3D=3D1 */ + nor %r7,%r9,%r5 /* ->0x80, ->0x00,=20=20=20=20=20 ->ms-bit-in-byte=3D=3D0 */ + andc %r7,%r7,%r8 /* ->0x80, ->0x00, ->0x00 */ + /* sort of like cmpb %r7,%r5,%r8 for %r8 be= ing zero */ /* * If double words are different or contain zero, --=20 You are receiving this mail because: You are the assignee for the bug.=