blob: 9207e85f91bf00f7fdbf0c6f400e6c036af31a66 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Alexander Graf120b0412016-08-19 01:23:22 +02002/*
3 * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
Alexander Graf120b0412016-08-19 01:23:22 +02004 */
5
6#ifndef _TABLES_CSUM_H_
7#define _TABLES_CSUM_H_
8
Tom Rini145992c2022-04-04 14:43:51 -04009/**
10 * table_compute_checksum() - Compute a table checksum
11 *
12 * This computes an 8-bit checksum for the configuration table.
13 * All bytes in the configuration table, including checksum itself and
14 * reserved bytes must add up to zero.
15 *
16 * @v: configuration table base address
17 * @len: configuration table size
18 * @return: the 8-bit checksum
19 */
Heinrich Schuchardt822cf852024-01-09 09:36:44 +010020u8 table_compute_checksum(const void *v, const int len);
Alexander Graf120b0412016-08-19 01:23:22 +020021
22#endif