freebsd-dev/sys/boot/uboot/lib
Toomas Soome da8fb057e5 loader: network read rework
The current read from network is working from up to down - we have some
protocol needing the data from the network, so we build the buffer space
for that protocol, add the extra space for headers and pass this buffer
down to be filled by nif get call in hope, we have guessed the incoming
packet size right. Amazingly enough this approach mostly does work, but
not always...

So, this update does work from down to up - we allocate buffer (based
on MTU or frame size info), fill it up, and pass on for upper layers.
The obvious problem is that when we should free the buffer - if at all.

In the current implementation the upper layer will free the packet on error
or when the packet is no longer needed.

While working on the issue, the additional issue did pop up - the bios
implementation does not have generic get/put interface but is using pxe
udpsend/udpreceive instead. So the udp calls are gone and undi interface
is implemented instead. Which in turn means slight other changes as we
do not need to have duplicated pxe implementation and can just use dev_net.

To align packet content, the actual read from nic is using shifted buffer by
ETHER_ALIGN (2).

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D10232
2017-05-06 20:32:27 +00:00
..
api_public.h
console.c
copy.c Go back to using uintptr_t, because code that actually compiles is 2016-01-13 00:22:12 +00:00
devicename.c
disk.c loader: uboot disk ioctl should call disk_ioctl 2017-04-18 19:36:58 +00:00
elf_freebsd.c Remove extra 0x before %p format strings introduced by r296182 2016-07-08 22:32:03 +00:00
glue.c Remove extra 0x before %p format strings introduced by r296182 2016-07-08 22:32:03 +00:00
glue.h Improve U-Boot API detection 2016-03-09 11:45:48 +00:00
libuboot.h An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that. 2015-05-17 19:59:05 +00:00
Makefile Add more .NOMETA missed in r291320 2016-03-11 23:45:51 +00:00
module.c Print error message if autoload fails due to missing DTB blob, otherwise 2015-05-26 20:32:14 +00:00
net.c loader: network read rework 2017-05-06 20:32:27 +00:00
reboot.c
time.c The getsecs() function is implemented in platform- and bootfw-specific 2016-09-22 06:24:40 +00:00