set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+ (#1391)

* set.mitm: fake compatibility for usb!usb30_force_enabled on 9.0.0+

* set.mitm: add value meaning comment for usb!usb30_force_enabled

* loader: pretend to be polite about patch ordering
This commit is contained in:
SciresM 2021-03-01 14:18:27 -08:00 committed by GitHub
parent c9015581ca
commit a6729171d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 205 additions and 24 deletions

View file

@ -307,6 +307,10 @@ namespace ams::boot2 {
});
}
bool IsUsbRequiredToMountSdCard() {
return hos::GetVersion() >= hos::Version_9_0_0;
}
}
/* Boot2 API. */
@ -347,8 +351,10 @@ namespace ams::boot2 {
/* Launch pcv. */
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Pcv, ncm::StorageId::BuiltInSystem), 0);
/* Launch usb. */
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
/* On 9.0.0+, FS depends on the USB sysmodule having been launched in order to mount the SD card. */
if (IsUsbRequiredToMountSdCard()) {
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
}
}
/* Wait for the SD card required services to be ready. */
@ -371,6 +377,11 @@ namespace ams::boot2 {
void LaunchPostSdCardBootPrograms() {
/* This code is normally run by boot2. */
/* Launch the usb system module, if we haven't already. */
if (!IsUsbRequiredToMountSdCard()) {
LaunchProgram(nullptr, ncm::ProgramLocation::Make(ncm::SystemProgramId::Usb, ncm::StorageId::BuiltInSystem), 0);
}
/* Find out whether we are maintenance mode. */
const bool maintenance = IsMaintenanceMode();
if (maintenance) {