fusee_cpp: implement cpu startup

This commit is contained in:
Michael Scire 2021-09-01 18:10:48 -07:00 committed by SciresM
parent 648ad51056
commit 40e2d4bbe6
12 changed files with 282 additions and 19 deletions

View file

@ -26,4 +26,15 @@ namespace ams::hw::arch::arm64 {
}
}
void InvalidateDataCache(const void *ptr, size_t size) {
const uintptr_t start = reinterpret_cast<uintptr_t>(ptr);
const uintptr_t end = util::AlignUp(start + size, hw::DataCacheLineSize);
for (uintptr_t cur = start; cur < end; cur += hw::DataCacheLineSize) {
InvalidateDataCacheLine(reinterpret_cast<void *>(cur));
}
}
}