Revert "[Zion][Yellowstone] First pass at adding PCI ioport access."
This reverts commit b677633248.
This commit is contained in:
parent
b51d5966d4
commit
bddf26b645
16 changed files with 199 additions and 337 deletions
|
|
@ -1,44 +0,0 @@
|
|||
#include "syscall/pci.h"
|
||||
|
||||
#include "object/pci_port.h"
|
||||
#include "scheduler/scheduler.h"
|
||||
|
||||
z_err_t PciRead(ZPciReadReq* req) {
|
||||
auto& curr_proc = gScheduler->CurrentProcess();
|
||||
auto pci_cap = curr_proc.GetCapability(req->pci_cap);
|
||||
RET_ERR(ValidateCapability<PciPort>(pci_cap, kZionPerm_Read));
|
||||
|
||||
*req->output = pci_cap->obj<PciPort>()->ReadAtOffset(req->bus, req->slot,
|
||||
req->func, req->offset);
|
||||
|
||||
return glcr::OK;
|
||||
}
|
||||
|
||||
z_err_t PciCreateBound(ZPciCreateBoundReq* req) {
|
||||
auto& curr_proc = gScheduler->CurrentProcess();
|
||||
auto pci_cap = curr_proc.GetCapability(req->pci_cap);
|
||||
RET_ERR(ValidateCapability<PciPort>(pci_cap, kZionPerm_Duplicate));
|
||||
|
||||
*req->new_cap = curr_proc.AddNewCapability(
|
||||
PciPortBound::Create(req->bus, req->slot, req->func));
|
||||
return glcr::OK;
|
||||
}
|
||||
|
||||
z_err_t PciReadBound(ZPciReadBoundReq* req) {
|
||||
auto& curr_proc = gScheduler->CurrentProcess();
|
||||
auto pci_cap = curr_proc.GetCapability(req->pci_cap);
|
||||
RET_ERR(ValidateCapability<PciPortBound>(pci_cap, kZionPerm_Read));
|
||||
|
||||
*req->data = pci_cap->obj<PciPortBound>()->Read(req->offset);
|
||||
|
||||
return glcr::OK;
|
||||
}
|
||||
z_err_t PciWriteBound(ZPciWriteBoundReq* req) {
|
||||
auto& curr_proc = gScheduler->CurrentProcess();
|
||||
auto pci_cap = curr_proc.GetCapability(req->pci_cap);
|
||||
RET_ERR(ValidateCapability<PciPortBound>(pci_cap, kZionPerm_Write));
|
||||
|
||||
pci_cap->obj<PciPortBound>()->Write(req->offset, req->data);
|
||||
|
||||
return glcr::OK;
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#include "include/zcall.h"
|
||||
|
||||
z_err_t PciRead(ZPciReadReq* req);
|
||||
z_err_t PciCreateBound(ZPciCreateBoundReq* req);
|
||||
z_err_t PciReadBound(ZPciReadBoundReq* req);
|
||||
z_err_t PciWriteBound(ZPciWriteBoundReq* req);
|
||||
Loading…
Add table
Add a link
Reference in a new issue