boot2: move to separate process

This commit is contained in:
Michael Scire
2019-10-18 21:06:40 -07:00
committed by SciresM
parent 535e49a38d
commit 6abd756e0c
14 changed files with 427 additions and 31 deletions

View File

@@ -0,0 +1,20 @@
/*
* Copyright (c) 2018-2019 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/>.
*/
#pragma once
#include <switch.h>
#include "boot2/boot2_api.hpp"

View File

@@ -0,0 +1,31 @@
/*
* Copyright (c) 2018-2019 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/>.
*/
#pragma once
#include <switch.h>
#include <stratosphere.hpp>
namespace sts::boot2 {
/* Boot2 API. */
/* Normally invoked by PM. */
void LaunchPreSdCardBootProgramsAndBoot2();
/* Normally invoked by boot2. */
void LaunchPostSdCardBootPrograms();
}

View File

@@ -26,6 +26,8 @@ namespace sts::cfg {
void GetInitialProcessRange(os::ProcessId *out_min, os::ProcessId *out_max);
/* SD card configuration. */
bool IsSdCardRequiredServicesReady();
void WaitSdCardRequiredServicesReady();
bool IsSdCardInitialized();
void WaitSdCardInitialized();