PXE boot
John Baldwin
jhb at freebsd.org
Wed Sep 3 21:04:52 UTC 2014
On Wednesday, September 03, 2014 04:12:01 PM Sinha, Prokash wrote:
> Hi All,
>
> I'm trying to understand the invocation of the routines pxe_init();
> pxe_open() etc. in pxe.c
>
> By the structure, it looks like a driver with devsw_pxedisk = { entry points
> …}
>
> Once this pxeldr is brought down from the net boot server, how does it get
> invoked ( or rather who calls these routines ) ??? The loader ( strapped
> with it don't seem to call).
>
> I assume that the the boot code in the NVRAM ( or wherever ) of the NIC that
> supports calls these pxe_* () functions ???
pxeboot is pxeldr + /boot/loader. The firmware (BIOS or EFI) downloads the
pxeboot binary to a known fixed address and starts executing it. When it
starts executing, pxeldr finds the /boot/loader binary "behind" it and
arranges for it to run. It passes a flag telling it that it was booted via
PXE. The loader then uses the routines in pxe.c to talk to firmware on the
NIC. The firmware provides both TFTP and UDP interfaces. The loader uses
those to provide either a TFTP "filesystem" or to mount an NFS filesystem over
UDP.
--
John Baldwin
More information about the freebsd-hackers
mailing list