mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 00:17:57 +03:00
[intel] Add support for mailbox used by virtual functions
Virtual functions use a mailbox to communicate with the physical function driver: this covers functionality such as obtaining the MAC address. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -243,6 +243,29 @@ intel_init_ring ( struct intel_ring *ring, unsigned int count, unsigned int reg,
|
||||
ring->describe = describe;
|
||||
}
|
||||
|
||||
/** An Intel virtual function mailbox */
|
||||
struct intel_mailbox {
|
||||
/** Mailbox control register */
|
||||
unsigned int ctrl;
|
||||
/** Mailbox memory base */
|
||||
unsigned int mem;
|
||||
};
|
||||
|
||||
/**
|
||||
* Initialise mailbox
|
||||
*
|
||||
* @v mbox Mailbox
|
||||
* @v ctrl Mailbox control register
|
||||
* @v mem Mailbox memory register base
|
||||
*/
|
||||
static inline __attribute__ (( always_inline )) void
|
||||
intel_init_mbox ( struct intel_mailbox *mbox, unsigned int ctrl,
|
||||
unsigned int mem ) {
|
||||
|
||||
mbox->ctrl = ctrl;
|
||||
mbox->mem = mem;
|
||||
}
|
||||
|
||||
/** An Intel network card */
|
||||
struct intel_nic {
|
||||
/** Registers */
|
||||
@@ -261,6 +284,9 @@ struct intel_nic {
|
||||
/** EEPROM address shift */
|
||||
unsigned int eerd_addr_shift;
|
||||
|
||||
/** Mailbox */
|
||||
struct intel_mailbox mbox;
|
||||
|
||||
/** Transmit descriptor ring */
|
||||
struct intel_ring tx;
|
||||
/** Receive descriptor ring */
|
||||
|
||||
Reference in New Issue
Block a user