kasjer opened a new pull request #2743:
URL: https://github.com/apache/mynewt-core/pull/2743


   There was no big issue in cache initialization code but there were
   few things that were not correct:
   - __pic32_scache_xxxx variables were just eating ram for no reason
   - __pic32_icache_xxxx and __pic32_dcache were put in .sdata section that
     is cleared just after those variables are initialized, (they were not
     used for anything later so it did not matter much but for debugging
     it was not so good)
   - initialization code tried to use __pic32_init_cache_program_base_addr and
     __pic32_init_cache_data_base_addr symbols in following way:
            .set noreorder
     4:      la a0,__pic32_init_cache_program_base_addr
             bne a0,zero,0f
             /* Use a default if the symbol is not defined */
             li a0,0x9D000000 // <----!!! This is delay slot, instruction is 
executed anyway due to noreorder directive
   but since cache initialization does not need address, just index it does not 
matter it just
   confuses everything.
   
   This change:
   - removes unneeded and unused scache variables
   - places other cache variables in noload section that they are not destroyed 
after initialization
   - removes misleading code


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to