[Yellowstone] Move yellowstone yunq def to yellowstone/lib/
This commit is contained in:
parent
af0852a5fa
commit
4c2237fa72
|
@ -4,7 +4,6 @@
|
||||||
#include <mammoth/init.h>
|
#include <mammoth/init.h>
|
||||||
#include <mammoth/port_client.h>
|
#include <mammoth/port_client.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <yellowstone.h>
|
|
||||||
#include <yellowstone/yellowstone.yunq.client.h>
|
#include <yellowstone/yellowstone.yunq.client.h>
|
||||||
|
|
||||||
#include "ahci/ahci_driver.h"
|
#include "ahci/ahci_driver.h"
|
||||||
|
|
|
@ -22,14 +22,13 @@ set_target_properties(yellowstone PROPERTIES
|
||||||
|
|
||||||
|
|
||||||
add_library(yellowstone_yunq
|
add_library(yellowstone_yunq
|
||||||
include/yellowstone/yellowstone.yunq.cpp
|
lib/yellowstone/yellowstone.yunq.cpp
|
||||||
include/yellowstone/yellowstone.yunq.client.cpp
|
lib/yellowstone/yellowstone.yunq.client.cpp
|
||||||
include/yellowstone/yellowstone.yunq.server.cpp
|
lib/yellowstone/yellowstone.yunq.server.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(yellowstone_yunq
|
target_include_directories(yellowstone_yunq
|
||||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/lib")
|
||||||
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
|
||||||
|
|
||||||
target_link_libraries(yellowstone_yunq
|
target_link_libraries(yellowstone_yunq
|
||||||
denali_stub
|
denali_stub
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
|
@ -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_;
|
|
||||||
};
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#include "hw/gpt.h"
|
#include "hw/gpt.h"
|
||||||
#include "hw/pcie.h"
|
#include "hw/pcie.h"
|
||||||
#include "include/yellowstone.h"
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#include <mammoth/thread.h>
|
#include <mammoth/thread.h>
|
||||||
|
|
||||||
#include "hw/pcie.h"
|
#include "hw/pcie.h"
|
||||||
#include "include/yellowstone/yellowstone.yunq.server.h"
|
#include "lib/yellowstone/yellowstone.yunq.server.h"
|
||||||
|
|
||||||
class YellowstoneServer : public YellowstoneServerBase {
|
class YellowstoneServer : public YellowstoneServerBase {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue