#include <linux/io.h>1#include <linux/module.h>23/**4* check_signature - find BIOS signatures5* @io_addr: mmio address to check6* @signature: signature block7* @length: length of signature8*9* Perform a signature comparison with the mmio address io_addr. This10* address should have been obtained by ioremap.11* Returns 1 on a match.12*/1314int check_signature(const volatile void __iomem *io_addr,15const unsigned char *signature, int length)16{17while (length--) {18if (readb(io_addr) != *signature)19return 0;20io_addr++;21signature++;22}23return 1;24}25EXPORT_SYMBOL(check_signature);262728