#pragma once #include #include #include #include #include #include #include "hw/pcie.h" #include "lib/yellowstone/yellowstone.yunq.server.h" class YellowstoneServer : public YellowstoneServerBase { public: static glcr::ErrorOr> Create(); glcr::ErrorCode HandleGetAhciInfo(const Empty&, AhciInfo&) override; glcr::ErrorCode HandleGetFramebufferInfo(const Empty&, FramebufferInfo&) override; glcr::ErrorCode HandleGetDenali(const Empty&, DenaliInfo&) override; glcr::ErrorCode HandleRegisterEndpoint(const RegisterEndpointRequest&, Empty&) override; glcr::ErrorCode HandleGetEndpoint(const GetEndpointRequest&, Endpoint&) override; void WaitDenaliRegistered(); void WaitVictoriaFallsRegistered(); private: glcr::HashMap endpoint_map_; uint64_t device_id_ = 0; uint64_t lba_offset_ = 0; glcr::SharedPtr vfs_client_; PciReader pci_reader_; mmth::Semaphore has_denali_semaphore_; mmth::Semaphore has_victoriafalls_semaphore_; YellowstoneServer(z_cap_t endpoint_cap); };