kern: implement smmu init

This commit is contained in:
Michael Scire 2020-02-15 00:00:35 -08:00
parent 2c496e94d5
commit 30d6b359f9
21 changed files with 1368 additions and 36 deletions

View file

@ -16,6 +16,7 @@
#pragma once
#include <vapours.hpp>
#include <mesosphere/arch/arm64/kern_cpu_system_registers.hpp>
#include <mesosphere/arch/arm64/kern_userspace_memory_access.hpp>
namespace ams::kern::arch::arm64::cpu {
@ -156,6 +157,11 @@ namespace ams::kern::arch::arm64::cpu {
void FlushEntireDataCacheSharedForInit();
void FlushEntireDataCacheLocalForInit();
Result InvalidateDataCache(void *addr, size_t size);
Result StoreDataCache(const void *addr, size_t size);
Result FlushDataCache(const void *addr, size_t size);
Result InvalidateInstructionCache(void *addr, size_t size);
ALWAYS_INLINE void ClearPageToZero(void *page) {
MESOSPHERE_ASSERT(util::IsAligned(reinterpret_cast<uintptr_t>(page), PageSize));
MESOSPHERE_ASSERT(page != nullptr);