iPXE
isa_ids.h File Reference
#include <byteswap.h>

Go to the source code of this file.

Macros

#define ISA_VENDOR(a, b, c)
#define ISAPNP_VENDOR(a, b, c)
#define EISA_VENDOR(a, b, c)
#define GENERIC_ISAPNP_VENDOR   ISAPNP_VENDOR ( 'P','N','P' )
#define ISA_PROD_ID_MASK   ( 0xf0ff )
#define ISA_PROD_ID(product)
#define ISA_PROD_REV(product)

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
char * isa_id_string (unsigned int vendor, unsigned int product)

Macro Definition Documentation

◆ ISA_VENDOR

#define ISA_VENDOR ( a,
b,
c )
Value:
bswap_16 ( ( ( ( (a) - 'A' + 1 ) & 0x1f ) << 10 ) | \
( ( ( (b) - 'A' + 1 ) & 0x1f ) << 5 ) | \
( ( ( (c) - 'A' + 1 ) & 0x1f ) << 0 ) )
#define bswap_16(value)
Definition byteswap.h:59

Definition at line 30 of file isa_ids.h.

30#define ISA_VENDOR( a, b, c ) \
31 bswap_16 ( ( ( ( (a) - 'A' + 1 ) & 0x1f ) << 10 ) | \
32 ( ( ( (b) - 'A' + 1 ) & 0x1f ) << 5 ) | \
33 ( ( ( (c) - 'A' + 1 ) & 0x1f ) << 0 ) )

◆ ISAPNP_VENDOR

#define ISAPNP_VENDOR ( a,
b,
c )
Value:
ISA_VENDOR ( a, b, c )
#define ISA_VENDOR(a, b, c)
Definition isa_ids.h:30

Definition at line 35 of file isa_ids.h.

◆ EISA_VENDOR

#define EISA_VENDOR ( a,
b,
c )
Value:
ISA_VENDOR ( a, b, c )

Definition at line 36 of file isa_ids.h.

◆ GENERIC_ISAPNP_VENDOR

#define GENERIC_ISAPNP_VENDOR   ISAPNP_VENDOR ( 'P','N','P' )

Definition at line 38 of file isa_ids.h.

Referenced by eth_probe(), ISA_DRIVER(), ISA_DRIVER(), and ISA_DRIVER().

◆ ISA_PROD_ID_MASK

#define ISA_PROD_ID_MASK   ( 0xf0ff )

Definition at line 44 of file isa_ids.h.

Referenced by el3_eisa_probe(), and legacy_t509_probe().

◆ ISA_PROD_ID

#define ISA_PROD_ID ( product)
Value:
uint8_t product
Product string.
Definition smbios.h:5
#define ISA_PROD_ID_MASK
Definition isa_ids.h:44

Definition at line 45 of file isa_ids.h.

Referenced by eisa_probe(), el3_eisa_probe(), isapnp_probe(), and legacy_t509_probe().

◆ ISA_PROD_REV

#define ISA_PROD_REV ( product)
Value:
( ( (product) & ~ISA_PROD_ID_MASK ) >> 8 )

Definition at line 46 of file isa_ids.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ isa_id_string()

char * isa_id_string ( unsigned int vendor,
unsigned int product )
extern

Definition at line 11 of file isa_ids.c.

11 {
12 static char buf[7];
13 int i;
14
15 /* Vendor ID is a compressed ASCII string */
17 for ( i = 2 ; i >= 0 ; i-- ) {
18 buf[i] = ( 'A' - 1 + ( vendor & 0x1f ) );
19 vendor >>= 5;
20 }
21
22 /* Product ID is a 4-digit hex string */
23 sprintf ( &buf[3], "%04x", bswap_16 ( product ) );
24
25 return buf;
26}
static unsigned short vendor
Definition davicom.c:128
#define sprintf(buf, fmt,...)
Write a formatted string to a buffer.
Definition stdio.h:37

References bswap_16, product, sprintf, and vendor.

Referenced by eisa_probe(), and isapnp_probe().