Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
pcie.c File Reference
#include "hal/acpi/acpi.h"
#include "hal/cpu/paging.h"
#include "hal/pci/pci.h"
#include "libk/serial.h"
#include <type.h>
#include "memory/vm_manager.h"
#include <hal/pci/pcie.h>

Go to the source code of this file.

Functions

static uint32_t ecam_read32 (uintptr_t base, uint8_t bus, uint8_t dev, uint8_t func, uint16_t offset)
 
static void ecam_write32 (uintptr_t base, uint8_t bus, uint8_t dev, uint8_t func, uint16_t offset, uint32_t val)
 
void register_segment (uint16_t seg_id, uint8_t start, uint8_t end, uintptr_t vbase, pci_access_ops_t *ops, PCI_SEGMENT_TYPE type)
 
void mcfg_parse (uintptr_t addr)
 

Variables

static pci_access_ops_t ecam_ops
 
boolean_t has_ecam = 0
 

Function Documentation

◆ ecam_read32()

static uint32_t ecam_read32 ( uintptr_t base,
uint8_t bus,
uint8_t dev,
uint8_t func,
uint16_t offset )
static

Definition at line 9 of file pcie.c.

References addr, base, and offset.

◆ ecam_write32()

static void ecam_write32 ( uintptr_t base,
uint8_t bus,
uint8_t dev,
uint8_t func,
uint16_t offset,
uint32_t val )
static

Definition at line 17 of file pcie.c.

References addr, base, and offset.

◆ mcfg_parse()

◆ register_segment()

void register_segment ( uint16_t seg_id,
uint8_t start,
uint8_t end,
uintptr_t vbase,
pci_access_ops_t * ops,
PCI_SEGMENT_TYPE type )
extern

Definition at line 26 of file scan.c.

Referenced by mcfg_parse(), and pci_scan().

Variable Documentation

◆ ecam_ops

pci_access_ops_t ecam_ops
static
Initial value:
= {
.read32 = ecam_read32,
.write32 = ecam_write32,
}
static uint32_t ecam_read32(uintptr_t base, uint8_t bus, uint8_t dev, uint8_t func, uint16_t offset)
Definition pcie.c:9
static void ecam_write32(uintptr_t base, uint8_t bus, uint8_t dev, uint8_t func, uint16_t offset, uint32_t val)
Definition pcie.c:17

Definition at line 25 of file pcie.c.

Referenced by mcfg_parse().

◆ has_ecam

boolean_t has_ecam = 0

Definition at line 34 of file pcie.c.

Referenced by mcfg_parse(), and pci_scan().