NetBSD Problem Report #49725

From www@NetBSD.org  Fri Mar  6 03:05:23 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B0DE0A6552
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  6 Mar 2015 03:05:23 +0000 (UTC)
Message-Id: <20150306030520.AF17AA6562@mollari.NetBSD.org>
Date: Fri,  6 Mar 2015 03:05:20 +0000 (UTC)
From: jdbaker@mylinuxisp.com
Reply-To: jdbaker@mylinuxisp.com
To: gnats-bugs@NetBSD.org
Subject: pxeboot_ia32.bin built with amd64 toolchain crashes on some i386 CPUs
X-Send-Pr-Version: www-1.0

>Number:         49725
>Category:       port-i386
>Synopsis:       pxeboot_ia32.bin built with amd64 toolchain crashes on some i386 CPUs
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    martin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 06 03:10:01 +0000 2015
>Closed-Date:    Wed Aug 03 05:20:47 +0000 2016
>Last-Modified:  Wed Aug 03 05:20:47 +0000 2016
>Originator:     John D. Baker
>Release:        NetBSD/amd64-7.99.5
>Organization:
>Environment:
NetBSD net4501d.technoskunk.fur 7.0_BETA NetBSD 7.0_BETA (NET4501) #7: Thu Feb 26 17:26:53 CST 2015  sysop@skuld.technoskunk.fur:/d0/build/netbsd-7/obj/i386/sys/arch/i386/compile/NET4501 i386

NetBSD neoware 7.99.5 NetBSD 7.99.5 (NEOWARE) #6: Tue Mar  3 18:59:50 CST 2015  sysop@skuld.technoskunk.fur:/d0/build/current/obj/i386/sys/arch/i386/compile/NEOWARE i386

>Description:
On some i386-class systems such as Soekris net4501 with:

$ cpuctl identify 0                 
cpu0: highest basic info 00000001
cpu0: AMD Am5x86 W/B 133/160 (486-class)
cpu0: family 0x4 model 0xf stepping 0x4 (id 0x4f4)
cpu0: features 0x1<FPU>
cpu0: Initial APIC ID 0

and NeoWare thin client with:

$ cpuctl identify 0
cpu0: highest basic info 00000001
cpu0: highest extended info 80000006
cpu0: "VIA Samuel 2"
cpu0: VIA C3 Samuel 2/Ezra (686-class), 400.04 MHz
cpu0: family 0x6 model 0x7 stepping 0x3 (id 0x673)
cpu0: features 0x803035<FPU,DE,TSC,MSR,MTRR,PGE,MMX>
cpu0: features2 0x80803035<3DNOW>
cpu0: I-cache 64KB 32B/line 4-way, D-cache 64KB 32B/line 4-way
cpu0: L2 cache 64KB 32B/line 4-way
cpu0: ITLB 128 4KB entries 8-way
cpu0: DTLB 128 4KB entries 8-way
cpu0: Initial APIC ID 0

Using "pxeboot_ia32.bin" built with the amd64 toolchain crashes and
reboots the client system immediately.

>How-To-Repeat:
Attempt to boot real i[45]86 or some 686-class systems using
pxeboot_ia32.bin from amd64 release.
>Fix:
Workaround:  Always use pxeboot_ia32.bin from i386 build in mixed
i386/amd64 diskless environment.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: toolchain-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Fri, 06 Mar 2015 07:57:01 +0000
Responsible-Changed-Why:
take


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: jdbaker@mylinuxisp.com
Subject: Re: port-i386/49725 (pxeboot_ia32.bin built with amd64 toolchain crashes on some i386 CPUs)
Date: Fri, 6 Mar 2015 08:58:52 +0100

 Can you test if the patch below fixes it? I can provide a amd64-built binary,
 contact me off-list if you need that.

 Martin


 Index: Makefile.booters
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/stand/Makefile.booters,v
 retrieving revision 1.89
 diff -u -r1.89 Makefile.booters
 --- Makefile.booters	12 Jan 2014 15:26:29 -0000	1.89
 +++ Makefile.booters	6 Mar 2015 07:55:52 -0000
 @@ -14,7 +14,7 @@
  # Make sure we override any optimization options specified by the
  # user.
  .if ${MACHINE_ARCH} == "x86_64"
 -CPUFLAGS= -m32
 +CPUFLAGS= -m32 -march=i386 -mtune=i386
  .else
  CPUFLAGS=  -march=i386 -mtune=i386
  .endif

From: "John D. Baker" <jdbaker@mylinuxisp.com>
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-i386/49725 (pxeboot_ia32.bin built with amd64 toolchain
 crashes on some i386 CPUs)
Date: Fri, 6 Mar 2015 13:01:40 -0600 (CST)

 On Fri, 6 Mar 2015, Martin Husemann wrote:

 > Can you test if the patch below fixes it? I can provide a amd64-built binary,

 Yes, this produces a pxeboot_ia32.bin binary from amd64 toolchain that
 runs properly on the aforementioned problem machines.

 Thanks!

 -- 
 |/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
 |\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
 | X  No HTML/proprietary data in email.   BSD just sits there and works!
 |/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49725 CVS commit: src/sys/arch/i386/stand
Date: Sun, 8 Mar 2015 19:47:17 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Mar  8 19:47:17 UTC 2015

 Modified Files:
 	src/sys/arch/i386/stand: Makefile.booters

 Log Message:
 Compile the booblocks for i386 CPUs, even when the main target architecture
 is amd64.
 Fixes PR port-i386/49725.


 To generate a diff of this commit:
 cvs rdiff -u -r1.89 -r1.90 src/sys/arch/i386/stand/Makefile.booters

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49725 CVS commit: [netbsd-7] src/sys/arch/i386/stand
Date: Mon, 9 Mar 2015 09:07:58 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Mon Mar  9 09:07:58 UTC 2015

 Modified Files:
 	src/sys/arch/i386/stand [netbsd-7]: Makefile.booters

 Log Message:
 Pull up following revision(s) (requested by martin in ticket #579):
 	sys/arch/i386/stand/Makefile.booters: revision 1.90
 Compile the booblocks for i386 CPUs, even when the main target architecture
 is amd64.
 Fixes PR port-i386/49725.


 To generate a diff of this commit:
 cvs rdiff -u -r1.89 -r1.89.4.1 src/sys/arch/i386/stand/Makefile.booters

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Wed, 03 Aug 2016 05:20:47 +0000
State-Changed-Why:
fixed and pulled up more than a year ago


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.