From b3f8961e45d702164dc0f2e0325d6cee90683800 Mon Sep 17 00:00:00 2001 From: Kostas Missos Date: Tue, 12 Feb 2019 00:42:22 +0200 Subject: [PATCH] Fix sleep with 6.X.X secmon when debug mode is on --- bootloader/hos/pkg1.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/bootloader/hos/pkg1.c b/bootloader/hos/pkg1.c index 2c1a225..bffdf3f 100644 --- a/bootloader/hos/pkg1.c +++ b/bootloader/hos/pkg1.c @@ -68,10 +68,18 @@ PATCHSET_DEF(_secmon_5_patchset, PATCHSET_DEF(_secmon_6_patchset, // Patch package2 decryption and signature/hash checks. - { 0xDC8 + 0x820, _NOP() }, //package2 structure. - { 0xDC8 + 0x82C, _NOP() }, //Version. - { 0xDC8 + 0xE90, _NOP() }, //Header signature. - { 0xDC8 + 0x112C, _NOP() } //Sections SHA2. + { 0xDC8 + 0x820, _NOP() }, //package2 structure. + { 0xDC8 + 0x82C, _NOP() }, //Version. + { 0xDC8 + 0xE90, _NOP() }, //Header signature. + { 0xDC8 + 0x112C, _NOP() }, //Sections SHA2. + // Fix sleep mode for debug. + { 0x1A68 + 0x3854, 0x94000E45 }, //gpio_config_for_uart. + { 0x1A68 + 0x3858, 0x97FFFC0F }, //clkrst_reboot_uarta. + { 0x1A68 + 0x385C, 0x52A00021 }, //MOV W1, #0x10000 ; baudrate. + { 0x1A68 + 0x3860, 0x2A1F03E0 }, //MOV W0, WZR ; uart_port -> A. + { 0x1A68 + 0x3864, 0x72984001 }, //MOVK W1, #0xC200 ; baudrate. + { 0x1A68 + 0x3868, 0x94000C8C }, //uart_configure. + { 0x1A68 + 0x3A6C, _NOP() } // warmboot UARTA cfg. ); PATCHSET_DEF(_secmon_620_patchset, @@ -79,7 +87,15 @@ PATCHSET_DEF(_secmon_620_patchset, { 0xDC8 + 0x604, _NOP() }, //package2 structure. { 0xDC8 + 0x610, _NOP() }, //Version. { 0xDC8 + 0xC74, _NOP() }, //Header signature. - { 0xDC8 + 0xF10, _NOP() } //Sections SHA2. + { 0xDC8 + 0xF10, _NOP() }, //Sections SHA2. + // Fix sleep mode for debug. + { 0x2AC8 + 0x3854, 0x94000F42 }, //gpio_config_for_uart. + { 0x2AC8 + 0x3858, 0x97FFFC0F }, //clkrst_reboot_uarta. + { 0x2AC8 + 0x385C, 0x52A00021 }, //MOV W1, #0x10000 ; baudrate. + { 0x2AC8 + 0x3860, 0x2A1F03E0 }, //MOV W0, WZR ; uart_port -> A. + { 0x2AC8 + 0x3864, 0x72984001 }, //MOVK W1, #0xC200 ; baudrate. + { 0x2AC8 + 0x3868, 0x94000D89 }, //uart_configure. + { 0x2AC8 + 0x3A6C, _NOP() } // warmboot UARTA cfg. ); PATCHSET_DEF(_warmboot_1_patchset,