9 #include <linux/kernel.h>
10 #include <linux/export.h>
11 #include <linux/pci.h>
12 #include <linux/slab.h>
35 pci_read_config_dword(pdev, pdev->
rom_base_reg, &rom_addr);
38 pci_write_config_dword(pdev, pdev->
rom_base_reg, rom_addr);
52 pci_read_config_dword(pdev, pdev->
rom_base_reg, &rom_addr);
54 pci_write_config_dword(pdev, pdev->
rom_base_reg, rom_addr);
77 if (
readb(image) != 0x55) {
81 if (
readb(image + 1) != 0xAA)
84 pds = image +
readw(image + 24);
85 if (
readb(pds) !=
'P')
87 if (
readb(pds + 1) !=
'C')
89 if (
readb(pds + 2) !=
'I')
91 if (
readb(pds + 3) !=
'R')
93 last_image =
readb(pds + 21) & 0x80;
95 image +=
readw(pds + 16) * 512;
96 }
while (!last_image);
100 return min((
size_t)(image - rom), size);
127 start = (loff_t)0xC0000;