From 93c773ad5445de0e725ae83f647e3feae6e0acca Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 1 Sep 2021 10:37:01 -0700 Subject: [PATCH] fusee_cpp: implement warmboot firmware load --- libexosphere/include/exosphere/fuse.hpp | 1 + libexosphere/source/fuse/fuse_api.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libexosphere/include/exosphere/fuse.hpp b/libexosphere/include/exosphere/fuse.hpp index 7e841ff3..2dece286 100644 --- a/libexosphere/include/exosphere/fuse.hpp +++ b/libexosphere/include/exosphere/fuse.hpp @@ -113,6 +113,7 @@ namespace ams::fuse { SocType GetSocType(); int GetExpectedFuseVersion(TargetFirmware target_fw); + int GetFuseVersion(); bool HasRcmVulnerabilityPatch(); bool IsOdmProductionMode(); diff --git a/libexosphere/source/fuse/fuse_api.cpp b/libexosphere/source/fuse/fuse_api.cpp index 963a7cad..fba616e9 100644 --- a/libexosphere/source/fuse/fuse_api.cpp +++ b/libexosphere/source/fuse/fuse_api.cpp @@ -394,6 +394,10 @@ namespace ams::fuse { return GetExpectedFuseVersionImpl(target_fw); } + int GetFuseVersion() { + return util::PopCount(GetCommonOdmWord(7)); + } + bool HasRcmVulnerabilityPatch() { /* Only check for RCM bug patch once, and cache our result. */ if (!g_checked_for_rcm_bug_patch) {