blob: 5a63b72f3733a2a00772469d45f906d62a791950 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/*
* 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 {
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;
}
}
|