Back to home page

LXR

 
 

    


0001 #include <linux/io.h>
0002 #include <linux/export.h>
0003 
0004 /**
0005  *  check_signature     -   find BIOS signatures
0006  *  @io_addr: mmio address to check
0007  *  @signature:  signature block
0008  *  @length: length of signature
0009  *
0010  *  Perform a signature comparison with the mmio address io_addr. This
0011  *  address should have been obtained by ioremap.
0012  *  Returns 1 on a match.
0013  */
0014 
0015 int check_signature(const volatile void __iomem *io_addr,
0016             const unsigned char *signature, int length)
0017 {
0018     while (length--) {
0019         if (readb(io_addr) != *signature)
0020             return 0;
0021         io_addr++;
0022         signature++;
0023     }
0024     return 1;
0025 }
0026 EXPORT_SYMBOL(check_signature);