diff options
Diffstat (limited to 'Kernel/Arch/aarch64/MMIO.cpp')
-rw-r--r-- | Kernel/Arch/aarch64/MMIO.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Kernel/Arch/aarch64/MMIO.cpp b/Kernel/Arch/aarch64/MMIO.cpp new file mode 100644 index 0000000000..a6b270a17d --- /dev/null +++ b/Kernel/Arch/aarch64/MMIO.cpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2021, Nico Weber <thakis@chromium.org> + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include <Kernel/Arch/aarch64/MMIO.h> +#include <Kernel/Arch/aarch64/MainIdRegister.h> + +namespace Prekernel { + +MMIO::MMIO() + : m_base_address(0xFE00'0000) +{ + MainIdRegister id; + if (id.part_num() <= MainIdRegister::RaspberryPi3) + m_base_address = 0x3F00'0000; +} + +MMIO& MMIO::the() +{ + static MMIO instance; + return instance; +} + +} |