File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
ports/raspberrypi/supervisor Expand file tree Collapse file tree 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;
4949static void save_psram_settings (void ) {
5050 #ifdef PICO_RP2350
5151 // 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 ;
5353 for (int i = 1 ; i < 16 * 1024 ; i += 8 ) {
5454 // Background info: https://forums.raspberrypi.com/viewtopic.php?t=378249
5555 maintenance_ptr [i ] = 0 ; // Clean
56+ __compiler_memory_barrier ();
5657 maintenance_ptr [i - 1 ] = 0 ; // Explicitly invalidate
58+ __compiler_memory_barrier ();
5759 }
5860
5961 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) {
244244 _heap = tlsf_create_with_pool (heap_bottom , size , 64 * 1024 * 1024 );
245245 _ram_pool = tlsf_get_pool (_heap );
246246 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 );
248248 }
249249}
250250
You can’t perform that action at this time.
0 commit comments