[Yellowstone] Move yellowstone yunq def to yellowstone/lib/

This commit is contained in:
Drew Galbraith 2023-10-24 23:49:42 -07:00
parent af0852a5fa
commit 4c2237fa72
13 changed files with 5 additions and 54 deletions

View File

@ -4,7 +4,6 @@
#include <mammoth/init.h>
#include <mammoth/port_client.h>
#include <stdint.h>
#include <yellowstone.h>
#include <yellowstone/yellowstone.yunq.client.h>
#include "ahci/ahci_driver.h"

View File

@ -22,14 +22,13 @@ set_target_properties(yellowstone PROPERTIES
add_library(yellowstone_yunq
include/yellowstone/yellowstone.yunq.cpp
include/yellowstone/yellowstone.yunq.client.cpp
include/yellowstone/yellowstone.yunq.server.cpp
lib/yellowstone/yellowstone.yunq.cpp
lib/yellowstone/yellowstone.yunq.client.cpp
lib/yellowstone/yellowstone.yunq.server.cpp
)
target_include_directories(yellowstone_yunq
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/lib")
target_link_libraries(yellowstone_yunq
denali_stub

View File

@ -1,24 +0,0 @@
#pragma once
#include <stdint.h>
const uint64_t kYellowstoneGetRegistration = 0x01;
const uint64_t kYellowstoneGetAhci = 0x02;
const uint64_t kYellowstoneGetDenali = 0x03;
struct YellowstoneGetReq {
uint64_t type;
};
struct YellowstoneGetRegistrationResp {};
struct YellowstoneGetAhciResp {
uint64_t type;
uint64_t ahci_length;
};
// Has a denali cap attached.
struct YellowstoneGetDenaliResp {
uint64_t type;
uint64_t device_id;
uint64_t lba_offset;
};

View File

@ -1,22 +0,0 @@
#pragma once
#include <denali/denali_client.h>
#include <mammoth/endpoint_client.h>
#include <mammoth/memory_region.h>
#include <mammoth/port_client.h>
#include <ztypes.h>
class YellowstoneStub {
public:
explicit YellowstoneStub(z_cap_t yellowstone_cap);
glcr::ErrorOr<MappedMemoryRegion> GetAhciConfig();
glcr::ErrorOr<ScopedDenaliClient> GetDenali();
[[nodiscard]] glcr::ErrorCode Register(glcr::String name,
const EndpointClient& client);
private:
glcr::UniquePtr<EndpointClient> yellowstone_stub_;
PortClient register_port_;
};

View File

@ -9,7 +9,6 @@
#include "hw/gpt.h"
#include "hw/pcie.h"
#include "include/yellowstone.h"
namespace {

View File

@ -7,7 +7,7 @@
#include <mammoth/thread.h>
#include "hw/pcie.h"
#include "include/yellowstone/yellowstone.yunq.server.h"
#include "lib/yellowstone/yellowstone.yunq.server.h"
class YellowstoneServer : public YellowstoneServerBase {
public: