// SPDX-License-Identifier: GPL-2.01#include <linux/io.h>2#include <linux/export.h>34/**5* check_signature - find BIOS signatures6* @io_addr: mmio address to check7* @signature: signature block8* @length: length of signature9*10* Perform a signature comparison with the mmio address io_addr. This11* address should have been obtained by ioremap.12* Returns 1 on a match.13*/1415int check_signature(const volatile void __iomem *io_addr,16const unsigned char *signature, int length)17{18while (length--) {19if (readb(io_addr) != *signature)20return 0;21io_addr++;22signature++;23}24return 1;25}26EXPORT_SYMBOL(check_signature);272829