ams: revamp assertion system

This commit is contained in:
Michael Scire
2020-02-22 23:05:14 -08:00
parent 9572fb2ce3
commit 40400aee1f
168 changed files with 1014 additions and 696 deletions

View File

@@ -25,8 +25,8 @@ namespace ams::os::impl {
/* Nintendo does not check the result of these invocations, but we will for safety. */
/* Nintendo uses entropy values 0, 1 to seed the public TinyMT random, and values */
/* 2, 3 to seed os::detail::RngManager's private TinyMT random. */
R_ASSERT(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 0));
R_ASSERT(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 1));
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[0]), InfoType_RandomEntropy, INVALID_HANDLE, 0));
R_ABORT_UNLESS(svcGetInfo(reinterpret_cast<u64 *>(&seed[2]), InfoType_RandomEntropy, INVALID_HANDLE, 1));
mt->Initialize(seed, util::size(seed));
}