sifive / freedom-u540-c000-bootloader

Freedom U540-C000 Bootloader Code
Other
85 stars 39 forks source link

Enable entire L2 cache #21

Open VincentZWC opened 4 years ago

VincentZWC commented 4 years ago

At runtime, FSBL is located on the lastest way of L2 cache. Therefore, FSBL can only enable the first 15 L2 cache ways to avoid corrupt itself. To make FSBL enable entire 16 L2 cache ways, this patch creates a trampoline before entering the FSBL payload program. At runtime, this trampoline is located on DRAM. Therefore, FSBL able to enable the entire L2 cache at the trampoline.