mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 00:54:23 -04:00
fusee_cpp: rename source dir to fusee
This commit is contained in:
parent
a6ea490615
commit
62f8408a2e
260 changed files with 0 additions and 0 deletions
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <exosphere.hpp>
|
||||
#include "fusee_secmon_sync.hpp"
|
||||
|
||||
namespace ams::nxboot {
|
||||
|
||||
namespace {
|
||||
|
||||
ALWAYS_INLINE pkg1::SecureMonitorParameters &GetSecureMonitorParameters() {
|
||||
return *secmon::MemoryRegionPhysicalDeviceBootloaderParams.GetPointer<pkg1::SecureMonitorParameters>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void InitializeSecureMonitorMailbox() {
|
||||
std::memset(std::addressof(GetSecureMonitorParameters()), 0, sizeof(GetSecureMonitorParameters()));
|
||||
}
|
||||
|
||||
void WaitSecureMonitorState(pkg1::SecureMonitorState state) {
|
||||
auto &secmon_params = GetSecureMonitorParameters();
|
||||
|
||||
while (secmon_params.secmon_state != state) {
|
||||
hw::InvalidateDataCache(std::addressof(secmon_params.secmon_state), sizeof(secmon_params.secmon_state));
|
||||
util::WaitMicroSeconds(1);
|
||||
}
|
||||
}
|
||||
|
||||
void SetBootloaderState(pkg1::BootloaderState state) {
|
||||
auto &secmon_params = GetSecureMonitorParameters();
|
||||
secmon_params.bootloader_state = state;
|
||||
hw::FlushDataCache(std::addressof(secmon_params.bootloader_state), sizeof(secmon_params.bootloader_state));
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue