diff --git a/components/efuse/esp32s2/esp_efuse_table.c b/components/efuse/esp32s2/esp_efuse_table.c index 076615a85..3e774b548 100644 --- a/components/efuse/esp32s2/esp_efuse_table.c +++ b/components/efuse/esp32s2/esp_efuse_table.c @@ -17,7 +17,7 @@ #include #include "esp_efuse_table.h" -// md5_digest_table fc489601ff9b21658f4eb9c617ee072d +// md5_digest_table 21c19cced6c4c11c1f731e2ece7d74ab // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -88,7 +88,7 @@ static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE[] = { }; static const esp_efuse_desc_t WR_DIS_GROUP_3[] = { - {EFUSE_BLK0, 18, 1}, // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_TINY_BASIC DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION, + {EFUSE_BLK0, 18, 1}, // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION, }; static const esp_efuse_desc_t WR_DIS_BLK1[] = { @@ -299,10 +299,6 @@ static const esp_efuse_desc_t UART_PRINT_CHANNEL[] = { {EFUSE_BLK0, 130, 1}, // 0: UART0. 1: UART1, }; -static const esp_efuse_desc_t DIS_TINY_BASIC[] = { - {EFUSE_BLK0, 131, 1}, // Disable tiny basic console in ROM, -}; - static const esp_efuse_desc_t DIS_USB_DOWNLOAD_MODE[] = { {EFUSE_BLK0, 132, 1}, // Disable download through USB, }; @@ -513,7 +509,7 @@ const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE[] = { }; const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_3[] = { - &WR_DIS_GROUP_3[0], // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_TINY_BASIC DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION + &WR_DIS_GROUP_3[0], // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION NULL }; @@ -777,11 +773,6 @@ const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CHANNEL[] = { NULL }; -const esp_efuse_desc_t* ESP_EFUSE_DIS_TINY_BASIC[] = { - &DIS_TINY_BASIC[0], // Disable tiny basic console in ROM - NULL -}; - const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_DOWNLOAD_MODE[] = { &DIS_USB_DOWNLOAD_MODE[0], // Disable download through USB NULL diff --git a/components/efuse/esp32s2/esp_efuse_table.csv b/components/efuse/esp32s2/esp_efuse_table.csv index 0f95ec705..0d1b5c8ed 100644 --- a/components/efuse/esp32s2/esp_efuse_table.csv +++ b/components/efuse/esp32s2/esp_efuse_table.csv @@ -30,7 +30,7 @@ WR_DIS_KEY5_PURPOSE, EFUSE_BLK0, 13, 1, Write protection for key_purpose. KEY5 WR_DIS_SECURE_BOOT_EN, EFUSE_BLK0, 15, 1, Write protection for SECURE_BOOT_EN WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE,EFUSE_BLK0, 16, 1, Write protection for SECURE_BOOT_AGGRESSIVE_REVOKE - WR_DIS_GROUP_3, EFUSE_BLK0, 18, 1, Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_TINY_BASIC DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION + WR_DIS_GROUP_3, EFUSE_BLK0, 18, 1, Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_LEGACY_SPI_BOOT UART_PRINT_CHANNEL DIS_USB_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION WR_DIS_BLK1, EFUSE_BLK0, 20, 1, Write protection for EFUSE_BLK1. MAC_SPI_8M_SYS WR_DIS_SYS_DATA_PART1, EFUSE_BLK0, 21, 1, Write protection for EFUSE_BLK2. SYS_DATA_PART1 WR_DIS_USER_DATA, EFUSE_BLK0, 22, 1, Write protection for EFUSE_BLK3. USER_DATA @@ -92,7 +92,6 @@ DIS_DOWNLOAD_MODE, EFUSE_BLK0, 128, 1, Disble download mode include boot_mode[3:0] is 0 1 2 3 6 7 DIS_LEGACY_SPI_BOOT, EFUSE_BLK0, 129, 1, Disable_Legcy_SPI_boot mode include boot_mode[3:0] is 4 UART_PRINT_CHANNEL, EFUSE_BLK0, 130, 1, 0: UART0. 1: UART1 - DIS_TINY_BASIC, EFUSE_BLK0, 131, 1, Disable tiny basic console in ROM DIS_USB_DOWNLOAD_MODE, EFUSE_BLK0, 132, 1, Disable download through USB ENABLE_SECURITY_DOWNLOAD, EFUSE_BLK0, 133, 1, Enable security download mode UART_PRINT_CONTROL, EFUSE_BLK0, 134, 2, b00:force print. b01:control by GPIO46 - low level print. b10:control by GPIO46 - high level print. b11:force disable print. diff --git a/components/efuse/esp32s2/include/esp_efuse_table.h b/components/efuse/esp32s2/include/esp_efuse_table.h index 3eaf5600c..d2447e978 100644 --- a/components/efuse/esp32s2/include/esp_efuse_table.h +++ b/components/efuse/esp32s2/include/esp_efuse_table.h @@ -17,7 +17,7 @@ extern "C" { #endif -// md5_digest_table fc489601ff9b21658f4eb9c617ee072d +// md5_digest_table 21c19cced6c4c11c1f731e2ece7d74ab // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY. // If you want to change some fields, you need to change esp_efuse_table.csv file // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file. @@ -93,7 +93,6 @@ extern const esp_efuse_desc_t* ESP_EFUSE_FLASH_TPUW[]; extern const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_MODE[]; extern const esp_efuse_desc_t* ESP_EFUSE_DIS_LEGACY_SPI_BOOT[]; extern const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CHANNEL[]; -extern const esp_efuse_desc_t* ESP_EFUSE_DIS_TINY_BASIC[]; extern const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_DOWNLOAD_MODE[]; extern const esp_efuse_desc_t* ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD[]; extern const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CONTROL[]; diff --git a/components/efuse/include/esp_efuse.h b/components/efuse/include/esp_efuse.h index 23d05712c..47eb1d159 100644 --- a/components/efuse/include/esp_efuse.h +++ b/components/efuse/include/esp_efuse.h @@ -268,6 +268,7 @@ void esp_efuse_burn_new_values(void); */ void esp_efuse_reset(void); +#ifdef CONFIG_IDF_TARGET_ESP32 /* @brief Disable BASIC ROM Console via efuse * * By default, if booting from flash fails the ESP32 will boot a @@ -275,8 +276,12 @@ void esp_efuse_reset(void); * * Call this function (from bootloader or app) to permanently * disable the console on this chip. + * + * */ void esp_efuse_disable_basic_rom_console(void); +#endif + /* @brief Write random data to efuse key block write registers * diff --git a/components/efuse/src/esp32s2/esp_efuse_fields.c b/components/efuse/src/esp32s2/esp_efuse_fields.c index 6299fb31e..015a2bc76 100644 --- a/components/efuse/src/esp32s2/esp_efuse_fields.c +++ b/components/efuse/src/esp32s2/esp_efuse_fields.c @@ -45,20 +45,6 @@ uint32_t esp_efuse_get_pkg_ver(void) return pkg_ver; } -// Disable BASIC ROM Console via efuse -void esp_efuse_disable_basic_rom_console(void) -{ - uint8_t dis_tiny_basic = 0; - uint8_t dis_legacy_spi_boot = 0; - esp_efuse_read_field_blob(ESP_EFUSE_DIS_TINY_BASIC, &dis_tiny_basic, 1); - esp_efuse_read_field_blob(ESP_EFUSE_DIS_LEGACY_SPI_BOOT, &dis_legacy_spi_boot, 1); - if (dis_tiny_basic == 0 || dis_legacy_spi_boot == 0) { - esp_efuse_write_field_cnt(ESP_EFUSE_DIS_TINY_BASIC, 1); - esp_efuse_write_field_cnt(ESP_EFUSE_DIS_LEGACY_SPI_BOOT, 1); - ESP_EARLY_LOGI(TAG, "Disable tiny basic console in ROM and Disable_Legcy_SPI_boot mode..."); - } -} - void esp_efuse_write_random_key(uint32_t blk_wdata0_reg) { uint32_t buf[8]; diff --git a/components/esp32s2/Kconfig b/components/esp32s2/Kconfig index 5eb54e429..7cd35a1e9 100644 --- a/components/esp32s2/Kconfig +++ b/components/esp32s2/Kconfig @@ -490,18 +490,6 @@ menu "ESP32S2-specific" Increase this option if the 32k crystal oscillator does not start and switches to internal RC. - config ESP32S2_DISABLE_BASIC_ROM_CONSOLE - bool "Permanently disable BASIC ROM Console" - default n - help - If set, the first time the app boots it will disable the BASIC ROM Console - permanently (by burning an eFuse). - - Otherwise, the BASIC ROM Console starts on reset if no valid bootloader is - read from the flash. - - (Enabling secure boot also disables the BASIC ROM Console by default.) - config ESP32S2_NO_BLOBS bool "No Binary Blobs" depends on !BT_ENABLED diff --git a/components/esp32s2/cpu_start.c b/components/esp32s2/cpu_start.c index cc4c2f2e2..db85aa3ef 100644 --- a/components/esp32s2/cpu_start.c +++ b/components/esp32s2/cpu_start.c @@ -283,9 +283,6 @@ void start_cpu0_default(void) #if CONFIG_ESP32S2_BROWNOUT_DET esp_brownout_init(); -#endif -#if CONFIG_ESP32S2_DISABLE_BASIC_ROM_CONSOLE - esp_efuse_disable_basic_rom_console(); #endif rtc_gpio_force_hold_dis_all();