From owner-freebsd-embedded@FreeBSD.ORG Fri Jul 28 16:36:59 2006 Return-Path: X-Original-To: freebsd-embedded@freebsd.org Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D694816A504 for ; Fri, 28 Jul 2006 16:36:59 +0000 (UTC) (envelope-from john@baldwin.cx) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C2AB43D49 for ; Fri, 28 Jul 2006 16:36:58 +0000 (GMT) (envelope-from john@baldwin.cx) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6SGasQn087324; Fri, 28 Jul 2006 12:36:54 -0400 (EDT) (envelope-from john@baldwin.cx) From: John Baldwin To: freebsd-embedded@freebsd.org Date: Fri, 28 Jul 2006 12:36:54 -0400 User-Agent: KMail/1.9.1 References: <856cdecb0607270534m34d9b4e3g4ee2714e18fcaeb7@mail.gmail.com> <20060728152206.GA29095@webgroup.ch> In-Reply-To: <20060728152206.GA29095@webgroup.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607281236.54468.john@baldwin.cx> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Fri, 28 Jul 2006 12:36:55 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1624/Thu Jul 27 13:11:25 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: Adrian Steinmann , Steven McCoy Subject: Re: pxeboot PC Engines WRAP X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 16:37:00 -0000 On Friday 28 July 2006 11:22, Adrian Steinmann wrote: > On Thu, Jul 27, 2006 at 08:34:36PM +0800, Steven McCoy wrote: > > I (and others) have tried a lot, it just doesn't work because FreeBSD > BTX does strange things. > > > 1) Etherboot to Etherboot to pxeboot > > > > pxeboot hangs after loading: > > > > Searching for server (DHCP)...\ > > Me: 10.0.0.160, DHCP: 10.0.0.183, TFTP: 10.0.0.183 > > Trimming .zpxe extension > > Loading 10.0.0.183:eb-5.4.2-natsemi (PXE)done > > PXE Loader 1.00 > > > > Building the boot loader arguments > > Relocating the loader and the BTX > > Starting the BTX loader > You have to make sure you choose an etherboot which has a bug fixed for > FreeBSD tftp: if the pxeboot file is a multiple of 512 it will hang > otherwise (instead of changing etherboot, you can just add a random > byte to the pxeboot file). > > > 2) Etherboot to Etherboot to uncompressed kernel > > > > Control mysteriously returns to the PXE firmware after loading the kernel: > This may be (silent) general protection fault which occurs once you get > that far in pxeboot: > > this is for dbsd and BTX_VERBOSE, BTXLDR_VERBOSE, PXE_DEBUG and other options: > > PXE version 2.1, real mode entry point @9f40:0680 > > int=0000000d err=00000000 efl=00030002 eip=00000916 > eax=0009cfb0 ebx=000008eb ecx=00000000 edx=00003c58 > esi=00000000 edi=00000000 ebp=0009d37a esp=000003ca > cs=9f40 ds=9f40 es=0000 fs=0000 gs=0000 ss=9cfb > cs:eip=66 0f 01 97 52 00 0f 20-c0 0c 01 0f 22 c0 66 ff > af 6a 00 66 b8 10 00 8e-d0 89 ec 8e d8 8e c0 8e > ss:esp=00 00 00 00 71 00 00 00-00 00 00 00 e2 fa 09 00 > 40 9f fb 9c 00 00 00 00-00 00 00 00 00 00 02 02 > BTX halted > > which is identical, byte for byte, to the fbsd error, except > for esp which has 40 9f f9 9c instead of 40 9f fb 9c. > > something is going wrong in the VM86 of the bangpxe calls. This is because the BIOS you are talking to here is trying to enter protected mode on its own, which simply does not play well with VM86 at all. It's not something you are going to "fix" in VM86 unless you change BTX drastically to pop back into real mode to call the BIOS and handle IRQs rather than using vm86 mode. 00000000 660F01975200 o32 lgdt [bx+0x52] 00000006 0F20C0 mov eax,cr0 00000009 0C01 or al,0x1 0000000B 0F22C0 mov cr0,eax 0000000E 66FFAF6A00 jmp dword far [bx+0x6a] 00000013 66B810008ED0 mov eax,0xd08e0010 00000019 89EC mov sp,bp 0000001B 8ED8 mov ds,ax 0000001D 8EC0 mov es,ax 0000001F 8E db 0x8E -- John Baldwin