File tree 2 files changed +4
-2
lines changed
ports/raspberrypi/supervisor
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,13 @@ static uint32_t m1_timing;
49
49
static void save_psram_settings (void ) {
50
50
#ifdef PICO_RP2350
51
51
// We're about to invalidate the XIP cache, clean it first to commit any dirty writes to PSRAM
52
- uint8_t * maintenance_ptr = (uint8_t * )XIP_MAINTENANCE_BASE ;
52
+ volatile uint8_t * maintenance_ptr = (uint8_t * )XIP_MAINTENANCE_BASE ;
53
53
for (int i = 1 ; i < 16 * 1024 ; i += 8 ) {
54
54
// Background info: https://forums.raspberrypi.com/viewtopic.php?t=378249
55
55
maintenance_ptr [i ] = 0 ; // Clean
56
+ __compiler_memory_barrier ();
56
57
maintenance_ptr [i - 1 ] = 0 ; // Explicitly invalidate
58
+ __compiler_memory_barrier ();
57
59
}
58
60
59
61
m1_timing = qmi_hw -> m [1 ].timing ;
Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ void port_heap_init(void) {
244
244
_heap = tlsf_create_with_pool (heap_bottom , size , 64 * 1024 * 1024 );
245
245
_ram_pool = tlsf_get_pool (_heap );
246
246
if (_psram_size > 0 ) {
247
- _psram_pool = tlsf_add_pool (_heap , (void * )0x11000004 , _psram_size - 4 );
247
+ _psram_pool = tlsf_add_pool (_heap , (void * )0x11000000 , _psram_size );
248
248
}
249
249
}
250
250
You can’t perform that action at this time.
0 commit comments