Skip to content

Commit

Permalink
refactor(core): rename memory_area to applet_memory
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
cepetr committed Jan 29, 2025
1 parent 25c7185 commit 24bbcad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions core/embed/sys/syscall/stm32/syscall_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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,
};
Expand Down
12 changes: 6 additions & 6 deletions core/embed/sys/task/inc/sys/applet.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ 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;

// 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;

Expand Down

0 comments on commit 24bbcad

Please sign in to comment.