Endpoint syscalls implemented

This commit is contained in:
Drew Galbraith 2023-06-21 23:14:42 -07:00
parent 69501bfe01
commit c064af5fa7
27 changed files with 391 additions and 42 deletions

View file

@ -1,24 +1,26 @@
#pragma once
#include <glacier/status/error.h>
#include <mammoth/endpoint_server.h>
#include "ahci/ahci_driver.h"
#include "denali/denali.h"
class DenaliServer {
public:
DenaliServer(uint64_t channel_cap, AhciDriver& driver);
DenaliServer(EndpointServer server, AhciDriver& driver);
glcr::ErrorCode RunServer();
void HandleResponse(uint64_t lba, uint64_t size, uint64_t cap);
void HandleResponse(z_cap_t reply_port, uint64_t lba, uint64_t size,
z_cap_t cap);
private:
static const uint64_t kBuffSize = 1024;
uint64_t channel_cap_;
EndpointServer server_;
uint8_t read_buffer_[kBuffSize];
AhciDriver& driver_;
glcr::ErrorCode HandleRead(const DenaliRead& read);
glcr::ErrorCode HandleRead(const DenaliRead& read, z_cap_t reply_port);
};