mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-03 08:46:05 +00:00
refactor(core): rename memory_area to applet_memory
[no changelog]
This commit is contained in:
parent
f99030938e
commit
5adb8ef997
@ -26,7 +26,7 @@
|
||||
#ifdef SYSCALL_DISPATCH
|
||||
|
||||
static inline bool inside_area(const void *addr, size_t len,
|
||||
const memory_area_t *area) {
|
||||
const applet_memory_t *area) {
|
||||
return ((uintptr_t)addr >= area->start) &&
|
||||
((uintptr_t)addr + len <= area->start + area->size);
|
||||
}
|
||||
@ -63,7 +63,7 @@ bool probe_read_access(const void *addr, size_t len) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static const memory_area_t assets = {
|
||||
static const applet_memory_t assets = {
|
||||
.start = ASSETS_START,
|
||||
.size = ASSETS_MAXSIZE,
|
||||
};
|
||||
|
@ -32,12 +32,12 @@ typedef void (*applet_startup_t)(const char* args, uint32_t random);
|
||||
typedef struct {
|
||||
uint32_t start;
|
||||
uint32_t size;
|
||||
} memory_area_t;
|
||||
} applet_memory_t;
|
||||
|
||||
// Applet header found at the beginning of the applet binary
|
||||
typedef struct {
|
||||
// Stack area
|
||||
memory_area_t stack;
|
||||
applet_memory_t stack;
|
||||
// Applet entry point
|
||||
applet_startup_t startup;
|
||||
} applet_header_t;
|
||||
@ -45,13 +45,13 @@ typedef struct {
|
||||
// Applet memory layout
|
||||
typedef struct {
|
||||
// Read/write data area #1
|
||||
memory_area_t data1;
|
||||
applet_memory_t data1;
|
||||
// Read/write data area #2
|
||||
memory_area_t data2;
|
||||
applet_memory_t data2;
|
||||
// Read-only code area #1
|
||||
memory_area_t code1;
|
||||
applet_memory_t code1;
|
||||
// Read-only code area #2
|
||||
memory_area_t code2;
|
||||
applet_memory_t code2;
|
||||
|
||||
} applet_layout_t;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user