Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.0 on 2022-01-18 at 14:00 UTC+1 (a few minutes of down time)

Commit 8d9149eb authored by alex@thinkpad's avatar alex@thinkpad
Browse files

Patch manager: moved sync_caches in patch.c and removed the "weak" trickery

(fixes patch restoring when called from modules)

--HG--
branch : patchmgr
parent 4c33f6439858
......@@ -243,24 +243,8 @@ static inline void _sync_caches()
sei(old);
}
/* also reapply cache patches, if needed */
static inline void sync_caches()
{
uint32_t old = cli();
/* this function is only present on main ML (not installer / reboot shim / minimal / etc) */
extern int __attribute__((weak)) _patch_sync_caches(int also_data);
if (_patch_sync_caches)
{
_patch_sync_caches(1);
}
else
{
_sync_caches();
}
sei(old);
}
/* in patch.c; this also reapplies cache patches, if needed */
extern void sync_caches();
/**
* Some common instructions.
......
......@@ -150,6 +150,13 @@ int _patch_sync_caches(int also_data)
return err;
}
void sync_caches()
{
uint32_t old = cli();
_patch_sync_caches(1);
sei(old);
}
/* low-level routines */
static uint32_t read_value(uint32_t* addr, int is_instruction)
{
......
......@@ -235,7 +235,7 @@ cstart( void )
&blob_end
);
sync_caches();
_sync_caches();
#if defined(CONFIG_7D)
*(volatile int*)0xC0A00024 = 0x80000010; // send SSTAT for master processor, so it is in right state for rebooting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment