jit_stream_flash.h
Include dependency graph for jit_stream_flash.h:
This graph shows which files directly or indirectly include jit_stream_flash.h:
JIT code caching in flash memory - common implementation.
Functions
-
void jit_stream_flash_init(GlobalContext *global)
Initialize JIT stream flash subsystem.
- Parameters:
-
-
const struct Nif *jit_stream_flash_get_nif(const char *nifname)
Get NIF for jit_stream_flash operations.
- Parameters:
-
- Returns:
NIF pointer or NULL
-
ModuleNativeEntryPoint jit_stream_flash_entry_point(Context *ctx, term jit_stream)
Get entry point from jit_stream_flash. Called by jit_stream_entry_point
- Parameters:
-
- Returns:
Entry point or NULL
-
void globalcontext_set_cache_native_code(GlobalContext *global, Module *mod, uint16_t version, ModuleNativeEntryPoint entry_point, uint32_t labels)
Finalize flash operation by marking an entry point as valid for a given module. This is called by sys_set_cache_native_code.
- Parameters:
-
-
struct JSFlashPlatformContext *jit_stream_flash_platform_init(void)
Initialize platform flash context.
- Returns:
Platform flash context, or NULL on error
-
void jit_stream_flash_platform_destroy(struct JSFlashPlatformContext *pf_ctx)
Destroy platform flash context.
- Parameters:
-
-
bool jit_stream_flash_platform_erase_sector(struct JSFlashPlatformContext *pf_ctx, uintptr_t addr)
Erase a flash sector at the given address.
- Parameters:
-
- Returns:
true on success, false on error
-
bool jit_stream_flash_platform_write_page(struct JSFlashPlatformContext *pf_ctx, uintptr_t addr, const uint8_t *data)
Write a page to flash.
- Parameters:
pf_ctx – Platform flash context
addr – Virtual address to write to (must be page-aligned)
data – Data to write (must be FLASH_PAGE_SIZE bytes)
- Returns:
true on success, false on error
-
uintptr_t jit_stream_flash_platform_ptr_to_executable(uintptr_t addr)
Convert data bus address to instruction bus address.
- Parameters:
-
- Returns:
Instruction bus address (executable pointer)
-
uintptr_t jit_stream_flash_platform_executable_to_ptr(uintptr_t addr)
Convert instruction bus address to data bus address.
- Parameters:
-
- Returns:
Data bus address