Add a yellowstone stub and partially migrate denali
This commit is contained in:
parent
318356e54c
commit
72483a3437
6 changed files with 57 additions and 29 deletions
|
|
@ -1,3 +1,23 @@
|
|||
// PLACEHOLDER
|
||||
#include <stdint.h>
|
||||
uint64_t a = 0;
|
||||
#include "include/yellowstone_stub.h"
|
||||
|
||||
#include "include/yellowstone.h"
|
||||
|
||||
namespace {
|
||||
|
||||
const uint64_t kPciSize = 0x1000;
|
||||
|
||||
} // namespace
|
||||
|
||||
YellowstoneStub::YellowstoneStub(z_cap_t yellowstone_cap)
|
||||
: yellowstone_stub_(EndpointClient::AdoptEndpoint(yellowstone_cap)) {}
|
||||
|
||||
glcr::ErrorOr<MappedMemoryRegion> YellowstoneStub::GetAhciConfig() {
|
||||
YellowstoneGetReq req{
|
||||
.type = kYellowstoneGetAhci,
|
||||
};
|
||||
ASSIGN_OR_RETURN(
|
||||
YellowstoneGetAhciResp resp,
|
||||
(yellowstone_stub_
|
||||
->CallEndpoint<YellowstoneGetReq, YellowstoneGetAhciResp>(req)));
|
||||
return MappedMemoryRegion::DirectPhysical(resp.ahci_phys_offset, kPciSize);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue