conditional EFI_DFU_JUMP

This commit is contained in:
rusefillc 2023-05-24 09:58:22 -04:00
parent 4964770cf1
commit 91a25bad96
5 changed files with 10 additions and 12 deletions

View File

@ -29,6 +29,10 @@
#define EFI_BACKUP_SRAM TRUE
#endif
#ifndef EFI_DFU_JUMP
#define EFI_DFU_JUMP TRUE
#endif
#define EFI_DYNO_VIEW TRUE
#ifndef EFI_CDM_INTEGRATION

View File

@ -507,9 +507,9 @@ void executeTSCommand(uint16_t subsystem, uint16_t index) {
break;
case 0xba:
#if EFI_PROD_CODE
#if EFI_DFU_JUMP
jump_to_bootloader();
#endif /* EFI_PROD_CODE */
#endif /* EFI_DFU_JUMP */
break;
case 0xbb:

View File

@ -158,11 +158,3 @@ int getAdcChannelPin(adc_channel_e hwChannel) {
}
#endif /* HAL_USE_ADC */
#if EFI_PROD_CODE
void jump_to_bootloader() {
// todo:
// Will not return from here
NVIC_SystemReset();
}
#endif /* EFI_PROD_CODE */

View File

@ -121,7 +121,7 @@ int getAdcChannelPin(adc_channel_e hwChannel) {
#endif /* HAL_USE_ADC */
#if EFI_PROD_CODE
#if EFI_DFU_JUMP
#define BOOTLOADER_LOCATION 0x1C00001CUL
void jump_to_bootloader() {
typedef void (*bootloader_start_t)(void * arg);
@ -132,4 +132,4 @@ void jump_to_bootloader() {
// Will not return from here
NVIC_SystemReset();
}
#endif /* EFI_PROD_CODE */
#endif /* EFI_DFU_JUMP */

View File

@ -195,7 +195,9 @@ void runRusEfi() {
#endif
addConsoleAction(CMD_REBOOT, scheduleReboot);
#if EFI_DFU_JUMP
addConsoleAction(CMD_REBOOT_DFU, jump_to_bootloader);
#endif /* EFI_DFU_JUMP */
/**
* we need to initialize table objects before default configuration can set values