diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-19 07:48:16 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-19 07:48:16 -0400 |
commit | 3431b392ad50ff37fa3d6e7715c6a99c74d692dc (patch) | |
tree | 53b6785acaa658a60c6a854af4dea9040f826b48 /lib/tables_csum.c | |
parent | 68ff827ec74fdca8f17d469f22e1032ed14cb795 (diff) | |
parent | 3fb97e267a5e136d8386a7cb1d5b4fe63af518eb (diff) |
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Patch queue for efi - 2016-10-19
Highlights this time around:
- Add run time service (power control) support for PSCI (fixed in v3)
- Add efi gop pointer exposure
- SMBIOS support for EFI (on ARM)
- efi pool memory unmap support (needed for 4.8)
- initial x86 efi payload support (fixed up in v2)
- various bug fixes
Signed-off-by: Tom Rini <trini@konsulko.com>
Conflicts:
include/tables_csum.h
Diffstat (limited to 'lib/tables_csum.c')
-rw-r--r-- | lib/tables_csum.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/tables_csum.c b/lib/tables_csum.c new file mode 100644 index 00000000000..340d7b3b11d --- /dev/null +++ b/lib/tables_csum.c @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com> + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <linux/ctype.h> + +u8 table_compute_checksum(void *v, int len) +{ + u8 *bytes = v; + u8 checksum = 0; + int i; + + for (i = 0; i < len; i++) + checksum -= bytes[i]; + + return checksum; +} |