coreboot/tests/lib
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
..
b64_decode-test.c tests: update CMocka to stable-1.1 2022-04-19 13:00:36 +00:00
bootmem-test.c tests/lib: Set IORESOURCE_ASSIGNED for bootmem-test and memrange-test 2022-08-13 16:38:41 +00:00
cbfs-lookup-test.c commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
cbfs-verification-test.c cbfs/vboot: Adapt to new vb2_digest API 2022-09-02 23:51:29 +00:00
cbmem_console-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
cbmem_stage_cache-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
coreboot_table-test.c coreboot_tables: Make existing alignment conventions more explicit 2022-12-22 15:34:28 +00:00
crc_byte-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
dimm_info_util-test.c spd.h: Move enum ddr3_module_type to ddr3.h 2023-01-04 12:39:32 +00:00
edid-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
fmap-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
hexstrtobin-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
imd-test.c tests/lib: Add space before single line comment termination 2022-03-27 15:33:39 +00:00
imd_cbmem-test.c Allow to build romstage sources inside the bootblock 2023-11-09 13:20:18 +00:00
lib-test.c lib: Add __fls() (Find Last Set) 2021-12-13 02:57:07 +00:00
libgcc-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
list-test.c lib/list: Add list_append 2021-11-03 08:29:16 +00:00
lzma-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
Makefile.mk lib: Move IP checksum to commonlib 2024-02-02 22:48:27 +00:00
malloc-test.c malloc/memalign: Return NULL if the request is too large 2024-01-29 19:12:43 +00:00
memchr-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
memcmp-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
memcpy-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
memmove-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
memrange-test.c allocator_v4: Introduce RESOURCE_ALLOCATION_TOP_DOWN 2022-09-04 16:35:22 +00:00
memset-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
region_file-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
rtc-test.c tree: Drop repeated words 2023-02-07 04:37:31 +00:00
spd_cache-test.c test/lib: Add non-existent DIMMs test case in spd_cache-test 2022-11-03 13:00:15 +00:00
stack-test.c tests: Fix tests code and comments style 2022-01-14 14:29:29 +00:00
string-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
timestamp-test.c timestamps: Rename timestamps to make names more consistent 2022-03-08 16:06:33 +00:00
uuid-test.c tests: Improve test output readability 2021-09-01 19:38:09 +00:00
ux_locales-test.c tests/lib: Add unit tests for ux_locales_get_text() 2023-08-30 15:20:59 +00:00