UEFIStarter
a simple UEFI framework
|
Functions for accessing PCI devices. More...
#include <Uefi.h>
#include <Protocol/PciIo.h>
#include <IndustryStandard/Pci.h>
#include "core/logger.h"
Go to the source code of this file.
Data Structures | |
struct | pci_subclass_name_t |
data type for PCI device subclass names More... | |
struct | pci_class_names_t |
data type for PCI device class names More... | |
Functions | |
CHAR16 * | find_pci_device_name (UINT16 vendor_id, UINT16 device_id, UINT16 subvendor_id, UINT16 subdevice_id) |
Looks up a PCI device's name by vendor ID and device ID. More... | |
CHAR16 * | find_pci_class_name (UINT8 class_code[3]) |
Finds a PCI class and subclass name by 3-byte class code. More... | |
void | print_pci_devices () |
Prints a short description of all connected PCI devices. | |
void | print_known_pci_classes () |
Prints a list of known PCI classes and subclasses. More... | |
EFI_PCI_IO_PROTOCOL * | find_pci_device (UINT16 vendor_id, UINT16 device_id) |
Fetches a PCI device's protocol handle. More... | |
void | init_pci_lib () |
Initializes the PCI library. More... | |
void | shutdown_pci_lib () |
Shuts down the PCI library. More... | |
Functions for accessing PCI devices.
CHAR16* find_pci_device_name | ( | UINT16 | vendor_id, |
UINT16 | device_id, | ||
UINT16 | subvendor_id, | ||
UINT16 | subdevice_id | ||
) |
Looks up a PCI device's name by vendor ID and device ID.
Subvendor and subdevice IDs are not implemented yet, they will be ignored.
vendor_id | the device's vendor ID |
device_id | the device's device ID |
subvendor_id | ignored |
subdevice_id | ignored |
CHAR16* find_pci_class_name | ( | UINT8 | class_code[3] | ) |
Finds a PCI class and subclass name by 3-byte class code.
class_code | the PCI class code to look up |
void print_known_pci_classes | ( | ) |
Prints a list of known PCI classes and subclasses.
This is mostly for debugging.
EFI_PCI_IO_PROTOCOL* find_pci_device | ( | UINT16 | vendor_id, |
UINT16 | device_id | ||
) |
Fetches a PCI device's protocol handle.
This is currently the easiest way to access a specific PCI device.
vendor_id | the device's vendor ID |
device_id | the device's device ID |
void init_pci_lib | ( | ) |
Initializes the PCI library.
Call this before using the other library functions.
void shutdown_pci_lib | ( | ) |
Shuts down the PCI library.
Call this when you're done with PCI functions.