From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 4 16:33:50 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA9A7DD3; Thu, 4 Sep 2014 16:33:50 +0000 (UTC) Received: from mon-colo.panasas.com (mon-colo.panasas.com [209.166.131.137]) by mx1.freebsd.org (Postfix) with ESMTP id 69724126E; Thu, 4 Sep 2014 16:33:50 +0000 (UTC) Received: from seabiscuit.panasas.com ([172.17.132.204]) by mon-colo.panasas.com with Microsoft SMTPSVC(7.0.6001.18000); Thu, 4 Sep 2014 12:33:48 -0400 Received: from SEABISCUIT.int.panasas.com ([172.17.132.204]) by seabiscuit ([172.17.132.204]) with mapi id 14.03.0181.006; Thu, 4 Sep 2014 09:33:47 -0700 From: "Sinha, Prokash" To: John Baldwin Subject: Re: PXE boot Thread-Topic: PXE boot Thread-Index: AQHPx7q2tjxfRdxxqUWbg0sIKzb+LpvwCpsAgAF8gAD//6TLgIAAAKKA Date: Thu, 4 Sep 2014 16:33:46 +0000 Message-ID: References: <1641492.zXWdUoX4Sh@ralph.baldwin.cx> <8193889.CqHK0JhjBu@ralph.baldwin.cx> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.17.133.204] Content-Type: text/plain; charset="iso-8859-2" Content-ID: <11204A09430C77439EB160232C140BD7@panasas.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 04 Sep 2014 16:33:48.0460 (UTC) FILETIME=[00E62EC0:01CFC85E] Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:33:50 -0000 On 9/4/14 9:31 AM, "Sinha, Prokash" wrote: >Thanks once again... > >This is the part - that you spelled out is why I had a trace in the >pxe_enable(...) routine. As well as at pxe_init( ...) routine, just to be >sure >the pxe.c routines are working like ( as you said ) devsw invocation. But >did not see the trace messages, could be serial console is not acting ( >though I doubt it). > >Now gave me a base, off of what I could debug ... > >-prokash > >On 9/4/14 7:57 AM, "John Baldwin" wrote: > >>On Wednesday, September 03, 2014 11:16:05 PM Sinha, Prokash wrote: >>> Thanks much, John ! >>>=20 >>> When it starts executing ? How ?. Who starts executing these. From the >>> Makefile it's org is 0x7c00. So I would assume that it would be loaded >>>at >>> that absolute real-mode address !. I don't understand this part. But, >>>if I >>> put traces, I see pxe_open, and pxe_close are being called, but after >>>all >>> these pxe_calls are done, the loader's main is invoked at Rebooting =A9 >>>time. >>>=20 >>> We are using a net boot server, and I see mountd- authenticated =A9 >>>message >>> storm on the boot server side. >>>=20 >>> Wondering what could cause such a message storm, while pxe_open() -> >>>net >>> if_open( ) executes. >> >>The PXE BIOS uses TFTP to fetch the pxeboot binary (and it will do its >>own=20 >>DHCP, etc. as part of doing that). It writes the binary it downloads >>starting=20 >>at address 0x7c00. Once the download is complete, it jumps to 0x7c00 >>similar=20 >>to how booting from a disk loads the first sector at address 0x7c00 and >>then=20 >>jumps to it. >> >>The PXE calls in libi386 should not be invoked until the loader main() >>routine=20 >>runs: >> >> /* >> * Special handling for PXE and CD booting. >> */ >> if (kargs->bootinfo =3D=3D 0) { >> /* >> * We only want the PXE disk to try to init itself in the below >> * walk through devsw if we actually booted off of PXE. >> */ >> if (kargs->bootflags & KARGS_FLAGS_PXE) >> pxe_enable(kargs->pxeinfo ? PTOV(kargs->pxeinfo) : NULL); >> else if (kargs->bootflags & KARGS_FLAGS_CD) >> bc_add(initial_bootdev); >> } >> >>That enables the PXE devsw driver so that it will do something later when >>main() calls all the devsw init routines: >> >> /* >> * March through the device switch probing for things. >> */ >> for (i =3D 0; devsw[i] !=3D NULL; i++) >> if (devsw[i]->dv_init !=3D NULL) >> (devsw[i]->dv_init)(); >> printf("BIOS %dkB/%dkB available memory\n", bios_basemem / 1024, >>bios_extmem / 1024); >> >>--=20 >>John Baldwin >