fix(esp_flash): fixed issue of escaping boundary check

Also patched corresponding ROM functions
This commit is contained in:
Xiao Xufeng
2025-09-10 16:36:57 +08:00
committed by Michael (XIAO Xufeng)
parent edf60a792f
commit 9cfc314c5b
17 changed files with 208 additions and 47 deletions
+3 -3
View File
@@ -272,15 +272,15 @@ PROVIDE( esp_flash_chip_driver_initialized = 0x40000430 );
PROVIDE( esp_flash_read_id = 0x40000434 );
PROVIDE( esp_flash_get_size = 0x40000438 );
PROVIDE( esp_flash_erase_chip = 0x4000043c );
PROVIDE( esp_flash_erase_region = 0x40000440 );
PROVIDE( rom_esp_flash_erase_region = 0x40000440 );
PROVIDE( esp_flash_get_chip_write_protect = 0x40000444 );
PROVIDE( esp_flash_set_chip_write_protect = 0x40000448 );
PROVIDE( esp_flash_get_protectable_regions = 0x4000044c );
PROVIDE( esp_flash_get_protected_region = 0x40000450 );
PROVIDE( esp_flash_set_protected_region = 0x40000454 );
PROVIDE( esp_flash_read = 0x40000458 );
PROVIDE( esp_flash_write = 0x4000045c );
PROVIDE( esp_flash_write_encrypted = 0x40000460 );
PROVIDE( rom_esp_flash_write = 0x4000045c );
PROVIDE( rom_esp_flash_write_encrypted = 0x40000460 );
PROVIDE( esp_flash_read_encrypted = 0x40000464 );
PROVIDE( esp_flash_get_io_mode = 0x40000468 );
PROVIDE( esp_flash_set_io_mode = 0x4000046c );
+2 -2
View File
@@ -267,8 +267,8 @@ PROVIDE( esp_flash_get_protectable_regions = 0x40000318 );
PROVIDE( esp_flash_get_protected_region = 0x4000031c );
PROVIDE( esp_flash_set_protected_region = 0x40000320 );
PROVIDE( esp_flash_read = 0x40000324 );
PROVIDE( esp_flash_write = 0x40000328 );
PROVIDE( esp_flash_write_encrypted = 0x4000032c );
PROVIDE( rom_esp_flash_write = 0x40000328 );
PROVIDE( rom_esp_flash_write_encrypted = 0x4000032c );
PROVIDE( esp_flash_read_encrypted = 0x40000330 );
PROVIDE( esp_flash_get_io_mode = 0x40000334 );
PROVIDE( esp_flash_set_io_mode = 0x40000338 );
@@ -51,15 +51,15 @@ esp_flash_chip_driver_initialized = 0x40000240;
esp_flash_read_id = 0x40000244;
esp_flash_get_size = 0x40000248;
esp_flash_erase_chip = 0x4000024c;
esp_flash_erase_region = 0x40000250;
rom_esp_flash_erase_region = 0x40000250;
esp_flash_get_chip_write_protect = 0x40000254;
esp_flash_set_chip_write_protect = 0x40000258;
esp_flash_get_protectable_regions = 0x4000025c;
esp_flash_get_protected_region = 0x40000260;
esp_flash_set_protected_region = 0x40000264;
esp_flash_read = 0x40000268;
esp_flash_write = 0x4000026c;
esp_flash_write_encrypted = 0x40000270;
rom_esp_flash_write = 0x4000026c;
rom_esp_flash_write_encrypted = 0x40000270;
esp_flash_read_encrypted = 0x40000274;
esp_flash_get_io_mode = 0x40000278;
esp_flash_set_io_mode = 0x4000027c;
@@ -50,15 +50,15 @@ esp_flash_chip_driver_initialized = 0x4000022c;
esp_flash_read_id = 0x40000230;
esp_flash_get_size = 0x40000234;
esp_flash_erase_chip = 0x40000238;
esp_flash_erase_region = 0x4000023c;
rom_esp_flash_erase_region = 0x4000023c;
esp_flash_get_chip_write_protect = 0x40000240;
esp_flash_set_chip_write_protect = 0x40000244;
esp_flash_get_protectable_regions = 0x40000248;
esp_flash_get_protected_region = 0x4000024c;
esp_flash_set_protected_region = 0x40000250;
esp_flash_read = 0x40000254;
esp_flash_write = 0x40000258;
esp_flash_write_encrypted = 0x4000025c;
rom_esp_flash_write = 0x40000258;
rom_esp_flash_write_encrypted = 0x4000025c;
esp_flash_read_encrypted = 0x40000260;
esp_flash_get_io_mode = 0x40000264;
esp_flash_set_io_mode = 0x40000268;
@@ -51,15 +51,15 @@ esp_flash_chip_driver_initialized = 0x40000240;
esp_flash_read_id = 0x40000244;
esp_flash_get_size = 0x40000248;
esp_flash_erase_chip = 0x4000024c;
esp_flash_erase_region = 0x40000250;
rom_esp_flash_erase_region = 0x40000250;
esp_flash_get_chip_write_protect = 0x40000254;
esp_flash_set_chip_write_protect = 0x40000258;
esp_flash_get_protectable_regions = 0x4000025c;
esp_flash_get_protected_region = 0x40000260;
esp_flash_set_protected_region = 0x40000264;
esp_flash_read = 0x40000268;
esp_flash_write = 0x4000026c;
esp_flash_write_encrypted = 0x40000270;
rom_esp_flash_write = 0x4000026c;
rom_esp_flash_write_encrypted = 0x40000270;
esp_flash_read_encrypted = 0x40000274;
esp_flash_get_io_mode = 0x40000278;
esp_flash_set_io_mode = 0x4000027c;
@@ -50,15 +50,15 @@ esp_flash_chip_driver_initialized = 0x40000224;
esp_flash_read_id = 0x40000228;
esp_flash_get_size = 0x4000022c;
esp_flash_erase_chip = 0x40000230;
esp_flash_erase_region = 0x40000234;
rom_esp_flash_erase_region = 0x40000234;
esp_flash_get_chip_write_protect = 0x40000238;
esp_flash_set_chip_write_protect = 0x4000023c;
esp_flash_get_protectable_regions = 0x40000240;
esp_flash_get_protected_region = 0x40000244;
esp_flash_set_protected_region = 0x40000248;
esp_flash_read = 0x4000024c;
esp_flash_write = 0x40000250;
esp_flash_write_encrypted = 0x40000254;
rom_esp_flash_write = 0x40000250;
rom_esp_flash_write_encrypted = 0x40000254;
esp_flash_read_encrypted = 0x40000258;
esp_flash_get_io_mode = 0x4000025c;
esp_flash_set_io_mode = 0x40000260;
+2 -2
View File
@@ -318,8 +318,8 @@ PROVIDE( esp_flash_get_protectable_regions = 0x40001110 );
PROVIDE( esp_flash_get_protected_region = 0x4000111c );
PROVIDE( esp_flash_set_protected_region = 0x40001128 );
PROVIDE( esp_flash_read = 0x40001134 );
PROVIDE( esp_flash_write = 0x40001140 );
PROVIDE( esp_flash_write_encrypted = 0x4000114c );
PROVIDE( rom_esp_flash_write = 0x40001140 );
PROVIDE( rom_esp_flash_write_encrypted = 0x4000114c );
PROVIDE( esp_flash_read_encrypted = 0x40001158 );
PROVIDE( esp_flash_get_io_mode = 0x40001164 );
PROVIDE( esp_flash_set_io_mode = 0x40001170 );