You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'fix/fix_xip_psram_ptr_check' into 'master'
psram: fixed psram ptr check issue under xip_psram condition for ESP32P4
Closes IDFGH-15338, IDFGH-15340, and IDF-12458
See merge request espressif/esp-idf!39405
* If using `int`, then for CLANG, with enabled optimization when inlined function is provided with the address of external symbol, the two least bits of the constant used inside that function get cleared.
51
+
* Optimizer assumes that address of external symbol should be aligned to 4-bytes and therefore aligns constant value used for bitwise AND operation with that address.
52
+
*
53
+
* This means `extern int _instruction_reserved_start;` can be unaligned to 4 bytes, whereas using `char` can solve this issue.
54
+
*
55
+
* As we only use these symbol address, we declare them as `char` here
* If using `int`, then for CLANG, with enabled optimization when inlined function is provided with the address of external symbol, the two least bits of the constant used inside that function get cleared.
197
-
* Optimizer assumes that address of external symbol should be aligned to 4-bytes and therefore aligns constant value used for bitwise AND operation with that address.
198
-
*
199
-
* This means `extern int _instruction_reserved_start;` can be unaligned to 4 bytes, whereas using `char` can solve this issue.
200
-
*
201
-
* As we only use these symbol address, we declare them as `char` here
202
-
*/
203
-
externchar_instruction_reserved_start;
204
-
externchar_instruction_reserved_end;
205
-
externchar_rodata_reserved_start;
206
-
externchar_rodata_reserved_end;
207
-
208
209
//------------------------------------Copy Flash .text to PSRAM-------------------------------------//
if ( pvThreadLocalStoragePointersDelCallback[ x ] !=NULL ) { //If del cb is set
253
253
/* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */
254
254
if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) {
255
-
ESP_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
255
+
ESP_EARLY_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
if ( pvThreadLocalStoragePointersDelCallback[ x ] !=NULL ) { //If del cb is set
715
715
/* In case the TLSP deletion callback has been overwritten by a TLS pointer, gracefully abort. */
716
716
if ( !esp_ptr_executable( pvThreadLocalStoragePointersDelCallback[ x ] ) ) {
717
-
ESP_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
717
+
ESP_EARLY_LOGE("FreeRTOS", "Fatal error: TLSP deletion callback at index %d overwritten with non-excutable pointer %p", x, pvThreadLocalStoragePointersDelCallback[ x ]);
0 commit comments