iPXE
|
UNDI expansion ROMs. More...
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <pxe.h>
#include <realmode.h>
#include <undirom.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER) | |
static | LIST_HEAD (undiroms) |
List of all UNDI ROMs. More... | |
static int | undirom_parse_pxeromid (struct undi_rom *undirom, unsigned int pxeromid) |
Parse PXE ROM ID structure. More... | |
static int | undirom_parse_pcirheader (struct undi_rom *undirom, unsigned int pcirheader) |
Parse PCI expansion header. More... | |
static int | undirom_probe (unsigned int rom_segment) |
Probe UNDI ROM. More... | |
static void | undirom_probe_all_roms (void) |
Create UNDI ROMs for all possible expansion ROMs. More... | |
struct undi_rom * | undirom_find_pci (unsigned int vendor_id, unsigned int device_id, unsigned int rombase) |
Find UNDI ROM for PCI device. More... | |
UNDI expansion ROMs.
Definition in file undirom.c.
FILE_LICENCE | ( | GPL2_OR_LATER | ) |
|
static |
List of all UNDI ROMs.
|
static |
Parse PXE ROM ID structure.
undirom | UNDI ROM |
pxeromid | Offset within ROM to PXE ROM ID structure |
rc | Return status code |
Definition at line 45 of file undirom.c.
References undi_rom::code_size, undi_rom_id::CodeSize, copy_from_real, undi_rom::data_size, undi_rom_id::DataSize, DBGC, EINVAL, undi_rom::loader_entry, undi_rom::rom_segment, undi_rom_id::Signature, UNDI_ROM_ID_SIGNATURE, and undi_rom_id::UNDILoader.
Referenced by undirom_probe().
|
static |
Parse PCI expansion header.
undirom | UNDI ROM |
pcirheader | Offset within ROM to PCI expansion header |
Definition at line 88 of file undirom.c.
References undi_rom::bus_id, undi_rom::bus_type, copy_from_real, DBGC, undi_pci_device_id::device_id, pcir_header::device_id, EINVAL, undi_device_id::pci, PCI_NIC, PCIR_SIGNATURE, undi_rom::rom_segment, pcir_header::signature, undi_pci_device_id::vendor_id, and pcir_header::vendor_id.
Referenced by undirom_probe().
|
static |
Probe UNDI ROM.
rom_segment | ROM segment address |
rc | Return status code |
Definition at line 121 of file undirom.c.
References copy_from_real, DBG, DBGC, EINVAL, ENOMEM, free, undi_rom::list, list_add_tail, NULL, undi_rom_header::PCIRHeader, undi_rom_header::PXEROMID, rc, undi_rom::rom_segment, ROM_SIGNATURE, undi_rom_header::ROMLength, undi_rom_header::Signature, undirom_parse_pcirheader(), undirom_parse_pxeromid(), and zalloc().
Referenced by undirom_probe_all_roms().
|
static |
Create UNDI ROMs for all possible expansion ROMs.
Definition at line 184 of file undirom.c.
References DBG, and undirom_probe().
Referenced by undirom_find_pci().
struct undi_rom* undirom_find_pci | ( | unsigned int | vendor_id, |
unsigned int | device_id, | ||
unsigned int | rombase | ||
) |
Find UNDI ROM for PCI device.
vendor_id | PCI vendor ID |
device_id | PCI device ID |
rombase | ROM base address, or 0 for any |
undirom | UNDI ROM, or NULL |
Definition at line 211 of file undirom.c.
References undi_rom::bus_id, undi_rom::bus_type, DBG, DBGC, undi_pci_device_id::device_id, device_id, undi_rom::list, list_for_each_entry, NULL, undi_device_id::pci, PCI_NIC, undi_rom::rom_segment, undirom_probe_all_roms(), undi_pci_device_id::vendor_id, and vendor_id.
Referenced by undipci_find_rom().