blob: a6b270a17d9eded87718684c8d809e3b099d8fd1 (
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/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;
}
}
|