[Yellowstone] Add a method to get the framebuffer info from yellowstone.
This commit is contained in:
parent
d13e1a238f
commit
9e05b3b3dd
10 changed files with 267 additions and 8 deletions
|
|
@ -4,6 +4,7 @@
|
|||
#include <glacier/string/string.h>
|
||||
#include <mammoth/debug.h>
|
||||
#include <mammoth/init.h>
|
||||
#include <mammoth/memory_region.h>
|
||||
#include <mammoth/process.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
@ -57,6 +58,29 @@ glcr::ErrorCode YellowstoneServer::HandleGetAhciInfo(const Empty&,
|
|||
return glcr::OK;
|
||||
}
|
||||
|
||||
glcr::ErrorCode YellowstoneServer::HandleGetFramebufferInfo(
|
||||
const Empty&, FramebufferInfo& info) {
|
||||
// FIXME: Don't do this for each request.
|
||||
MappedMemoryRegion region =
|
||||
MappedMemoryRegion::FromCapability(gBootFramebufferVmmoCap);
|
||||
ZFramebufferInfo* fb = reinterpret_cast<ZFramebufferInfo*>(region.vaddr());
|
||||
|
||||
info.set_address_phys(fb->address_phys);
|
||||
info.set_width(fb->width);
|
||||
info.set_height(fb->height);
|
||||
info.set_pitch(fb->pitch);
|
||||
info.set_bpp(fb->bpp);
|
||||
info.set_memory_model(fb->memory_model);
|
||||
info.set_red_mask_size(fb->red_mask_size);
|
||||
info.set_red_mask_shift(fb->red_mask_shift);
|
||||
info.set_green_mask_size(fb->green_mask_size);
|
||||
info.set_green_mask_shift(fb->green_mask_shift);
|
||||
info.set_blue_mask_size(fb->blue_mask_size);
|
||||
info.set_blue_mask_shift(fb->blue_mask_shift);
|
||||
|
||||
return glcr::OK;
|
||||
}
|
||||
|
||||
glcr::ErrorCode YellowstoneServer::HandleGetDenali(const Empty&,
|
||||
DenaliInfo& info) {
|
||||
z_cap_t new_denali;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue