[yellowstone] Add a way to retrieve to denali client from yellowstone
This commit is contained in:
parent
b83385dfa6
commit
29d9923f5a
10 changed files with 99 additions and 7 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "include/yellowstone_stub.h"
|
||||
|
||||
#include <denali/denali_client.h>
|
||||
|
||||
#include "include/yellowstone.h"
|
||||
|
||||
namespace {
|
||||
|
|
@ -22,6 +24,19 @@ glcr::ErrorOr<MappedMemoryRegion> YellowstoneStub::GetAhciConfig() {
|
|||
return MappedMemoryRegion::DirectPhysical(resp.ahci_phys_offset, kPciSize);
|
||||
}
|
||||
|
||||
glcr::ErrorOr<ScopedDenaliClient> YellowstoneStub::GetDenali() {
|
||||
YellowstoneGetReq req{
|
||||
.type = kYellowstoneGetDenali,
|
||||
};
|
||||
ASSIGN_OR_RETURN(
|
||||
auto resp_and_cap,
|
||||
(yellowstone_stub_->CallEndpointGetCap<YellowstoneGetReq,
|
||||
YellowstoneGetDenaliResp>(req)));
|
||||
return ScopedDenaliClient(
|
||||
EndpointClient::AdoptEndpoint(resp_and_cap.second()), 0,
|
||||
resp_and_cap.first().lba_offset);
|
||||
}
|
||||
|
||||
glcr::ErrorCode YellowstoneStub::Register(glcr::String name,
|
||||
const EndpointClient& client) {
|
||||
if (register_port_.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue