XenevaOS
Loading...
Searching...
No Matches
Functions
pcie.cpp File Reference
#include <pcie.h>
#include <Hal\hal.h>
#include <Hal\basicacpi.h>
#include <Hal\x86_64_cpu.h>
#include <aucon.h>
Include dependency graph for pcie.cpp:

Functions

uint64_t AuPCIEGetDevice (uint16_t seg, int bus, int dev, int func)
 
uint32_t AuPCIERead (uint64_t device, int reg, int bus, int dev, int func)
 
uint64_t AuPCIERead64 (uint64_t device, int reg, int size, int bus, int dev, int func)
 
void AuPCIEWrite (uint64_t device, int reg, uint32_t val, int bus, int dev, int func)
 
void AuPCIEWrite64 (uint64_t device, int reg, int size, uint64_t val, int bus, int dev, int func)
 
uint64_t AuPCIEScanClass (uint8_t classCode, uint8_t subClassCode, int *bus_, int *dev_, int *func_)
 
uint64_t AuPCIEScanClassIF (uint8_t classCode, uint8_t subClassCode, uint8_t progIf, int *bus_, int *dev_, int *func_)
 
bool AuPCIEAllocMSI (uint64_t device, size_t vector, int bus, int dev, int func)
 

Function Documentation

◆ AuPCIEAllocMSI()

bool AuPCIEAllocMSI ( uint64_t  device,
size_t  vector,
int  bus,
int  dev,
int  func 
)

◆ AuPCIEGetDevice()

uint64_t AuPCIEGetDevice ( uint16_t  seg,
int  bus,
int  dev,
int  func 
)

BSD 2-Clause License

Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

◆ AuPCIERead()

uint32_t AuPCIERead ( uint64_t  device,
int  reg,
int  bus,
int  dev,
int  func 
)

◆ AuPCIERead64()

uint64_t AuPCIERead64 ( uint64_t  device,
int  reg,
int  size,
int  bus,
int  dev,
int  func 
)

◆ AuPCIEScanClass()

uint64_t AuPCIEScanClass ( uint8_t  classCode,
uint8_t  subClassCode,
int *  bus_,
int *  dev_,
int *  func_ 
)

◆ AuPCIEScanClassIF()

uint64_t AuPCIEScanClassIF ( uint8_t  classCode,
uint8_t  subClassCode,
uint8_t  progIf,
int *  bus_,
int *  dev_,
int *  func_ 
)

◆ AuPCIEWrite()

void AuPCIEWrite ( uint64_t  device,
int  reg,
uint32_t  val,
int  bus,
int  dev,
int  func 
)

◆ AuPCIEWrite64()

void AuPCIEWrite64 ( uint64_t  device,
int  reg,
int  size,
uint64_t  val,
int  bus,
int  dev,
int  func 
)