blob: 0528a8e3bb1dfa67a9236e10f2fa3bda8c06a76f (
plain) (
blame)
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
|
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/device_memory.h"
#include "hle/kernel/board/nintendo/nx/k_system_control.h"
namespace Core {
#ifdef ARCHITECTURE_arm64
constexpr size_t VirtualReserveSize = 1ULL << 38;
#else
constexpr size_t VirtualReserveSize = 1ULL << 39;
#endif
DeviceMemory::DeviceMemory(bool direct_mapped_address)
: buffer{Kernel::Board::Nintendo::Nx::KSystemControl::Init::GetIntendedMemorySize(),
VirtualReserveSize} {
if (direct_mapped_address) {
buffer.EnableDirectMappedAddress();
}
}
DeviceMemory::~DeviceMemory() = default;
} // namespace Core
|