From 734122f20a0cdc070f6d8d2a72a75340c7b9390b Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Fri, 11 Dec 2020 03:06:17 -0800 Subject: [PATCH] fusee: update for 11.0.1 --- fusee/fusee-secondary/src/kernel_patches.c | 38 +++++++++++++++++++ fusee/fusee-secondary/src/nxboot.c | 1 + .../include/stratosphere/hos/hos_types.hpp | 1 + .../include/vapours/ams/ams_target_firmware.h | 4 +- 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/fusee/fusee-secondary/src/kernel_patches.c b/fusee/fusee-secondary/src/kernel_patches.c index 2f2d89416..8e82de0a7 100644 --- a/fusee/fusee-secondary/src/kernel_patches.c +++ b/fusee/fusee-secondary/src/kernel_patches.c @@ -906,6 +906,35 @@ static const kernel_patch_t g_kernel_patches_1100[] = { } }; +static const kernel_patch_t g_kernel_patches_1101[] = { + { /* Send Message Process ID Patch. */ + .pattern_size = 0x1C, + .pattern = MAKE_KERNEL_PATTERN_NAME(1100, proc_id_send), + .pattern_hook_offset = 0x0, + .payload_num_instructions = sizeof(MAKE_KERNEL_PATCH_NAME(1100, proc_id_send))/sizeof(instruction_t), + .branch_back_offset = 0x10, + .payload = MAKE_KERNEL_PATCH_NAME(1100, proc_id_send) + }, + { /* Receive Message Process ID Patch. */ + .pattern_size = 0x1C, + .pattern = MAKE_KERNEL_PATTERN_NAME(1100, proc_id_recv), + .pattern_hook_offset = 0x0, + .payload_num_instructions = sizeof(MAKE_KERNEL_PATCH_NAME(1100, proc_id_recv))/sizeof(instruction_t), + .branch_back_offset = 0x10, + .payload = MAKE_KERNEL_PATCH_NAME(1100, proc_id_recv) + }, + { /* svcControlCodeMemory Patch. */ + .payload_num_instructions = sizeof(MAKE_KERNEL_PATCH_NAME(1100, svc_control_codememory))/sizeof(instruction_t), + .payload = MAKE_KERNEL_PATCH_NAME(1100, svc_control_codememory), + .patch_offset = 0x2FD04, + }, + { /* System Memory Increase Patch. */ + .payload_num_instructions = sizeof(MAKE_KERNEL_PATCH_NAME(1100, system_memory_increase))/sizeof(instruction_t), + .payload = MAKE_KERNEL_PATCH_NAME(1100, system_memory_increase), + .patch_offset = 0x490C4, + } +}; + #define KERNEL_PATCHES(vers) .num_patches = sizeof(g_kernel_patches_##vers)/sizeof(kernel_patch_t), .patches = g_kernel_patches_##vers, /* Kernel Infos. */ @@ -1000,6 +1029,15 @@ static const kernel_info_t g_kernel_infos[] = { .embedded_ini_ptr = 0x180, .free_code_space_offset = 0x49EE8, KERNEL_PATCHES(1100) + }, + { /* 11.0.1. */ + .hash = {68B972B79755875E24958D990A77ABF1C5C1328067F0A2EC9CEFC322E342C04D, }, + .hash_offset = 0x1C4, + .hash_size = 0x69000 - 0x1C4, + .embedded_ini_offset = 0x69000, + .embedded_ini_ptr = 0x180, + .free_code_space_offset = 0x49EE8, + KERNEL_PATCHES(1101) } }; diff --git a/fusee/fusee-secondary/src/nxboot.c b/fusee/fusee-secondary/src/nxboot.c index 415ec9f16..7400aa6b9 100644 --- a/fusee/fusee-secondary/src/nxboot.c +++ b/fusee/fusee-secondary/src/nxboot.c @@ -254,6 +254,7 @@ static uint32_t nxboot_get_specific_target_firmware(uint32_t target_firmware){ #define CHECK_NCA(NCA_ID, VERSION) do { if (is_nca_present(NCA_ID)) { return ATMOSPHERE_TARGET_FIRMWARE_##VERSION; } } while(0) if (target_firmware >= ATMOSPHERE_TARGET_FIRMWARE_11_0_0) { + CHECK_NCA("56211c7a5ed20a5332f5cdda67121e37", 11_0_1); CHECK_NCA("594c90bcdbcccad6b062eadba0cd0e7e", 11_0_0); } else if (target_firmware >= ATMOSPHERE_TARGET_FIRMWARE_10_0_0) { CHECK_NCA("26325de4db3909e0ef2379787c7e671d", 10_2_0); diff --git a/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp b/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp index e7017d824..7e9ce33d0 100644 --- a/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp +++ b/libraries/libstratosphere/include/stratosphere/hos/hos_types.hpp @@ -59,6 +59,7 @@ namespace ams::hos { Version_10_1_0 = ::ams::TargetFirmware_10_1_0, Version_10_2_0 = ::ams::TargetFirmware_10_2_0, Version_11_0_0 = ::ams::TargetFirmware_11_0_0, + Version_11_0_1 = ::ams::TargetFirmware_11_0_1, Version_Current = ::ams::TargetFirmware_Current, diff --git a/libraries/libvapours/include/vapours/ams/ams_target_firmware.h b/libraries/libvapours/include/vapours/ams/ams_target_firmware.h index fbb8b0f3b..cd6e4dc5f 100644 --- a/libraries/libvapours/include/vapours/ams/ams_target_firmware.h +++ b/libraries/libvapours/include/vapours/ams/ams_target_firmware.h @@ -57,8 +57,9 @@ #define ATMOSPHERE_TARGET_FIRMWARE_10_1_1 ATMOSPHERE_TARGET_FIRMWARE(10, 1, 1) #define ATMOSPHERE_TARGET_FIRMWARE_10_2_0 ATMOSPHERE_TARGET_FIRMWARE(10, 2, 0) #define ATMOSPHERE_TARGET_FIRMWARE_11_0_0 ATMOSPHERE_TARGET_FIRMWARE(11, 0, 0) +#define ATMOSPHERE_TARGET_FIRMWARE_11_0_1 ATMOSPHERE_TARGET_FIRMWARE(11, 0, 1) -#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_11_0_0 +#define ATMOSPHERE_TARGET_FIRMWARE_CURRENT ATMOSPHERE_TARGET_FIRMWARE_11_0_1 #define ATMOSPHERE_TARGET_FIRMWARE_MIN ATMOSPHERE_TARGET_FIRMWARE(0, 0, 0) #define ATMOSPHERE_TARGET_FIRMWARE_MAX ATMOSPHERE_TARGET_FIRMWARE_CURRENT @@ -108,6 +109,7 @@ namespace ams { TargetFirmware_10_1_1 = ATMOSPHERE_TARGET_FIRMWARE_10_1_1, TargetFirmware_10_2_0 = ATMOSPHERE_TARGET_FIRMWARE_10_2_0, TargetFirmware_11_0_0 = ATMOSPHERE_TARGET_FIRMWARE_11_0_0, + TargetFirmware_11_0_1 = ATMOSPHERE_TARGET_FIRMWARE_11_0_1, TargetFirmware_Current = ATMOSPHERE_TARGET_FIRMWARE_CURRENT,