summaryrefslogtreecommitdiff
path: root/Kernel/Graphics/Console
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-06 22:25:00 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-06 22:25:00 +0200
commit2cd8b21974993052fdcb0bddfa62423dbeb6002a (patch)
tree25a7b2de5cf157d17ae71224cf3ae3ee3574959c /Kernel/Graphics/Console
parent47bdd7c3a01b7e21e56a5d1dd40b18e9ed43f466 (diff)
downloadserenity-2cd8b21974993052fdcb0bddfa62423dbeb6002a.zip
Kernel: Add convenience values to the Memory::Region::Access enum
Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite` you can now say `Memory::Region::Access::ReadWrite`.
Diffstat (limited to 'Kernel/Graphics/Console')
-rw-r--r--Kernel/Graphics/Console/ContiguousFramebufferConsole.cpp2
-rw-r--r--Kernel/Graphics/Console/VGAConsole.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Graphics/Console/ContiguousFramebufferConsole.cpp b/Kernel/Graphics/Console/ContiguousFramebufferConsole.cpp
index fe74603f72..21f38dda84 100644
--- a/Kernel/Graphics/Console/ContiguousFramebufferConsole.cpp
+++ b/Kernel/Graphics/Console/ContiguousFramebufferConsole.cpp
@@ -28,7 +28,7 @@ void ContiguousFramebufferConsole::set_resolution(size_t width, size_t height, s
m_pitch = pitch;
dbgln("Framebuffer Console: taking {} bytes", Memory::page_round_up(pitch * height));
- m_framebuffer_region = MM.allocate_kernel_region(m_framebuffer_address, Memory::page_round_up(pitch * height), "Framebuffer Console", Memory::Region::Access::Read | Memory::Region::Access::Write, Memory::Region::Cacheable::Yes);
+ m_framebuffer_region = MM.allocate_kernel_region(m_framebuffer_address, Memory::page_round_up(pitch * height), "Framebuffer Console", Memory::Region::Access::ReadWrite, Memory::Region::Cacheable::Yes);
VERIFY(m_framebuffer_region);
// Just to start cleanly, we clean the entire framebuffer
diff --git a/Kernel/Graphics/Console/VGAConsole.cpp b/Kernel/Graphics/Console/VGAConsole.cpp
index cdd5e08db3..d7eba0a91f 100644
--- a/Kernel/Graphics/Console/VGAConsole.cpp
+++ b/Kernel/Graphics/Console/VGAConsole.cpp
@@ -11,7 +11,7 @@ namespace Kernel::Graphics {
UNMAP_AFTER_INIT VGAConsole::VGAConsole(const VGACompatibleAdapter& adapter, Mode mode, size_t width, size_t height)
: Console(width, height)
- , m_vga_region(MM.allocate_kernel_region(PhysicalAddress(0xa0000), Memory::page_round_up(0xc0000 - 0xa0000), "VGA Display", Memory::Region::Access::Read | Memory::Region::Access::Write).release_nonnull())
+ , m_vga_region(MM.allocate_kernel_region(PhysicalAddress(0xa0000), Memory::page_round_up(0xc0000 - 0xa0000), "VGA Display", Memory::Region::Access::ReadWrite).release_nonnull())
, m_adapter(adapter)
, m_mode(mode)
{