VGAConsole.cpp 594 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <Kernel/Graphics/Console/VGAConsole.h>
  7. #include <Kernel/Sections.h>
  8. namespace Kernel::Graphics {
  9. UNMAP_AFTER_INIT VGAConsole::VGAConsole(const VGACompatibleAdapter& adapter, Mode mode, size_t width, size_t height)
  10. : Console(width, height)
  11. , m_vga_region(MM.allocate_kernel_region(PhysicalAddress(0xa0000), Memory::page_round_up(0xc0000 - 0xa0000), "VGA Display", Memory::Region::Access::ReadWrite).release_nonnull())
  12. , m_adapter(adapter)
  13. , m_mode(mode)
  14. {
  15. }
  16. }