iPXE
|
IBM BladeCenter Open Fabric Manager (BOFM) More...
Go to the source code of this file.
Data Structures | |
struct | bofm_global_header |
BOFM table header. More... | |
struct | bofm_section_header |
BOFM section header. More... | |
struct | bofm_en |
BOFM Ethernet parameter entry. More... | |
struct | bofm_device |
A BOFM device. More... | |
struct | bofm_operations |
BOFM device operations. More... | |
Macros | |
#define | IBMs_SIGNATURE ( ( 'I' << 24 ) + ( 'B' << 16 ) + ( 'M' << 8 ) + ' ' ) |
'IBM ' signature More... | |
#define | sIBM_SIGNATURE ( ( ' ' << 24 ) + ( 'I' << 16 ) + ( 'B' << 8 ) + 'M' ) |
' IBM' signature More... | |
#define | BOFM_SUCCESS 0x00 |
Successful. More... | |
#define | BOFM_ERR_INVALID_ACTION 0x01 |
Invalid action string. More... | |
#define | BOFM_ERR_UNSUPPORTED 0x02 |
Unsupported parameter structure version. More... | |
#define | BOFM_ERR_DEVICE_ERROR 0x03 |
Device error prohibited MAC/WWN update. More... | |
#define | BOFM_PCI_RESET 0x80 |
PCI reset required (may be combined with another return code) More... | |
#define | BOFM_SKIP_INIT 0x80000000UL |
Skip option ROM initialisation. More... | |
#define | BOFM_IOAA_MAGIC ( 'I' + ( 'O' << 8 ) + ( 'A' << 16 ) + ( 'A' << 24 ) ) |
BOFM table header signature. More... | |
#define | BOFM_ACTION_UPDT ( 'U' + ( 'P' << 8 ) + ( 'D' << 16 ) + ( 'T' << 24 ) ) |
Update MAC/WWN. More... | |
#define | BOFM_ACTION_DFLT ( 'D' + ( 'F' << 8 ) + ( 'L' << 16 ) + ( 'T' << 24 ) ) |
Restore MAC/WWN to factory default. More... | |
#define | BOFM_ACTION_HVST ( 'H' + ( 'V' << 8 ) + ( 'S' << 16 ) + ( 'T' << 24 ) ) |
Harvest MAC/WWN. More... | |
#define | BOFM_ACTION_PARM ( 'P' + ( 'A' << 8 ) + ( 'R' << 16 ) + ( 'M' << 24 ) ) |
Update MAC/WWN and initialise device. More... | |
#define | BOFM_ACTION_NONE ( 'N' + ( 'O' << 8 ) + ( 'N' << 16 ) + ( 'E' << 24 ) ) |
Just initialise the device. More... | |
#define | BOFM_EN_MAGIC ( ' ' + ( ' ' << 8 ) + ( 'E' << 16 ) + ( 'N' << 24 ) ) |
EN start marker. More... | |
#define | BOFM_DONE_MAGIC ( 'D' + ( 'O' << 8 ) + ( 'N' << 16 ) + ( 'E' << 24 ) ) |
End marker. More... | |
#define | BOFM_EN_MAP_MASK 0x0001 |
Port mapping mask. More... | |
#define | BOFM_EN_MAP_PFA 0x0000 |
Port mapping is by PCI bus:dev.fn. More... | |
#define | BOFM_EN_MAP_SLOT_PORT 0x0001 |
Port mapping is by slot/port. More... | |
#define | BOFM_EN_EN_B 0x0002 |
MAC address B is present. More... | |
#define | BOFM_EN_VLAN_B 0x0004 |
VLAN tag for MAC address B is present. More... | |
#define | BOFM_EN_EN_A 0x0008 |
MAC address A is present. More... | |
#define | BOFM_EN_VLAN_A 0x0010 |
VLAN tag for MAC address A is present. More... | |
#define | BOFM_EN_CSM_MASK 0x00c0 |
Entry consumption indicator mask. More... | |
#define | BOFM_EN_CSM_UNUSED 0x0000 |
Entry has not been used. More... | |
#define | BOFM_EN_CSM_SUCCESS 0x0040 |
Entry has been used successfully. More... | |
#define | BOFM_EN_CSM_FAILED 0x0080 |
Entry has been used but failed. More... | |
#define | BOFM_EN_CHG_MASK 0x0100 |
Consumed entry change mask. More... | |
#define | BOFM_EN_CHG_UNCHANGED 0x0000 |
Consumed entry is same as previous active entry. More... | |
#define | BOFM_EN_CHG_CHANGED 0x0100 |
Consumed entry is different than previous active entry. More... | |
#define | BOFM_EN_USAGE_HARVEST 0x1000 |
Ignore values - it's harvest time. More... | |
#define | BOFM_EN_USAGE_ENTRY 0x0800 |
Use entry values for assignment. More... | |
#define | BOFM_EN_USAGE_DEFAULT 0x0400 |
Use factory default values. More... | |
#define | BOFM_EN_HVST 0x2000 |
Harvest complete. More... | |
#define | BOFM_EN_RQ_HVST_MASK 0xc000 |
Harvest request mask. More... | |
#define | BOFM_EN_RQ_HVST_NONE 0x0000 |
Do not harvest. More... | |
#define | BOFM_EN_RQ_HVST_DEFAULT 0x4000 |
Harvest factory default values. More... | |
#define | BOFM_EN_RQ_HVST_ACTIVE 0xc000 |
Harvest active values. More... | |
#define | BOFM_MAGIC_FMT "'%c%c%c%c'" |
BOFM magic value debug message format. More... | |
#define | BOFM_MAGIC_ARGS(magic) |
BOFM magic value debug message arguments. More... | |
#define | BOFM_DRIVERS __table ( struct pci_driver, "bofm_drivers" ) |
BOFM driver table. More... | |
#define | __bofm_driver |
Declare a BOFM driver. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | bofm_init (struct bofm_device *bofm, struct pci_device *pci, struct bofm_operations *op) |
Initialise BOFM device. More... | |
int | bofm_register (struct bofm_device *bofm) |
Register BOFM device. More... | |
void | bofm_unregister (struct bofm_device *bofm) |
Unregister BOFM device. More... | |
int | bofm_find_driver (struct pci_device *pci) |
Find BOFM driver for PCI device. More... | |
int | bofm (userptr_t bofmtab, struct pci_device *pci) |
Process BOFM table. More... | |
void | bofm_test (struct pci_device *pci) |
Perform BOFM test. More... | |
IBM BladeCenter Open Fabric Manager (BOFM)
Definition in file bofm.h.
#define IBMs_SIGNATURE ( ( 'I' << 24 ) + ( 'B' << 16 ) + ( 'M' << 8 ) + ' ' ) |
#define sIBM_SIGNATURE ( ( ' ' << 24 ) + ( 'I' << 16 ) + ( 'B' << 8 ) + 'M' ) |
#define BOFM_SKIP_INIT 0x80000000UL |
#define BOFM_IOAA_MAGIC ( 'I' + ( 'O' << 8 ) + ( 'A' << 16 ) + ( 'A' << 24 ) ) |
#define BOFM_MAGIC_ARGS | ( | magic | ) |
#define BOFM_DRIVERS __table ( struct pci_driver, "bofm_drivers" ) |
#define __bofm_driver |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Initialise BOFM device.
bofm | BOFM device |
pci | PCI device |
op | BOFM device operations |
Definition at line 339 of file bofm.h.
References bofm(), op, and bofm_device::pci.
Referenced by hermon_bofm_probe().
int bofm_register | ( | struct bofm_device * | bofm | ) |
void bofm_unregister | ( | struct bofm_device * | bofm | ) |
int bofm_find_driver | ( | struct pci_device * | pci | ) |
Find BOFM driver for PCI device.
pci | PCI device |
rc | Return status code |
Definition at line 90 of file bofm.c.
References BOFM_DRIVERS, pci_device::device, ENOENT, for_each_table_entry, id, pci_driver::id_count, pci_driver::ids, pci_set_driver(), and pci_device::vendor.
Referenced by bofm(), and efi_bofm_supported().
int bofm | ( | userptr_t | bofmtab, |
struct pci_device * | pci | ||
) |
Process BOFM table.
bofmtab | BOFM table |
pci | PCI device |
bofmrc | BOFM return status |
Definition at line 238 of file bofm.c.
References bofm_global_header::action, bofm(), BOFM_ACTION_DFLT, BOFM_ACTION_HVST, BOFM_ACTION_NONE, BOFM_ACTION_PARM, BOFM_ACTION_UPDT, BOFM_EN_CSM_FAILED, BOFM_EN_CSM_SUCCESS, BOFM_EN_MAGIC, BOFM_EN_MAP_MASK, BOFM_EN_MAP_PFA, BOFM_ERR_DEVICE_ERROR, BOFM_ERR_INVALID_ACTION, bofm_find_busdevfn(), bofm_find_driver(), BOFM_IOAA_MAGIC, bofm_locate_section(), BOFM_MAGIC_ARGS, BOFM_MAGIC_FMT, bofm_probe(), bofm_remove(), BOFM_SKIP_INIT, BOFM_SUCCESS, bofm_en::busdevfn, copy_from_user(), copy_to_user(), DBG, DBG2, DBG2_HDA, en, bofm_global_header::length, bofm_section_header::length, bofm_global_header::magic, bofm_en::mport, bofm_en::options, bofm_device::pci, PCI_ARGS, PCI_BUS, PCI_FMT, PCI_FUNC, PCI_SLOT, bofm_en::port, bofm_global_header::profile, rc, and bofm_en::slot.
Referenced by bofm(), bofm_en(), bofm_find_busdevfn(), bofm_init(), bofm_register(), bofm_test(), bofm_unregister(), efi_bofm_start(), hermon_bofm_harvest(), and hermon_bofm_update().
void bofm_test | ( | struct pci_device * | pci | ) |
Perform BOFM test.
pci | PCI device |
Definition at line 105 of file bofm_test.c.
References bofm(), BOFM_EN_CSM_SUCCESS, BOFM_EN_HVST, bofmtab_harvest, bofmtab_update, pci_device::busdevfn, DBG_HDA, eth_ntoa(), PCI_ARGS, PCI_FMT, printf(), and virt_to_user().
Referenced by bofm_test_init().