]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[iobuf] Ensure I/O buffer data sits within unshared cachelines
authorMichael Brown <mcb30@ipxe.org>
Mon, 7 Jul 2025 12:21:24 +0000 (13:21 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 7 Jul 2025 15:18:04 +0000 (16:18 +0100)
commit19f1407ad90d39d3bab9293bf2849afc42dd2e9d
tree35db5dc3bae9a58cf7b8586f1c5ffaf50a8e8014
parentc21443f0b9a4dee56ab0f47b096540d6443cda9f
[iobuf] Ensure I/O buffer data sits within unshared cachelines

On platforms where DMA devices are not in the same coherency domain as
the CPU cache, we must ensure that DMA I/O buffers do not share
cachelines with other data.

Align the start and end of I/O buffers to IOB_ZLEN, which is larger
than any cacheline size we expect to encounter.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/iobuf.c
src/include/ipxe/iobuf.h
src/tests/iobuf_test.c