diff --git a/bootloader/hos/pkg2.c b/bootloader/hos/pkg2.c index ab9cfb0..5ac84b5 100644 --- a/bootloader/hos/pkg2.c +++ b/bootloader/hos/pkg2.c @@ -230,7 +230,7 @@ static u32 DEBUG_OUTPUT_TRAMPOLINE_600[] = KERNEL_PATCHSET_DEF(_kernel_1_patchset, { SVC_VERIFY_DS, 0x3764C, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x44074, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_100, _B(OUTPUT_DEBUG_OFF_100, FREE_CODE_OFF_3RD_100), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_100, _B(OUTPUT_DEBUG_OFF_100, FREE_CODE_OFF_3RD_100 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_100, sizeof(DEBUG_OUTPUT_TRAMPOLINE_100) >> 2, DEBUG_OUTPUT_TRAMPOLINE_100 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_100, _MOVKX(12, 0x8014 + DEBUG_UART_OFF, 0), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -247,7 +247,7 @@ KERNEL_PATCHSET_DEF(_kernel_1_patchset, KERNEL_PATCHSET_DEF(_kernel_2_patchset, { SVC_VERIFY_DS, 0x54834, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x6086C, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_200, _B(OUTPUT_DEBUG_OFF_200, FREE_CODE_OFF_3RD_200), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_200, _B(OUTPUT_DEBUG_OFF_200, FREE_CODE_OFF_3RD_200 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_200, sizeof(DEBUG_OUTPUT_TRAMPOLINE_200) >> 2, DEBUG_OUTPUT_TRAMPOLINE_200 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_200, _MOVKX(12, 0x8014 + DEBUG_UART_OFF, 0), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -264,7 +264,7 @@ KERNEL_PATCHSET_DEF(_kernel_2_patchset, KERNEL_PATCHSET_DEF(_kernel_3_patchset, { SVC_VERIFY_DS, 0x3BD24, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x483FC, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_300, _B(OUTPUT_DEBUG_OFF_300, FREE_CODE_OFF_3RD_300), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_300, _B(OUTPUT_DEBUG_OFF_300, FREE_CODE_OFF_3RD_300 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_300, sizeof(DEBUG_OUTPUT_TRAMPOLINE_300) >> 2, DEBUG_OUTPUT_TRAMPOLINE_300 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_300, _MOVKX(12, 0x4014 + DEBUG_UART_OFF, 0), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -281,7 +281,7 @@ KERNEL_PATCHSET_DEF(_kernel_3_patchset, KERNEL_PATCHSET_DEF(_kernel_302_patchset, { SVC_VERIFY_DS, 0x3BD24, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x48414, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_302, _B(OUTPUT_DEBUG_OFF_302, FREE_CODE_OFF_3RD_302), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_302, _B(OUTPUT_DEBUG_OFF_302, FREE_CODE_OFF_3RD_302 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_302, sizeof(DEBUG_OUTPUT_TRAMPOLINE_302) >> 2, DEBUG_OUTPUT_TRAMPOLINE_302 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_302, _MOVKX(12, 0x4014 + DEBUG_UART_OFF, 0), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -298,7 +298,7 @@ KERNEL_PATCHSET_DEF(_kernel_302_patchset, KERNEL_PATCHSET_DEF(_kernel_4_patchset, { SVC_VERIFY_DS, 0x41EB4, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x4EBFC, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_400, _B(OUTPUT_DEBUG_OFF_400, FREE_CODE_OFF_3RD_400), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_400, _B(OUTPUT_DEBUG_OFF_400, FREE_CODE_OFF_3RD_400 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_400, sizeof(DEBUG_OUTPUT_TRAMPOLINE_400) >> 2, DEBUG_OUTPUT_TRAMPOLINE_400 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_400, _MOVKX(11, 0x4014 + DEBUG_UART_OFF, 0), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -315,7 +315,7 @@ KERNEL_PATCHSET_DEF(_kernel_4_patchset, KERNEL_PATCHSET_DEF(_kernel_5_patchset, { SVC_VERIFY_DS, 0x45E6C, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x5513C, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_500, _B(OUTPUT_DEBUG_OFF_500, FREE_CODE_OFF_3RD_500), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_500, _B(OUTPUT_DEBUG_OFF_500, FREE_CODE_OFF_3RD_500 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_500, sizeof(DEBUG_OUTPUT_TRAMPOLINE_500) >> 2, DEBUG_OUTPUT_TRAMPOLINE_500 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_500, _ADDXI(0, 20, DEBUG_UART_OFF), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches. @@ -332,7 +332,7 @@ KERNEL_PATCHSET_DEF(_kernel_5_patchset, KERNEL_PATCHSET_DEF(_kernel_6_patchset, { SVC_VERIFY_DS, 0x47EA0, _NOP(), NULL }, // Disable SVC verifications { DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch - { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_600, _B(OUTPUT_DEBUG_OFF_600, FREE_CODE_OFF_3RD_600), NULL }, // Branch to the printk trampoline + { DEBUG_OUTPUT_GEN, OUTPUT_DEBUG_OFF_600, _B(OUTPUT_DEBUG_OFF_600, FREE_CODE_OFF_3RD_600 + 2 * 4), NULL }, // Branch to the printk trampoline { DEBUG_OUTPUT_ARR, FREE_CODE_OFF_3RD_600, sizeof(DEBUG_OUTPUT_TRAMPOLINE_600) >> 2, DEBUG_OUTPUT_TRAMPOLINE_600 }, // Call printk with the right arguments. { DEBUG_OUTPUT_UART_CONF, UART_CONF_600, _ADDXI(0, 20, DEBUG_UART_OFF), NULL }, // Configure printk to use the UART port we want. // Atmosphère kernel patches.