From owner-freebsd-amd64@FreeBSD.ORG Mon Oct 7 16:20:03 2013 Return-Path: Delivered-To: freebsd-amd64@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3FC12D3 for ; Mon, 7 Oct 2013 16:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DDE52ECD for ; Mon, 7 Oct 2013 16:20:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r97GK2cX075785 for ; Mon, 7 Oct 2013 16:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r97GK2id075784; Mon, 7 Oct 2013 16:20:02 GMT (envelope-from gnats) Date: Mon, 7 Oct 2013 16:20:02 GMT Message-Id: <201310071620.r97GK2id075784@freefall.freebsd.org> To: freebsd-amd64@FreeBSD.org Cc: From: John Baldwin Subject: Re: amd64/182740: BTX halted on Jetway NF81 motherboard when RAID is enabled X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: John Baldwin List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Oct 2013 16:20:03 -0000 The following reply was made to PR amd64/182740; it has been noted by GNATS. From: John Baldwin To: freebsd-amd64@freebsd.org Cc: Julian Pidancet , freebsd-gnats-submit@freebsd.org Subject: Re: amd64/182740: BTX halted on Jetway NF81 motherboard when RAID is enabled Date: Mon, 7 Oct 2013 11:47:32 -0400 On Sunday, October 06, 2013 7:28:31 am Julian Pidancet wrote: > > >Number: 182740 > >Category: amd64 > >Synopsis: BTX halted on Jetway NF81 motherboard when RAID is enabled > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-amd64 > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Oct 06 11:30:00 UTC 2013 > >Closed-Date: > >Last-Modified: > >Originator: Julian Pidancet > >Release: 8.2 > >Organization: > >Environment: > >Description: > Just got this brand new motherboard with an AMD APU and an AMD chipset. > > Whenever I try to boot FreeBSD and AHCI or RAID is enabled in the BIOS, I am getting this message: > > BTX loader 1.00 BTX version is 1.02 > int=0000000a err=00000000 efl=00006402 eip=000093e0 > eax=534d4150 ebx=00000001 ecx=00000014 edx=534d4150 > esi=00000000 edi=00000004 ebp=00000000 esp=0000004e > cs=0008 ds=0033 es=0033 fs=0033 gs=0033 ss=0010 > cs:eip=cf 83 f8 01 75 1a 16 87-86 1f 1e 0f a1 0f a0 0f > a9 b8 00 a0 00 00 03 44-24 0c 8d 60 04 58 ff d0 > ss:esp=00 f0 39 e7 00 f0 e3 21-80 ce 2e e8 00 f0 d2 ef > 00 f0 00 e0 00 f0 f2 e6-00 f0 6e fe 00 f0 53 ff > BTX halted > > It looks like to me the BTX is taking an "Invalid TSS" exception while executing an iret instruction. > >How-To-Repeat: > I tried: - Booting from the install cdrom > - Booting from an USB install disk > - Booting from boot/pxeboot in PXE mode > > All exhibit the same issue. > >Fix: > Selecting "Legacy IDE" mode in the BIOS configuration instead of AHCI/RAID. Ok, can you take this patch and use it to build an updated pxeboot and test if it fixes disk access with AHCI enabled? Index: boot/i386/btx/btx/btx.S =================================================================== --- boot/i386/btx/btx/btx.S (revision 247010) +++ boot/i386/btx/btx/btx.S (working copy) @@ -41,6 +41,8 @@ .set PSL_RESERVED_DEFAULT,0x00000002 .set PSL_T,0x00000100 # Trap flag .set PSL_I,0x00000200 # Interrupt enable flag + .set PSL_D,0x00000400 # String instruction direction + .set PSL_NT,0x00004000 # Nested task flag .set PSL_VM,0x00020000 # Virtual 8086 mode flag .set PSL_AC,0x00040000 # Alignment check flag /* @@ -611,8 +613,8 @@ pushl %ds # regs pushl %es pushfl # Save %eflags - cli # Disable interrupts - std # String ops dec + pushl $PSL_RESERVED_DEFAULT|PSL_D # Use clean %eflags with + popfl # string ops dec xorw %ax,%ax # Reset seg movw %ax,%ds # regs movw %ax,%es # (%ss is already 0) @@ -675,6 +677,7 @@ testl $V86F_FLAGS,%edx # User wants flags? jz rret_tramp.3 # No movl MEM_ESPR-0x3c,%eax # Read real mode flags + andl $~(PSL_T|PSL_NT),%eax # Clear unsafe flags movw %ax,-0x08(%esi) # Update user flags (low 16) /* * Return to the user task -- John Baldwin