You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324
  1. #include "etherboot.h"
  2. #include "isa_ids.h"
  3. /*
  4. * EISA and ISAPnP IDs are actually mildly human readable, though in a
  5. * somewhat brain-damaged way.
  6. *
  7. */
  8. char * isa_id_string ( uint16_t vendor, uint16_t product ) {
  9. static unsigned char buf[7];
  10. int i;
  11. /* Vendor ID is a compressed ASCII string */
  12. vendor = __bswap_16 ( vendor );
  13. for ( i = 2 ; i >= 0 ; i-- ) {
  14. buf[i] = ( 'A' - 1 + ( vendor & 0x1f ) );
  15. vendor >>= 5;
  16. }
  17. /* Product ID is a 4-digit hex string */
  18. sprintf ( &buf[3], "%hx", __bswap_16 ( product ) );
  19. return buf;
  20. }