1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:17:34 +00:00
serenity/Kernel/Arch/aarch64/RPi/MMIO.cpp
Andrew Kaster 3a01573350 Revert "Kernel: Migrate ‘main id registerʼ access in Aarch64 MMIO"
This patch needed more review than it got.

This reverts commit a6526cd90c.
2023-02-17 11:29:33 -07:00

26 lines
481 B
C++

/*
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/aarch64/MainIdRegister.h>
#include <Kernel/Arch/aarch64/RPi/MMIO.h>
namespace Kernel::RPi {
MMIO::MMIO()
: m_base_address(0xFE00'0000)
{
MainIdRegister id;
if (id.part_num() <= MainIdRegister::RaspberryPi3)
m_base_address = PhysicalAddress(0x3F00'0000);
}
MMIO& MMIO::the()
{
static MMIO instance;
return instance;
}
}