ams-1.0.0: meso no longer optional, remove conditional logic

This commit is contained in:
Michael Scire 2021-09-05 10:08:30 -07:00 committed by SciresM
parent 320f0bbcfd
commit da208f8001
10 changed files with 19 additions and 53 deletions

View file

@ -56,17 +56,11 @@ namespace ams::mitm::settings {
const auto api_info = exosphere::GetApiInfo();
const char emummc_char = emummc::IsActive() ? 'E' : 'S';
/* NOTE: While Mesosphere is in experimental/opt-in, we will display it as part of the firmware. */
const char mesosphere_char = svc::IsKernelMesosphere() ? 'M' : '0';
/* TODO: Remove separate display for mesosphere vs not mesosphere in Atmosphere 1.0.0. */
AMS_ABORT_UNLESS(api_info.GetMajorVersion() == 0);
/* NOTE: We have carefully accounted for the size of the string we print. */
/* No truncation occurs assuming two-digits for all version number components. */
char display_version[sizeof(g_ams_firmware_version.display_version)];
util::SNPrintf(display_version, sizeof(display_version), "%s|AMS %c.%u.%u|%c", g_ams_firmware_version.display_version, mesosphere_char, api_info.GetMinorVersion(), api_info.GetMicroVersion(), emummc_char);
util::SNPrintf(display_version, sizeof(display_version), "%s|AMS %u.%u.%u|%c", g_ams_firmware_version.display_version, api_info.GetMajorVersion(), api_info.GetMinorVersion(), api_info.GetMicroVersion(), emummc_char);
std::memcpy(g_ams_firmware_version.display_version, display_version, sizeof(display_version));
}

View file

@ -358,10 +358,7 @@ namespace ams::creport {
}
void CrashReport::SaveToFile(ScopedFile &file) {
file.WriteFormat("Atmosphère Crash Report (v1.5):\n");
/* TODO: Remove in Atmosphere 1.0.0. */
file.WriteFormat("Mesosphere: %s\n", svc::IsKernelMesosphere() ? "Enabled" : "Disabled");
file.WriteFormat("Atmosphère Crash Report (v1.6):\n");
file.WriteFormat("Result: 0x%X (2%03d-%04d)\n\n", this->result.GetValue(), this->result.GetModule(), this->result.GetDescription());

View file

@ -235,7 +235,7 @@ namespace ams::fatal::srv {
font::AddSpacingLines(0.5f);
/* TODO: Remove Mesosphere identifier in 1.0.0. */
font::PrintFormatLine("Firmware: %s (Atmosphère%s %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, svc::IsKernelMesosphere() ? " M" : "", ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
font::PrintFormatLine("Firmware: %s (Atmosphère %u.%u.%u-%s)", config.GetFirmwareVersion().display_version, ATMOSPHERE_RELEASE_VERSION, ams::GetGitRevision());
font::AddSpacingLines(1.5f);
if (!exosphere::ResultVersionMismatch::Includes(this->context->result)) {
font::Print(config.GetErrorDescription());

View file

@ -265,11 +265,7 @@ namespace ams::ldr {
flags |= svc::CreateProcessFlag_AddressSpace32BitWithoutAlias;
break;
case Npdm::AddressSpaceType_64Bit:
if (hos::GetVersion() >= hos::Version_2_0_0 || svc::IsKernelMesosphere()) {
flags |= svc::CreateProcessFlag_AddressSpace64Bit;
} else {
flags |= svc::CreateProcessFlag_AddressSpace64BitDeprecated;
}
flags |= svc::CreateProcessFlag_AddressSpace64Bit;
break;
default:
return ResultInvalidMeta();
@ -326,11 +322,9 @@ namespace ams::ldr {
}
}
/* 11.0.0+ Set Disable DAS merge. */
if (hos::GetVersion() >= hos::Version_11_0_0 || svc::IsKernelMesosphere()) {
if (meta_flags & Npdm::MetaFlag_DisableDeviceAddressSpaceMerge) {
flags |= svc::CreateProcessFlag_DisableDeviceAddressSpaceMerge;
}
/* 11.0.0+/meso Set Disable DAS merge. */
if (meta_flags & Npdm::MetaFlag_DisableDeviceAddressSpaceMerge) {
flags |= svc::CreateProcessFlag_DisableDeviceAddressSpaceMerge;
}
*out = flags;

View file

@ -171,10 +171,6 @@ namespace ams::pm::resource {
}
bool IsKTraceEnabled() {
if (!svc::IsKernelMesosphere()) {
return false;
}
u64 value = 0;
R_ABORT_UNLESS(svc::GetInfo(std::addressof(value), svc::InfoType_MesosphereMeta, INVALID_HANDLE, svc::MesosphereMetaInfo_IsKTraceEnabled));
@ -248,7 +244,7 @@ namespace ams::pm::resource {
}
/* Choose and initialize memory arrangement. */
const bool use_dynamic_memory_arrangement = (hos_version >= hos::Version_6_0_0) || (svc::IsKernelMesosphere() && hos_version >= hos::Version_5_0_0);
const bool use_dynamic_memory_arrangement = (hos_version >= hos::Version_5_0_0);
if (use_dynamic_memory_arrangement) {
/* 6.0.0 retrieves memory limit information from the kernel, rather than using a hardcoded profile. */
g_memory_arrangement = spl::MemoryArrangement_Dynamic;