Skip to content

Commit

Permalink
Merge pull request #836 from LedgerHQ/integrate-HAVE_MCU_SERIAL_STORA…
Browse files Browse the repository at this point in the history
…GE-flag

Integrate HAVE_MCU_SERIAL_STORAGE flag code
  • Loading branch information
nroggeman-ledger authored Jan 2, 2025
2 parents b1727b3 + 299ed47 commit a2be76c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions Makefile.defines
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,6 @@ ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_NANOX TARGET_NANOS2))
DEFINES += HAVE_SE_SCREEN
# Button is directly connected to the SE
DEFINES += HAVE_SE_BUTTON
# MCU serial is stored on board of the SE
DEFINES += HAVE_MCU_SERIAL_STORAGE
DEFINES += HAVE_FONTS
DEFINES += HAVE_INAPP_BLE_PAIRING
DEFINES += HAVE_BATTERY
Expand Down
4 changes: 1 addition & 3 deletions include/os_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@ SYSCALL unsigned int os_flags(void);
SYSCALL unsigned int os_version(unsigned char *version PLENGTH(maxlength), unsigned int maxlength);
/* Grab the SE serial number */
SYSCALL unsigned int os_serial(unsigned char *serial PLENGTH(maxlength), unsigned int maxlength);
#ifdef HAVE_MCU_SERIAL_STORAGE
/* Grab the SEPROXYHAL's MCU serial number */
SYSCALL unsigned int os_seph_serial(unsigned char *serial PLENGTH(maxlength),
unsigned int maxlength);
#endif // HAVE_MCU_SERIAL_STORAGE
/* Grab the SEPROXYHAL's feature set */
/* Grab the SEPROXYHAL's feature set */
SYSCALL unsigned int os_seph_features(void);
/* Grab the SEPROXYHAL's version */
SYSCALL unsigned int os_seph_version(unsigned char *version PLENGTH(maxlength),
Expand Down
2 changes: 0 additions & 2 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@

#define SYSCALL_os_standby_ID 0x0000d0d0

#ifdef HAVE_MCU_SERIAL_STORAGE
#define SYSCALL_os_seph_serial_ID 0x0200006d
#endif // HAVE_MCU_SERIAL_STORAGE

#if defined(HAVE_LANGUAGE_PACK)
#define SYSCALL_list_language_packs_ID 0x01000153
Expand Down
2 changes: 0 additions & 2 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1954,15 +1954,13 @@ bolos_err_t ENDORSEMENT_revoke_slot(ENDORSEMENT_revoke_id_t revoke_id)
}
#endif // HAVE_BOLOS

#ifdef HAVE_MCU_SERIAL_STORAGE
unsigned int os_seph_serial(unsigned char *serial, unsigned int maxlength)
{
unsigned int parameters[2];
parameters[0] = (unsigned int) serial;
parameters[1] = (unsigned int) maxlength;
return (unsigned int) SVC_Call(SYSCALL_os_seph_serial_ID, parameters);
}
#endif

#ifdef HAVE_SE_SCREEN
void screen_clear(void)
Expand Down

0 comments on commit a2be76c

Please sign in to comment.