History log of /src/stand/libofw/ofw_net.c (Results 1 – 25 of 29)
Revision Date Author Comments
# 4cddd20e 19-May-2024 Warner Losh <imp@FreeBSD.org>

loader/ofw: Style(9) pass over return statements

Make these consistent. Some files weren't even consistent with
themselves. Make them all either return <space> ( <value> ); or
return;

Sponsored by:

loader/ofw: Style(9) pass over return statements

Make these consistent. Some files weren't even consistent with
themselves. Make them all either return <space> ( <value> ); or
return;

Sponsored by: Netflix

show more ...


# 7c43148a 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

stand: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Rem

stand: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix

show more ...


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f9ce8da8 30-Nov-2022 Warner Losh <imp@FreeBSD.org>

stand/ofw: Refactor ofw parsedev

Both ofw_disk and ofw_net use the same parsedev routine, except for the
string passed in to match the ofw device node's type. Create a routine
to do that and connect

stand/ofw: Refactor ofw parsedev

Both ofw_disk and ofw_net use the same parsedev routine, except for the
string passed in to match the ofw device node's type. Create a routine
to do that and connect these two users up to that.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D37560

show more ...


# b8ff248f 30-Nov-2022 Warner Losh <imp@FreeBSD.org>

stand/ofw: Subclass devnet to cope with ofw's unique needs

We need to match devices in a slightly special way: We have to look up
the path and see if the device is a 'network' device in order to use

stand/ofw: Subclass devnet to cope with ofw's unique needs

We need to match devices in a slightly special way: We have to look up
the path and see if the device is a 'network' device in order to use it.

Sponsored by: Netflix
Tested by: grehan@ (with tweaks to my original patch)
Differential Revision: https://reviews.freebsd.org/D37557

show more ...


# 4c4563e3 29-Nov-2022 Warner Losh <imp@FreeBSD.org>

ofw_net: Use c99 initializers

Update to use c99 initializers, although there's no plans to change
anything that this would make easier...

Sponsored by: Netflix
Reviewed by: zlei
Differential Revi

ofw_net: Use c99 initializers

Update to use c99 initializers, although there's no plans to change
anything that this would make easier...

Sponsored by: Netflix
Reviewed by: zlei
Differential Revision: https://reviews.freebsd.org/D37442

show more ...


# 9f715656 27-Nov-2022 Warner Losh <imp@FreeBSD.org>

ofw: Remove old K&R function declaration

We don't need to forward declar strchr anymore.

Sponsored by: Netflix


# 272a882b 01-May-2020 Warner Losh <imp@FreeBSD.org>

Redo r360540 to retain the ifndef sparc code, not delete it.

Also undo the BROKEN stuff, since it was based on the same misreading.

Noticed by: Jens Schweikhardt


# 9053d5b7 01-May-2020 Warner Losh <imp@FreeBSD.org>

Remove more stray sparc64 ifdefs.

Also, dmabuf appears to only be set for sparc64 case, but there was a
comment at its only use that says it was broken for some apple
adapters. #ifdef it all of that

Remove more stray sparc64 ifdefs.

Also, dmabuf appears to only be set for sparc64 case, but there was a
comment at its only use that says it was broken for some apple
adapters. #ifdef it all of that out now that nothing sets it.

show more ...


# aaeffe5b 13-Jan-2020 Toomas Soome <tsoome@FreeBSD.org>

Backout 356693. The libsa malloc does provide necessary alignment and
memalign by 4 will reduce alignment for some platforms. Thanks for Ian for
pointing this out.


# 659bf32d 13-Jan-2020 Toomas Soome <tsoome@FreeBSD.org>

loader: allocate properly aligned buffer for network packet

Use memalign(4, size) to ensure we have properly aligned buffer.

MFC after: 2 weeks


# 475008d6 02-Jan-2020 Brandon Bergren <bdragon@FreeBSD.org>

Move stand/ofw/libofw to stand/libofw.

Since rS330365, there has been no particular reason for libofw to be in a
subdirectory of ofw. Move libofw up a level to make it fit in better with
the other t

Move stand/ofw/libofw to stand/libofw.

