From 18f07b30e516aede5971ba40016df2efbb21c76f Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 27 Mar 2024 18:48:49 -0700 Subject: [PATCH] fusee/exo/ams: update with new keydata/version enums --- libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp | 1 + libexosphere/include/exosphere/pkg2.hpp | 2 +- libexosphere/source/fuse/fuse_api.cpp | 1 + libstratosphere/include/stratosphere/hos/hos_types.hpp | 2 ++ .../source/fs/impl/fs_id_string_impl.os.generic.cpp | 5 +++-- libvapours/include/vapours/ams/ams_api_version.h | 6 +++--- libvapours/include/vapours/ams/ams_target_firmware.h | 6 +++++- 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp b/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp index 64330af7..0cfc4363 100644 --- a/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp +++ b/libexosphere/include/exosphere/pkg1/pkg1_key_generation.hpp @@ -37,6 +37,7 @@ namespace ams::pkg1 { KeyGeneration_15_0_0 = 0x0E, KeyGeneration_16_0_0 = 0x0F, KeyGeneration_17_0_0 = 0x10, + KeyGeneration_18_0_0 = 0x11, KeyGeneration_Count, diff --git a/libexosphere/include/exosphere/pkg2.hpp b/libexosphere/include/exosphere/pkg2.hpp index 81a3f664..8775d2ed 100644 --- a/libexosphere/include/exosphere/pkg2.hpp +++ b/libexosphere/include/exosphere/pkg2.hpp @@ -24,7 +24,7 @@ namespace ams::pkg2 { constexpr inline int PayloadCount = 3; constexpr inline int MinimumValidDataVersion = 0; /* We allow older package2 to load; this value is currently 0x18 in Nintendo's code. */ - constexpr inline int CurrentBootloaderVersion = 0x14; + constexpr inline int CurrentBootloaderVersion = 0x15; struct Package2Meta { using Magic = util::FourCC<'P','K','2','1'>; diff --git a/libexosphere/source/fuse/fuse_api.cpp b/libexosphere/source/fuse/fuse_api.cpp index 95c316d6..772e8ca9 100644 --- a/libexosphere/source/fuse/fuse_api.cpp +++ b/libexosphere/source/fuse/fuse_api.cpp @@ -177,6 +177,7 @@ namespace ams::fuse { } constexpr const TargetFirmware FuseVersionIncrementFirmwares[] = { + TargetFirmware_18_0_0, TargetFirmware_17_0_0, TargetFirmware_16_0_0, TargetFirmware_15_0_0, diff --git a/libstratosphere/include/stratosphere/hos/hos_types.hpp b/libstratosphere/include/stratosphere/hos/hos_types.hpp index 303ff796..ff8c3689 100644 --- a/libstratosphere/include/stratosphere/hos/hos_types.hpp +++ b/libstratosphere/include/stratosphere/hos/hos_types.hpp @@ -81,6 +81,8 @@ namespace ams::hos { Version_16_0_3 = ::ams::TargetFirmware_16_0_3, Version_16_1_0 = ::ams::TargetFirmware_16_1_0, Version_17_0_0 = ::ams::TargetFirmware_17_0_0, + Version_17_0_1 = ::ams::TargetFirmware_17_0_1, + Version_18_0_0 = ::ams::TargetFirmware_18_0_0, Version_Current = ::ams::TargetFirmware_Current, diff --git a/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp b/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp index 2922a2c1..091b19d3 100644 --- a/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp +++ b/libstratosphere/source/fs/impl/fs_id_string_impl.os.generic.cpp @@ -21,7 +21,7 @@ namespace ams::fs::impl { #define ADD_ENUM_CASE(v) case v: return #v template<> const char *IdString::ToString(pkg1::KeyGeneration id) { - static_assert(pkg1::KeyGeneration_Current == pkg1::KeyGeneration_17_0_0); + static_assert(pkg1::KeyGeneration_Current == pkg1::KeyGeneration_18_0_0); switch (id) { using enum pkg1::KeyGeneration; case KeyGeneration_1_0_0: return "1.0.0-2.3.0"; @@ -40,7 +40,8 @@ namespace ams::fs::impl { case KeyGeneration_14_0_0: return "14.0.0-14.1.2"; case KeyGeneration_15_0_0: return "15.0.0-15.0.1"; case KeyGeneration_16_0_0: return "16.0.0-16.0.3"; - case KeyGeneration_17_0_0: return "17.0.0-"; + case KeyGeneration_17_0_0: return "17.0.0-17.0.1"; + case KeyGeneration_18_0_0: return "18.0.0-"; default: return "Unknown"; } } diff --git a/libvapours/include/vapours/ams/ams_api_version.h b/libvapours/include/vapours/ams/ams_api_version.h index 1808fff8..2319e189 100644 --- a/libvapours/include/vapours/ams/ams_api_version.h +++ b/libvapours/include/vapours/ams/ams_api_version.h @@ -16,11 +16,11 @@ #pragma once #define ATMOSPHERE_RELEASE_VERSION_MAJOR 1 -#define ATMOSPHERE_RELEASE_VERSION_MINOR 6 -#define ATMOSPHERE_RELEASE_VERSION_MICRO 2 +#define ATMOSPHERE_RELEASE_VERSION_MINOR 7 +#define ATMOSPHERE_RELEASE_VERSION_MICRO 0 #define ATMOSPHERE_RELEASE_VERSION ATMOSPHERE_RELEASE_VERSION_MAJOR, ATMOSPHERE_RELEASE_VERSION_MINOR, ATMOSPHERE_RELEASE_VERSION_MICRO -#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR 17 +#define ATMOSPHERE_SUPPORTED_HOS_VERSION_MAJOR 18 #define ATMOSPHERE_SUPPORTED_HOS_VERSION_MINOR 0 #define ATMOSPHERE_SUPPORTED_HOS_VERSION_MICRO 0 diff --git a/libvapours/include/vapours/ams/ams_target_firmware.h b/libvapours/include/vapours/ams/ams_target_firmware.h index 6288ab83..112bbd74 100644 --- a/libvapours/include/vapours/ams/ams_target_firmware.h +++ b/libvapours/include/vapours/ams/ams_target_firmware.h @@ -79,8 +79,10 @@ #define ATMOSPHERE_TARGET_FIRMWARE_16_0_3 ATMOSPHERE_TARGET_FIRMWARE(16, 0, 3) #define ATMOSPHERE_TARGET_FIRMWARE_16_1_0 ATMOSPHERE_TARGET_FIRMWARE(16, 1, 0) #define ATMOSPHERE_TARGET_FIRMWARE_17_0_0 ATMOSPHERE_TARGET_FIRMWARE(17, 0, 0) +#define ATMOSPHERE_TARGET_FIRMWARE_17_0_1 ATMOSPHERE_TARGET_FIRMWARE(17, 0, 1) +#define ATMOSPHERE_TARGET_FIRMWARE_18_0_0 ATMOSPHERE_TARGET_FIRMWARE(18, 0, 0) -#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_17_0_0 +#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_18_0_0 #define ATMOSPHERE_TARGET_FIRMWARE_MIN ATMOSPHERE_TARGET_FIRMWARE(0, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_MAX ATMOSPHERE_TARGET_FIRMWARE_CURRENT @@ -152,6 +154,8 @@ namespace ams { TargetFirmware_16_0_3 = ATMOSPHERE_TARGET_FIRMWARE_16_0_3, TargetFirmware_16_1_0 = ATMOSPHERE_TARGET_FIRMWARE_16_1_0, TargetFirmware_17_0_0 = ATMOSPHERE_TARGET_FIRMWARE_17_0_0, + TargetFirmware_17_0_1 = ATMOSPHERE_TARGET_FIRMWARE_17_0_1, + TargetFirmware_18_0_0 = ATMOSPHERE_TARGET_FIRMWARE_18_0_0, TargetFirmware_Current = ATMOSPHERE_TARGET_FIRMWARE_CURRENT,