The Header files for actual PCI source.
More...
#include <basics.h>
#include <hal.h>
#include <graphics.h>
#include <drivers/rtl8139.h>
#include <debugger.h>
#include <ahci.h>
#include <nvme.h>
#include <isr.h>
#include <pci_id.h>
Go to the source code of this file.
|
| typedef void(* | pci_probe_fn) (uint8_t bus, uint8_t slot, uint8_t function) |
|
| int16 | pci_read_word (int16 bus, int16 slot, int16 func, int16 offset) |
| | Read a 16-bit value from a PCI configuration register.
|
| int16 | getVendorID (int16 bus, int16 device, int16 function) |
| | Gets the Vendor ID from PCI.
|
| int16 | getDeviceID (int16 bus, int16 device, int16 function) |
| | Gets the Device ID from PCI.
|
| int16 | getClassId (int16 bus, int16 device, int16 function) |
| | Gets the Class ID from PCI.
|
| int16 | getSubClassId (int16 bus, int16 device, int16 function) |
| | Gets the Sub-class ID from PCI.
|
|
int8 | getProgIF (int16 bus, int16 device, int16 function) |
|
void | probe_pci () |
| | Scans (Probes) PCI Devices.
|
| int32 | pci_config_read_dword (int8 bus, int8 slot, int8 func, int8 offset) |
| | Function to read a 32-bit value from the PCI configuration space.
|
|
void | pci_config_write_dword (int8 bus, int8 slot, int8 func, int8 offset, uint32_t value) |
| int32 | get_ahci_bar_address (int8 bus, int slot, int func, int bar_num) |
| | Gets the AHCI bar address.
|
|
|
cstring | display_adapter_name |
|
cstring | GPUName [1] |
|
string | using_graphics_card |
|
int64 * | graphics_base_Address |
|
int | total_devices |
The Header files for actual PCI source.
- Author
- Pradosh (prado.nosp@m.shga.nosp@m.me@gm.nosp@m.ail..nosp@m.com)
- Version
- 0.1
- Date
- 2023-10-29
- Copyright
- Copyright (c) Pradosh 2023
Definition in file pci.h.
◆ PCI_CONFIG_ADDRESS
| #define PCI_CONFIG_ADDRESS 0xCF8 |
Definition at line 33 of file pci.h.
◆ PCI_CONFIG_DATA
| #define PCI_CONFIG_DATA 0xCFC |
Definition at line 34 of file pci.h.
◆ pci_probe_fn
| typedef void(* pci_probe_fn) (uint8_t bus, uint8_t slot, uint8_t function) |
Definition at line 36 of file pci.h.
◆ get_ahci_bar_address()
| int32 get_ahci_bar_address |
( |
int8 | bus, |
|
|
int | slot, |
|
|
int | func, |
|
|
int | bar_num ) |
Gets the AHCI bar address.
- Parameters
-
| bus | The PCI bus number. |
| slot | The PCI slot number. |
| func | The PCI function number. |
| bar_num | The Base Address Register Number. |
- Returns
- int32
◆ getClassId()
| int16 getClassId |
( |
int16 | bus, |
|
|
int16 | device, |
|
|
int16 | function ) |
Gets the Class ID from PCI.
- Parameters
-
- Returns
- int16 Class ID
◆ getDeviceID()
| int16 getDeviceID |
( |
int16 | bus, |
|
|
int16 | device, |
|
|
int16 | function ) |
Gets the Device ID from PCI.
- Parameters
-
- Returns
- int16 Device ID
◆ getSubClassId()
| int16 getSubClassId |
( |
int16 | bus, |
|
|
int16 | device, |
|
|
int16 | function ) |
Gets the Sub-class ID from PCI.
- Parameters
-
- Returns
- int16 Sub-class ID
◆ getVendorID()
| int16 getVendorID |
( |
int16 | bus, |
|
|
int16 | device, |
|
|
int16 | function ) |
Gets the Vendor ID from PCI.
- Parameters
-
- Returns
- int16 Vendor ID
◆ pci_config_read_dword()
| int32 pci_config_read_dword |
( |
int8 | bus, |
|
|
int8 | slot, |
|
|
int8 | func, |
|
|
int8 | offset ) |
Function to read a 32-bit value from the PCI configuration space.
- Parameters
-
- Returns
- int32
◆ pci_read_word()
| int16 pci_read_word |
( |
int16 | bus, |
|
|
int16 | slot, |
|
|
int16 | func, |
|
|
int16 | offset ) |
Read a 16-bit value from a PCI configuration register.
This function reads a 16-bit value from a specified PCI configuration register using the provided bus, slot, function, and offset parameters.
- Parameters
-
| bus | The PCI bus number. |
| slot | The PCI slot number. |
| func | The PCI function number. |
| offset | The offset within the PCI configuration register to read. |
- Returns
- The 16-bit value read from the specified PCI configuration register.