Since rS330365, there has been no particular reason for libofw to be in a
subdirectory of ofw. Move libofw up a level to make it fit in better with
the other top level libraries.

Also add a LIBOFWSRC to stand/defs.mk to match what all the other
libraries are doing.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D23000

show more ...


# ff7449d6 20-May-2019 Leandro Lupori <luporl@FreeBSD.org>

[PowerPC64] stand: fix build using clang 8 as compiler

This change fixes "stand" build issues when using clang 8
as compiler.

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: jhibbits

[PowerPC64] stand: fix build using clang 8 as compiler

This change fixes "stand" build issues when using clang 8
as compiler.

Submitted by: alfredo.junior_eldorado.org.br
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20026

show more ...


# ca987d46 14-Nov-2017 Warner Losh <imp@FreeBSD.org>

Move sys/boot to stand. Fix all references to new location

Sponsored by: Netflix


# da8fb057 06-May-2017 Toomas Soome <tsoome@FreeBSD.org>

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 th

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

show more ...


# b3608ae1 03-Jan-2012 Ed Schouten <ed@FreeBSD.org>

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revisi

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.

show more ...


# cb1b50fa 17-Nov-2010 Andreas Tobler <andreast@FreeBSD.org>

Move the declaration of the eh struct (used only when debugging is enabled)
from ofwn_put into the debug section.

Approved by: nwhitehorn (mentor)


# 51b1acac 29-Oct-2010 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Fix netboot on some Apple machines on which calling dma-free on the
network device can hang the machine. This causes the loss of 64 KB of
accessible memory on netbooted machines.


# aa785996 17-Jun-2007 Marius Strobl <marius@FreeBSD.org>

- Make better use of the global chosen, memory and mmu handles instead
of obtaining them over and over again and pretending we could do
anything useful without them (for chosen this includes addi

- Make better use of the global chosen, memory and mmu handles instead
of obtaining them over and over again and pretending we could do
anything useful without them (for chosen this includes adding a
declaration and initializing it in OF_init()).
- In OF_init() if obtaining the memory or mmu handle fails just call
OF_exit() instead of panic() as the loader hasn't initialized the
console at these early stages yet and trying to print out something
causes a hang. With OF_exit() one at least has a change to get back
to the OFW boot monitor and debug the problem.
- Fix OF_call_method() on 64-bit machines (this is a merge of
sys/dev/ofw/openfirm.c rev 1.6).
- Replace OF_alloc_phys(), OF_claim_virt(), OF_map_phys() and
OF_release_phys() in the MI part of the loader with wrappers around
OF_call_method() in the sparc64. Beside the fact that they duplicate
OF_call_method() the formers should never have been in the MI part
of the loader as contrary to the OFW spec they use two-cell physical
addresses.
- Remove unused functions which are also MD dupes of OF_call_method().
- In sys/boot/sparc64/loader/main.c add __func__ to panic strings as
different functions use otherwise identical panic strings and make
some of the panic strings a tad more user-friendly instead of just
mentioning the name of the function that returned an unexpected
result.

show more ...


# 9e2b417b 02-Mar-2005 Marius Strobl <marius@FreeBSD.org>

Remove unused variables.


# 6a0fd84b 05-Jan-2005 Warner Losh <imp@FreeBSD.org>

Start each of the license/copyright comments with /*-


# 39513fa6 16-Aug-2004 Marius Strobl <marius@FreeBSD.org>

Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by: tmm


# c990f469 04-Jan-2004 David E. O'Brien <obrien@FreeBSD.org>

Convert to __FBSDID.


# 0f9bb727 07-Jun-2002 Benno Rice <benno@FreeBSD.org>

Fix up the DMA buffer allocation call.


# c2ef11f2 23-Feb-2002 Jake Burkholder <jake@FreeBSD.org>

Check the return values of index() and don't dereference it if its null;
the path may not have a ':' in it. The mac address property is called
mac-address for sparc64. Don't allocate a dma buffer f

Check the return values of index() and don't dereference it if its null;
the path may not have a ':' in it. The mac address property is called
mac-address for sparc64. Don't allocate a dma buffer for sparc64 either.

show more ...


12