[yellowstone] Add registration to yellowstone stub.
This commit is contained in:
parent
72483a3437
commit
c057da88ad
5 changed files with 27 additions and 16 deletions
|
|
@ -21,3 +21,19 @@ glcr::ErrorOr<MappedMemoryRegion> YellowstoneStub::GetAhciConfig() {
|
|||
->CallEndpoint<YellowstoneGetReq, YellowstoneGetAhciResp>(req)));
|
||||
return MappedMemoryRegion::DirectPhysical(resp.ahci_phys_offset, kPciSize);
|
||||
}
|
||||
|
||||
glcr::ErrorCode YellowstoneStub::Register(glcr::String name,
|
||||
const EndpointClient& client) {
|
||||
if (register_port_.empty()) {
|
||||
YellowstoneGetReq req{
|
||||
.type = kYellowstoneGetRegistration,
|
||||
};
|
||||
ASSIGN_OR_RETURN(
|
||||
auto resp_cap,
|
||||
(yellowstone_stub_->CallEndpointGetCap<
|
||||
YellowstoneGetReq, YellowstoneGetRegistrationResp>(req)));
|
||||
register_port_ = PortClient::AdoptPort(resp_cap.second());
|
||||
}
|
||||
|
||||
return register_port_.WriteString(name, client.GetCap());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue