Bug 1282890

Summary: The tlbie instruction has a different format from power7 onwards
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: openbiosAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dan, dhowells, jforbes, laurent, pbonzini, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-05 19:38:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log of failed 'fedpkg local'
none
Log of working 'fedpkg local' none

Description Cole Robinson 2015-11-17 18:03:35 UTC
Building the openbios package fails with cross-gcc 5.2* and binutils 2.25.1*. I noticed this on f23 originally where 5.2 is in the stable repo, but also reproduced on f22.

Packages that work fine on f22:
  binutils-powerpc64-linux-gnu.x86_64 2.25-4.fc22                               
  binutils-sparc64-linux-gnu.x86_64 2.25-4.fc22                                 
  cross-binutils-common.noarch 2.25-4.fc22                                      
  cross-gcc-common.noarch 5.1.1-3.fc22                                          
  gcc-powerpc64-linux-gnu.x86_64 5.1.1-3.fc22                                   
  gcc-sparc64-linux-gnu.x86_64 5.1.1-3.fc22

Packages that fail on f22 (from updates-testing):
  binutils-powerpc64-linux-gnu.x86_64 2.25.1-1.fc22                             
  binutils-sparc64-linux-gnu.x86_64 2.25.1-1.fc22                               
  cross-binutils-common.noarch 2.25.1-1.fc22                                    
  cross-gcc-common.noarch 5.2.1-3.fc22                                          
  gcc-powerpc64-linux-gnu.x86_64 5.2.1-3.fc22                                   
  gcc-sparc64-linux-gnu.x86_64 5.2.1-3.fc22


Steps to reproduce:
  fedpkg co --anonymous openbios
  cd openbios
  fedpkg local

Comment 1 Cole Robinson 2015-11-17 18:04:22 UTC
Created attachment 1095579 [details]
Log of failed 'fedpkg local'

Comment 2 Cole Robinson 2015-11-17 18:04:43 UTC
Created attachment 1095580 [details]
Log of working 'fedpkg local'

Comment 3 David Howells 2015-11-19 11:21:40 UTC
The tlbie instruction has a second argument from power7 onwards.  The bug is in the openbios code, not the assembler.

	.machine power7
	.text
	.align 2
	tlbie 28

fails, but:

	.machine power7
	.text
	.align 2
	tlbie 28,0

works.

Comment 4 David Howells 2015-11-19 11:24:49 UTC
Note that gcc should be given an explicit power setting rather than relying on the default.  gcc gives -mpower7 to the assembler without any instruction to the contrary.

Comment 5 Cole Robinson 2015-11-21 02:04:13 UTC
Thanks David, I brought it up on the openbios mailing list

Comment 6 Laurent Vivier 2015-11-21 16:31:55 UTC
I've proposed a fix:

http://www.openfirmware.info/pipermail/openbios/2015-November/008878.html

Comment 7 Cole Robinson 2016-02-05 18:57:56 UTC
Fix is upstream now:

commit 56f5de9b6177f1451e864efe45f7d121555d5608
Author: mcayland <mcayland@f158a5a8-5612-0410-a976-696ce0be7e32>
Date:   Wed Feb 3 20:46:31 2016 +0000

    ppc: force target cpu
    
    With gcc-5.2 default target is power7.
    
    - For 32-bit PPC builds set the target cpu to 604 in order to support PReP as
      well as Macs in the future.
    
    - For 64-bit PPC builds set the target cpu to 970 as used in 64-bit Macs but
      disable altivec.
    
    Based on an original patch by Laurent Vivier <laurent>.
    
    Signed-off-by: Mark Cave-Ayland <mark.cave-ayland.uk>
    
    git-svn-id: svn://openbios.org/openbios/trunk/openbios-devel@1378 f158a5a8-5612-0410-a976-696ce0be7e32

Comment 8 Cole Robinson 2016-02-05 19:38:14 UTC
Fix built for rawhide now