FrostWing
A lightweight raw-control operating system.
Loading...
Searching...
No Matches
pci_id.h File Reference

The list of all officially recognized devices. More...

#include <basics.h>
Include dependency graph for pci_id.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pci_id_entry_t

Macros

#define MAX_PCI_DEVICES   512

Typedefs

typedef void(* pci_probe_fn) (uint8_t bus, uint8_t slot, uint8_t function)

Functions

string parse_vendor (int16 vendor)
 Gets the vendor id and gives the appropriate name.
string parse_class (int16 classid)
 Gets the class id and gives the appropriate class name.
const pci_id_entry_tpci_lookup (uint16_t vendor, uint16_t device, uint8_t classid)
 A Simplified and clean PCI lookup function.
void probe_ahci (uint8_t bus, uint8_t slot, uint8_t function)
 Finds the AHCI BAR and handles it.
void probe_rtl8139 (uint8_t bus, uint8_t slot, uint8_t function)
 Finds the RTL8139 card and handles it.
cstring auto_name_gpu (uint16_t vendor, uint16_t device)
 Automatically names the unknown GPU with vendor name and its device id.

Detailed Description

The list of all officially recognized devices.

Author
Pradosh (prado.nosp@m.shga.nosp@m.me@gm.nosp@m.ail..nosp@m.com)
Version
0.1
Date
2025-12-27

Definition in file pci_id.h.

Macro Definition Documentation

◆ MAX_PCI_DEVICES

#define MAX_PCI_DEVICES   512

Definition at line 17 of file pci_id.h.

Typedef Documentation

◆ pci_probe_fn

typedef void(* pci_probe_fn) (uint8_t bus, uint8_t slot, uint8_t function)

Definition at line 19 of file pci_id.h.

Function Documentation

◆ auto_name_gpu()

cstring auto_name_gpu ( uint16_t vendor,
uint16_t device )

Automatically names the unknown GPU with vendor name and its device id.

Parameters
vendorthe vendor id.
devicedevide id.
Returns
cstring; gpu name.

◆ parse_class()

string parse_class ( int16 classid)

Gets the class id and gives the appropriate class name.

Parameters
classidclass id
Returns
string class name

◆ parse_vendor()

string parse_vendor ( int16 vendor)

Gets the vendor id and gives the appropriate name.

Parameters
vendorvendor id
Returns
string vendor name

◆ pci_lookup()

const pci_id_entry_t * pci_lookup ( uint16_t vendor,
uint16_t device,
uint8_t classid )

A Simplified and clean PCI lookup function.

Parameters
vendorThe vendor id.
deviceThe device id.
classidThe class id.
Returns
const pci_id_entry_t*;s

◆ probe_ahci()

void probe_ahci ( uint8_t bus,
uint8_t slot,
uint8_t function )

Finds the AHCI BAR and handles it.

Parameters
bus
slot
function

◆ probe_rtl8139()

void probe_rtl8139 ( uint8_t bus,
uint8_t slot,
uint8_t function )

Finds the RTL8139 card and handles it.

Parameters
bus
slot
function