/* lspci.c - List PCI devices. */
/*
* GRUB -- GRand Unified Bootloader
- * Copyright (C) 2008 Free Software Foundation, Inc.
+ * Copyright (C) 2008, 2009 Free Software Foundation, Inc.
*
* GRUB is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{ 1, 2, "Floppy Controller" },
{ 1, 3, "IPI Controller" },
{ 1, 4, "RAID Controller" },
+ { 1, 6, "SATA Controller" },
{ 1, 0x80, "Mass storage Controller" },
{ 2, 0, "Ethernet Controller" },
{ 2, 1, "Token Ring Controller" },
pciid >> 16);
addr = grub_pci_make_address (bus, dev, func, 2);
class = grub_pci_read (addr);
-
+
/* Lookup the class name, if there isn't a specific one,
retry with 0x80 to get the generic class name. */
sclass = grub_pci_get_class (class >> 24, (class >> 16) & 0xFF);
if (! sclass)
sclass = "";
- grub_printf (" %s\n", sclass);
+ grub_printf (" [%04x] %s", (class >> 16) & 0xffff, sclass);
+
+ grub_uint8_t pi = (class >> 8) & 0xff;
+ if (pi)
+ grub_printf (" [PI %02x]", pi);
+
+ grub_printf ("\n");
return 0;
}