History log of /haiku/src/system/boot/platform/pxe_ia32/network.cpp
Revision Date Author Comments
# b1ce138f 17-Sep-2021 Coldfirex <sakison@gmail.com>

PXE_ia32 Network: Fix Wformat-security

Change-Id: I926cdafa422f7544ff7a0fdcc9c5561759066a3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 1af695be 31-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e8dc2a9 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

[Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
to the kernel. Extended the mechanism so that any images not accepted
by the module code would later be tried to be added as drivers by the
devfs. This is a little hacky ATM, since the devfs manages the drivers
using a hash map keyed by the drivers inode ID, which those drivers
obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
doesn't implement the former (all old-style drivers), thus making it
possible to BFS, which uses the file cache which in turn requires
read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
more flexibly be extended and deals more gracefully with
arbitrarily-size data. The disk_identifier structure still exists,
though. It is added as message field in cases where needed (non net
boot). Moved the boot_drive_number field of the bios_ia32 platform
specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
initialization code into the stage 2 loader, which can now be loaded
directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
does no longer use the RemoteDisk protocol (it could actually be
removed from the boot loader). It also parses the DHCP options in the
DHCPACK packet provided by PXE and extracts the root path to be
mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
added support for network boot. In this case the net stack is
initialized and the network interface the boot loader used is brought
up and configured. Since NBD and RemoteDisk are our only options for
net boot (and those aren't really configurable dynamically) ATM, the
the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43792b9e 12-Jan-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

propagate required settings for the remote disk from boot loader to kernel (client-ip, server-ip, server-port)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec9d1637 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

fixed copy & paste bugs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 203cf324 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Disabled debug output, but show errors with dprintf.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99784f56 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

reduce debug output and add an additional test


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19636 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d92b426 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Use only the immediate buffer to send data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19635 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4a05ef0 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Determine client IP address and make it known to the ethernet interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19634 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c8286689 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Return -1 when no data is available in receive hook, and 0 to indicate a retry, to make the net stack happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19629 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57a88e1c 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Implemented UNDI ethernet interface, receiving frames already appears to work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d16d333 09-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

added ethernet interface framework, taken from openfirmware boot platform


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19453 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd241323 25-Oct-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

started the PXE UNDI network device support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19127 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1af695be013f7d9e57f8300ea89e1274c548f3e7 31-Jul-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32044 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e8dc2a9bbbe768acdfd224a6a4af01918bb4ce0 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

[Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
to the kernel. Extended the mechanism so that any images not accepted
by the module code would later be tried to be added as drivers by the
devfs. This is a little hacky ATM, since the devfs manages the drivers
using a hash map keyed by the drivers inode ID, which those drivers
obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
doesn't implement the former (all old-style drivers), thus making it
possible to BFS, which uses the file cache which in turn requires
read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
more flexibly be extended and deals more gracefully with
arbitrarily-size data. The disk_identifier structure still exists,
though. It is added as message field in cases where needed (non net
boot). Moved the boot_drive_number field of the bios_ia32 platform
specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
initialization code into the stage 2 loader, which can now be loaded
directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
does no longer use the RemoteDisk protocol (it could actually be
removed from the boot loader). It also parses the DHCP options in the
DHCPACK packet provided by PXE and extracts the root path to be
mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
added support for network boot. In this case the net stack is
initialized and the network interface the boot loader used is brought
up and configured. Since NBD and RemoteDisk are our only options for
net boot (and those aren't really configurable dynamically) ATM, the
the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43792b9eeda5ba6d5fc57b0779537681a022cfeb 12-Jan-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

propagate required settings for the remote disk from boot loader to kernel (client-ip, server-ip, server-port)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec9d1637b58489bfd4915a9a90a2c3c0c41569fb 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

fixed copy & paste bugs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19639 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 203cf32414abe11082100d6d8558b22ef262ccc4 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Disabled debug output, but show errors with dprintf.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19637 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 99784f5666802e07fa16e7ce32a6bdc2336450dd 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

reduce debug output and add an additional test


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19636 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6d92b426ae106353fdb085f72c270da5e24a5778 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Use only the immediate buffer to send data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19635 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4a05ef079c5557baf6a3eb1f0da903f27befd02 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Determine client IP address and make it known to the ethernet interface.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19634 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c828668959c2b1216797078c386fae8e8fda75f2 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Return -1 when no data is available in receive hook, and 0 to indicate a retry, to make the net stack happy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19629 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 57a88e1c7901098bae49139b4f1ffe76f807ac16 26-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

Implemented UNDI ethernet interface, receiving frames already appears to work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19628 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d16d3335d787754ab16343fde82f27e456b013f 09-Dec-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

added ethernet interface framework, taken from openfirmware boot platform


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19453 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd2413230f188adad068d984cfce9c9f29c6d0f8 25-Oct-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

started the PXE UNDI network device support


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19127 a95241bf-73f2-0310-859d-f6bbb57e9c96