Lines Matching full:rom
45 struct pci_setup_rom *rom = NULL; in preserve_pci_rom_image() local
63 size = romsize + sizeof(*rom); in preserve_pci_rom_image()
66 (void **)&rom); in preserve_pci_rom_image()
68 efi_err("Failed to allocate memory for 'rom'\n"); in preserve_pci_rom_image()
72 memset(rom, 0, sizeof(*rom)); in preserve_pci_rom_image()
74 rom->data.type = SETUP_PCI; in preserve_pci_rom_image()
75 rom->data.len = size - sizeof(struct setup_data); in preserve_pci_rom_image()
76 rom->data.next = 0; in preserve_pci_rom_image()
77 rom->pcilen = romsize; in preserve_pci_rom_image()
78 *__rom = rom; in preserve_pci_rom_image()
81 PCI_VENDOR_ID, 1, &rom->vendor); in preserve_pci_rom_image()
84 efi_err("Failed to read rom->vendor\n"); in preserve_pci_rom_image()
89 PCI_DEVICE_ID, 1, &rom->devid); in preserve_pci_rom_image()
92 efi_err("Failed to read rom->devid\n"); in preserve_pci_rom_image()
96 status = efi_call_proto(pci, get_location, &rom->segment, &rom->bus, in preserve_pci_rom_image()
97 &rom->device, &rom->function); in preserve_pci_rom_image()
102 memcpy(rom->romdata, romimage, romsize); in preserve_pci_rom_image()
106 efi_bs_call(free_pool, rom); in preserve_pci_rom_image()
155 struct pci_setup_rom *rom; in setup_efi_pci() local
162 status = preserve_pci_rom_image(pci, &rom); in setup_efi_pci()
167 data->next = (unsigned long)rom; in setup_efi_pci()
169 params->hdr.setup_data = (unsigned long)rom; in setup_efi_pci()
171 data = (struct setup_data *)rom; in setup_efi_pci()