Attention is currently required from: Angel Pons, Hung-Te Lin, Jakub Czapiga, Julius Werner, Yidi Lin, Yu-Ping Wu.
Hello Angel Pons, Hung-Te Lin, Jakub Czapiga, Yidi Lin, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/80251?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed: Verified-1 by build bot (Jenkins)
Change subject: lib: Move IP checksum to commonlib ......................................................................
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-calculatted "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 --- M src/arch/x86/boot.c M src/commonlib/Makefile.mk A src/commonlib/bsd/include/commonlib/bsd/ipchksum.h A src/commonlib/bsd/ipchksum.c M src/drivers/elog/boot_count.c M src/drivers/intel/fsp1_1/hob.c M src/drivers/net/ne2k.c D src/include/ip_checksum.h M src/lib/Makefile.mk D src/lib/compute_ip_checksum.c M src/lib/coreboot_table.c M src/northbridge/intel/haswell/broadwell_mrc/raminit.c M src/northbridge/intel/haswell/haswell_mrc/raminit.c M src/northbridge/intel/ironlake/raminit.c M src/northbridge/intel/sandybridge/raminit_mrc.c M src/soc/intel/common/basecode/ramtop/ramtop.c M src/soc/intel/common/block/cse/cse_lite_cmos.c M src/soc/mediatek/common/memory.c M src/soc/mediatek/mt8183/memory.c M src/southbridge/intel/bd82x6x/early_pch.c M tests/commonlib/bsd/Makefile.inc A tests/commonlib/bsd/ipchksum-test.c M tests/lib/Makefile.inc D tests/lib/compute_ip_checksum-test.c 24 files changed, 193 insertions(+), 202 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/51/80251/2