mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-03 16:56:07 +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
|
#ifdef SYSCALL_DISPATCH
|
||||||
|
|
||||||
static inline bool inside_area(const void *addr, size_t len,
|
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) &&
|
return ((uintptr_t)addr >= area->start) &&
|
||||||
((uintptr_t)addr + len <= area->start + area->size);
|
((uintptr_t)addr + len <= area->start + area->size);
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ bool probe_read_access(const void *addr, size_t len) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const memory_area_t assets = {
|
static const applet_memory_t assets = {
|
||||||
.start = ASSETS_START,
|
.start = ASSETS_START,
|
||||||
.size = ASSETS_MAXSIZE,
|
.size = ASSETS_MAXSIZE,
|
||||||
};
|
};
|
||||||
|
@ -32,12 +32,12 @@ typedef void (*applet_startup_t)(const char* args, uint32_t random);
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t start;
|
uint32_t start;
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
} memory_area_t;
|
} applet_memory_t;
|
||||||
|
|
||||||
// Applet header found at the beginning of the applet binary
|
// Applet header found at the beginning of the applet binary
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// Stack area
|
// Stack area
|
||||||
memory_area_t stack;
|
applet_memory_t stack;
|
||||||
// Applet entry point
|
// Applet entry point
|
||||||
applet_startup_t startup;
|
applet_startup_t startup;
|
||||||
} applet_header_t;
|
} applet_header_t;
|
||||||
@ -45,13 +45,13 @@ typedef struct {
|
|||||||
// Applet memory layout
|
// Applet memory layout
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// Read/write data area #1
|
// Read/write data area #1
|
||||||
memory_area_t data1;
|
applet_memory_t data1;
|
||||||
// Read/write data area #2
|
// Read/write data area #2
|
||||||
memory_area_t data2;
|
applet_memory_t data2;
|
||||||
// Read-only code area #1
|
// Read-only code area #1
|
||||||
memory_area_t code1;
|
applet_memory_t code1;
|
||||||
// Read-only code area #2
|
// Read-only code area #2
|
||||||
memory_area_t code2;
|
applet_memory_t code2;
|
||||||
|
|
||||||
} applet_layout_t;
|
} applet_layout_t;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user