summaryrefslogtreecommitdiffstats
path: root/src/arch/x86
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2024-01-30 16:51:05 -0800
committerJulius Werner <jwerner@chromium.org>2024-02-02 22:48:27 +0000
commitde37109767b6b415778f34cbac196c8418f7e371 (patch)
tree44ede1025fd6058c09cc99c8e7d7122a64203641 /src/arch/x86
parent416cc665929e4e66bcab3e395daa031401a61fe8 (diff)
downloadcoreboot-de37109767b6b415778f34cbac196c8418f7e371.tar.gz
coreboot-de37109767b6b415778f34cbac196c8418f7e371.tar.bz2
coreboot-de37109767b6b415778f34cbac196c8418f7e371.zip
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>
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/boot.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c
index c50ec0e1f16a..90af84f60802 100644
--- a/src/arch/x86/boot.c
+++ b/src/arch/x86/boot.c
@@ -5,7 +5,6 @@
#include <commonlib/helpers.h>
#include <console/console.h>
#include <program_loading.h>
-#include <ip_checksum.h>
#include <symbols.h>
#include <assert.h>