From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 1 21:09:45 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C407F1065679 for ; Wed, 1 Dec 2010 21:09:45 +0000 (UTC) (envelope-from darmawan_salihun@yahoo.com) Received: from web76807.mail.sg1.yahoo.com (web76807.mail.sg1.yahoo.com [124.108.123.111]) by mx1.freebsd.org (Postfix) with SMTP id 8D3158FC22 for ; Wed, 1 Dec 2010 21:09:44 +0000 (UTC) Received: (qmail 57398 invoked by uid 60001); 1 Dec 2010 21:09:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1291237782; bh=TTbo+MBTmjAbnu/5pazZMBgK27okNak/69fdHL6kRUE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=0Vk7p7LgG/3//YwnVe5bSDybA9tORRAMPvujbM4JLNJYSxgqBR/6rEuWkiXn2ZdLSSAyPIGz8S2LrxqmeaxSdM2MABbu+PcQNmFtYBQWKhkBpxn2STXY2RddMTn/tdJqkInCmW4ZKdf2fEt33abk2mnt5GQYaruZAOFoXLLg9tE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=4KrlPbpxjEMsfwK6WpEvoyfvE7NS1BRUn/YbK3YS/jbCYSLUO2jTJ7q9hYT/JbaN76sMGbBZNb8ZCVzD8xjRdiNKeVYxCiIbkqB3fMo9HVjEOZWrq3fkrZVeUFJs0V9tW6IHIHWe2GiW/k5DeQcHYLuesy1fgSINjf7Rb4NDVks=; Message-ID: <948728.57388.qm@web76807.mail.sg1.yahoo.com> X-YMail-OSG: BvA3K34VM1mzTCbAtIvqfyLcYlFVGbgCRWgBtWhAsgiCrDX zWEoBBRM4pn_qS49TqAC6msyvbyTNvf0wauzy2.B4zm7XWNixhT_wZXxfjMP ZuYM4pgfpgbHdZrOvm_k4Kl2vflRsMGHHJcAEYFHc2QixCAbhmQnlwOnaJtu FsIVvCK1GeYk7J9rPWCcWaI4iCGySg4DbY8lZfdzZqSUxfQb.pkvNtuUL.G4 n3E_sWPxqehBSLVF4nGSTJuT3vlhd5DYazThPROVPYjmtL1.glu0jcwGFGEx 0V9MbYgqddVgWdXggoHIbTLiy_UY53TPqSIHU5D.tiJbXFXyA.eahXY9Msz_ OLEAwqUtxXxcyOR5f1A-- Received: from [114.59.203.215] by web76807.mail.sg1.yahoo.com via HTTP; Thu, 02 Dec 2010 05:09:42 SGT X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Thu, 2 Dec 2010 05:09:42 +0800 (SGT) From: Darmawan Salihun To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1956726521-1291237782=:57388" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: How to debug BTX loader? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2010 21:09:45 -0000 --0-1956726521-1291237782=:57388 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi John, =0A=0A--- On Tue, 11/30/10, John Baldwin wrote:= =0A=0A> From: John Baldwin =0A> Subject: Re: How to debug = BTX loader?=0A> To: freebsd-hackers@freebsd.org=0A> Cc: "Darmawan Salihun" = =0A> Date: Tuesday, November 30, 2010, 9:38 AM= =0A> On Monday, November 29, 2010 1:01:27=0A> pm Darmawan Salihun wrote:=0A= > > Hi guys, =0A> > =0A> > I'm currently working on a BIOS for a custom Sin= gle=0A> Board Computer (SBC). =0A> > I have the required BIOS source code a= nd tools at=0A> hand. =0A> > However, the boot process always stuck in the = BTX=0A> loader =0A> > (the infamous "ACPI autoload failed") when I booted= =0A> out of USB stick =0A> > (with the FreeBSD 8.1 USB stick image). =0A> >= =0A> > I could get the system to boot into FreeBSD 8.1 =0A> > (by keeping = the CDROM tray open and close it when the=0A> board looks for =0A> > boot d= evice, otherwise BTX will reboot instantly). =0A> =0A> Are you getting an a= ctual BTX error message or a=0A> freeze?=A0 BTX is just a =0A> minikernel w= ritten all in assembly.=A0 It doesn't handle=0A> loading the kernel, =0A> e= tc.=A0 All that work is done by the /boot/loader=0A> program (which is writ= ten in =0A> C).=A0 You can find all the source to the boot code in=0A> src/= sys/boot.=A0 The BTX =0A> kernel is in src/sys/boot/i386/btx/btx/.=0A> =0A>= However, to debug this further we would need more info such=0A> as what ex= actly =0A> you are seeing (a hang, a BTX fault with a register dump,=0A> et= c.).=0A=0AOne of the BTX fault shows the register dump in the attachment. = =0AI hope this could help. Anyway, If I were to try to interpret =0Asuch re= gister dump, where should I start? I understand x86/x86_64 =0Aassembly pret= ty much, but I'm not quite well versed with the =0AFreeBSD code using it. = =0A=0AThanks, =0A=0ADarmawan=0A=0A> =0A> -- =0A> John Baldwin=0A>=0A=0A=0A = --0-1956726521-1291237782=:57388--