1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:18:11 +00:00

Switch into 1024x768x32bpp VESA LFB mode at boot.

This is going to be pretty cool once I can hook up the Widgets/ code to it.
This commit is contained in:
Andreas Kling 2019-01-09 02:29:11 +01:00
parent 9963da9005
commit 659c54e32b
9 changed files with 172 additions and 2 deletions

View file

@ -652,6 +652,12 @@ RetainPtr<VMObject> VMObject::create_anonymous(size_t size)
return adopt(*new VMObject(size));
}
RetainPtr<VMObject> VMObject::create_framebuffer_wrapper(PhysicalAddress paddr, size_t size)
{
size = ceilDiv(size, PAGE_SIZE) * PAGE_SIZE;
return adopt(*new VMObject(paddr, size));
}
RetainPtr<VMObject> VMObject::clone()
{
return adopt(*new VMObject(*this));
@ -676,6 +682,18 @@ VMObject::VMObject(size_t size)
m_physical_pages.resize(page_count());
}
VMObject::VMObject(PhysicalAddress paddr, size_t size)
: m_anonymous(true)
, m_size(size)
{
MM.register_vmo(*this);
for (size_t i = 0; i < size; i += PAGE_SIZE) {
m_physical_pages.append(adopt(*new PhysicalPage(paddr.offset(i), false)));
}
ASSERT(m_physical_pages.size() == page_count());
}
VMObject::VMObject(RetainPtr<Vnode>&& vnode, size_t size)
: m_size(size)
, m_vnode(move(vnode))