coreboot/src/drivers
Julius Werner de37109767 lib: Move IP checksum to commonlib
This patch moves the IP checksum algorithm into commonlib to prepare for
it being shared with libpayload. The current implementation is ancient
and pretty hard to read (and does some unnecessary questionable things
like the type-punning stuff which leads to suboptimal code generation),
so this reimplements it from scratch (that also helps with the
licensing).

This algorithm is prepared to take in a pre-calculated "wide" checksum
in a machine-register-sized data type which is then narrowed down to 16
bits (see RFC 1071 for why that's valid). This isn't used yet (and the
code will get optimized out), but will be used later in this patch
series for architecture-specific optimization.

Change-Id: Ic04c714c00439a17fc04a8a6e730cc2aa19b8e68
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80251
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-02-02 22:48:27 +00:00
..
acpi/thermal_zone include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
amd include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
ams driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
analogix/anx7625 driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
asmedia driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
aspeed driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
broadcom driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
camera driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
crb include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
efi driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
elog lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
emulation/qemu driver/acpi to /driver/gfx: Rename Makefiles from .inc to .mk 2024-01-24 10:03:39 +00:00
generic include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
genesyslogic include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
gfx/generic include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
i2c device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
intel lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
ipmi include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
lenovo include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
maxim driver/intel to /driver/ocp: Rename Makefiles from .inc to .mk 2024-01-24 10:04:10 +00:00
mipi drivers/mipi: Fine tune VFP, CLK and init code for IVO_T109NW41 panel 2024-01-24 11:16:36 +00:00
mrc_cache driver/intel to /driver/ocp: Rename Makefiles from .inc to .mk 2024-01-24 10:04:10 +00:00
net lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
nxp/uwb device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
ocp driver/intel to /driver/ocp: Rename Makefiles from .inc to .mk 2024-01-24 10:04:10 +00:00
parade driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
pc80 include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
pcie device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
ricoh/rce822 include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
secunet/dmi include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
siemens/nc_fpga driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
sil/3114 driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
smbus driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
smmstore driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
sof include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
soundwire include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
spi device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
ti driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
tpm driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
uart include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
usb device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
vpd driver/parade to /driver/wwan: Rename Makefiles from .inc to .mk 2024-01-24 10:04:33 +00:00
wifi/generic device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00
wwan/fm device/device.h: Rename busses for clarity 2024-01-31 10:36:39 +00:00