mirror of
https://github.com/skyline-emu/skyline.git
synced 2025-01-09 14:59:30 +01:00
Hookup FlatMemoryManager for SMMU into SoC
The SMMU is used to control the mappings of peripherals such as the VIC and NVDEC.
This commit is contained in:
parent
97dc053ffd
commit
a0c57256cc
@ -135,6 +135,7 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/gpu/presentation_engine.cpp
|
||||
${source_DIR}/skyline/gpu/interconnect/command_executor.cpp
|
||||
${source_DIR}/skyline/gpu/interconnect/command_nodes.cpp
|
||||
${source_DIR}/skyline/soc/smmu.cpp
|
||||
${source_DIR}/skyline/soc/host1x/syncpoint.cpp
|
||||
${source_DIR}/skyline/soc/gm20b/channel.cpp
|
||||
${source_DIR}/skyline/soc/gm20b/gpfifo.cpp
|
||||
|
@ -3,16 +3,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "soc/smmu.h"
|
||||
#include "soc/host1x.h"
|
||||
#include "soc/gm20b/gpfifo.h"
|
||||
|
||||
namespace skyline::soc {
|
||||
/**
|
||||
* @brief An interface into all emulated components of the Tegra X1 SoC
|
||||
* @note Refer to the Tegra X1 Processor Block Diagram (1.2) for more information
|
||||
* @note Refer to the Tegra X1 Processor Block Diagram (1.2) in the TRM for more information
|
||||
*/
|
||||
class SOC {
|
||||
public:
|
||||
SMMU smmu;
|
||||
host1x::Host1X host1x;
|
||||
|
||||
SOC(const DeviceState &state) {}
|
||||
|
10
app/src/main/cpp/skyline/soc/smmu.cpp
Normal file
10
app/src/main/cpp/skyline/soc/smmu.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include <common/address_space.inc>
|
||||
#include "smmu.h"
|
||||
|
||||
namespace skyline {
|
||||
template class FlatAddressSpaceMap<u32, 0, u8 *, nullptr, true, soc::SmmuAddressSpaceBits>;
|
||||
template class FlatMemoryManager<u32, 0, soc::SmmuAddressSpaceBits>;
|
||||
}
|
16
app/src/main/cpp/skyline/soc/smmu.h
Normal file
16
app/src/main/cpp/skyline/soc/smmu.h
Normal file
@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2021 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <common/address_space.h>
|
||||
|
||||
namespace skyline::soc {
|
||||
static constexpr u8 SmmuAddressSpaceBits{32}; //!< The size of the SMMU AS in bits
|
||||
|
||||
/**
|
||||
* @brief The SMMU (System Memory Management Unit) class handles mapping between the host1x peripheral virtual address space and an application's address space
|
||||
* @note The SMMU is implemented entirely as a template specialization over FlatMemoryManager
|
||||
*/
|
||||
using SMMU = FlatMemoryManager<u32, 0, SmmuAddressSpaceBits>;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user