Skip to content

Commit a041acd

Browse files
Merge pull request #756 from LedgerHQ/rename-cx-files
Rename and move cx export/trampoline files
2 parents df1488d + 36bbf8c commit a041acd

File tree

7 files changed

+20
-208
lines changed

7 files changed

+20
-208
lines changed

include/cx_stubs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
// auto-generated by cxsdk.py
3+
// auto-generated by shared_export.py
44
#define _NR_cx_aes_dec_block 0x00
55
#define _NR_cx_aes_enc_block 0x01
66
#define _NR_cx_aes_gcm_check_tag 0x02

include/cx_trampoline.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

include/shared_trampoline.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#pragma once
2+
3+
#include "bolos_target.h"
4+
5+
#if defined(TARGET_NANOS)
6+
#define SHARED_TRAMPOLINE_ADDR 0x00120001
7+
#elif defined(TARGET_NANOX)
8+
#define SHARED_TRAMPOLINE_ADDR 0x00210001
9+
#elif defined(TARGET_NANOS2)
10+
#define SHARED_TRAMPOLINE_ADDR 0x00810001
11+
#elif defined(TARGET_STAX)
12+
#define SHARED_TRAMPOLINE_ADDR 0x00818001
13+
#elif defined(TARGET_FLEX)
14+
#define SHARED_TRAMPOLINE_ADDR 0x00818001
15+
#endif

lib_cxng/cx.export

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file contains the functions exported by cxlib. It is used by cxsdk.py to
1+
# This file contains the functions exported by cxlib. It is used by shared_export.py to
22
# generate asm stubs for the SDK and the CX functions table in cxlib.
33
#
44
# Making changes to this file (ie. removal, addition, ordering) require apps to

lib_cxng/src/cx_exported_functions.c

Lines changed: 0 additions & 172 deletions
This file was deleted.

lib_cxng/src/cx_trampoline.s

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/cx_stubs.S

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// auto-generated by cxsdk.py
2-
#include "cx_trampoline.h"
1+
// auto-generated by shared_export.py
2+
#include "shared_trampoline.h"
33
#include "cx_stubs.h"
44

55
.text
@@ -163,5 +163,5 @@ CX_TRAMPOLINE _NR_cx_cmac_finish cx_cmac_finish
163163

164164
.thumb_func
165165
cx_trampoline_helper:
166-
ldr r1, =CX_TRAMPOLINE_ADDR // _cx_trampoline address
166+
ldr r1, =SHARED_TRAMPOLINE_ADDR // _shared_trampoline address
167167
bx r1

0 commit comments

Comments
 (0)