Skip to content

Commit

Permalink
Merge branch 'bugfix/remove_undefined_rom_funcs' into 'master'
Browse files Browse the repository at this point in the history
esp_rom:  cleanup unsupported functions

See merge request espressif/esp-idf!22041
  • Loading branch information
ESP-Marius committed Jan 29, 2023
2 parents 236fa5e + 0eda9b9 commit 43c899b
Show file tree
Hide file tree
Showing 54 changed files with 64 additions and 2,859 deletions.
1 change: 0 additions & 1 deletion components/esp_rom/esp32c2/ld/esp32c2.rom.api.ld
Expand Up @@ -20,7 +20,6 @@ PROVIDE ( esp_rom_gpio_connect_in_signal = gpio_matrix_in );
PROVIDE ( esp_rom_gpio_connect_out_signal = gpio_matrix_out );

PROVIDE ( esp_rom_efuse_mac_address_crc8 = esp_crc8 );
PROVIDE ( esp_rom_efuse_get_flash_wp_gpio = ets_efuse_get_wp_pad );
PROVIDE ( esp_rom_efuse_is_secure_boot_enabled = ets_efuse_secure_boot_enabled );

PROVIDE ( esp_rom_uart_flush_tx = uart_tx_flush );
Expand Down
2 changes: 0 additions & 2 deletions components/esp_rom/esp32c3/ld/esp32c3.rom.api.ld
Expand Up @@ -25,8 +25,6 @@ PROVIDE ( esp_rom_uart_tx_one_char = uart_tx_one_char );
PROVIDE ( esp_rom_uart_tx_wait_idle = uart_tx_wait_idle );
PROVIDE ( esp_rom_uart_rx_one_char = uart_rx_one_char );
PROVIDE ( esp_rom_uart_rx_string = UartRxString );
PROVIDE ( esp_rom_uart_putc = ets_write_char_uart );


PROVIDE ( esp_rom_md5_init = MD5Init );
PROVIDE ( esp_rom_md5_update = MD5Update );
Expand Down
278 changes: 0 additions & 278 deletions components/esp_rom/include/esp32c2/rom/cache.h
Expand Up @@ -269,54 +269,6 @@ void Cache_Occupy_ICache_MEMORY(cache_array_t icache_low);
*/
void Cache_Get_Mode(struct cache_mode * mode);

/**
* @brief set ICache modes: cache size, associate ways and cache line size.
* Please do not call this function in your SDK application.
*
* @param cache_size_t cache_size : the cache size, can be CACHE_SIZE_HALF and CACHE_SIZE_FULL
*
* @param cache_ways_t ways : the associate ways of cache, can be CACHE_4WAYS_ASSOC and CACHE_8WAYS_ASSOC
*
* @param cache_line_size_t cache_line_size : the cache line size, can be CACHE_LINE_SIZE_16B, CACHE_LINE_SIZE_32B and CACHE_LINE_SIZE_64B
*
* return none
*/
void Cache_Set_ICache_Mode(cache_size_t cache_size, cache_ways_t ways, cache_line_size_t cache_line_size);

/**
* @brief set DCache modes: cache size, associate ways and cache line size.
* Please do not call this function in your SDK application.
*
* @param cache_size_t cache_size : the cache size, can be CACHE_SIZE_8KB and CACHE_SIZE_16KB
*
* @param cache_ways_t ways : the associate ways of cache, can be CACHE_4WAYS_ASSOC and CACHE_8WAYS_ASSOC
*
* @param cache_line_size_t cache_line_size : the cache line size, can be CACHE_LINE_SIZE_16B, CACHE_LINE_SIZE_32B and CACHE_LINE_SIZE_64B
*
* return none
*/
void Cache_Set_DCache_Mode(cache_size_t cache_size, cache_ways_t ways, cache_line_size_t cache_line_size);

/**
* @brief check if the address is accessed through ICache.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr : the address to check.
*
* @return 1 if the address is accessed through ICache, 0 if not.
*/
uint32_t Cache_Address_Through_ICache(uint32_t addr);

/**
* @brief check if the address is accessed through DCache.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr : the address to check.
*
* @return 1 if the address is accessed through DCache, 0 if not.
*/
uint32_t Cache_Address_Through_DCache(uint32_t addr);

/**
* @brief Init mmu owner register to make i/d cache use half mmu entries.
*
Expand Down Expand Up @@ -374,166 +326,6 @@ void Cache_Invalidate_ICache_All(void);
*/
void Cache_Mask_All(void);

/**
* @brief Suspend ICache auto preload operation, then you can resume it after some ICache operations.
* Please do not call this function in your SDK application.
*
* @param None
*
* @return uint32_t : 0 for ICache not auto preload before suspend.
*/
uint32_t Cache_Suspend_ICache_Autoload(void);

/**
* @brief Resume ICache auto preload operation after some ICache operations.
* Please do not call this function in your SDK application.
*
* @param uint32_t autoload : 0 for ICache not auto preload before suspend.
*
* @return None.
*/
void Cache_Resume_ICache_Autoload(uint32_t autoload);

/**
* @brief Start an ICache manual preload, will suspend auto preload of ICache.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr : start address of the preload region.
*
* @param uint32_t size : size of the preload region, should not exceed the size of ICache.
*
* @param uint32_t order : the preload order, 0 for positive, other for negative
*
* @return uint32_t : 0 for ICache not auto preload before manual preload.
*/
uint32_t Cache_Start_ICache_Preload(uint32_t addr, uint32_t size, uint32_t order);

/**
* @brief Return if the ICache manual preload done.
* Please do not call this function in your SDK application.
*
* @param None
*
* @return uint32_t : 0 for ICache manual preload not done.
*/
uint32_t Cache_ICache_Preload_Done(void);

/**
* @brief End the ICache manual preload to resume auto preload of ICache.
* Please do not call this function in your SDK application.
*
* @param uint32_t autoload : 0 for ICache not auto preload before manual preload.
*
* @return None
*/
void Cache_End_ICache_Preload(uint32_t autoload);

/**
* @brief Config autoload parameters of ICache.
* Please do not call this function in your SDK application.
*
* @param struct autoload_config * config : autoload parameters.
*
* @return None
*/
void Cache_Config_ICache_Autoload(const struct autoload_config * config);

/**
* @brief Enable auto preload for ICache.
* Please do not call this function in your SDK application.
*
* @param None
*
* @return None
*/
void Cache_Enable_ICache_Autoload(void);

/**
* @brief Disable auto preload for ICache.
* Please do not call this function in your SDK application.
*
* @param None
*
* @return None
*/
void Cache_Disable_ICache_Autoload(void);

/**
* @brief Config a group of prelock parameters of ICache.
* Please do not call this function in your SDK application.
*
* @param struct lock_config * config : a group of lock parameters.
*
* @return None
*/

void Cache_Enable_ICache_PreLock(const struct lock_config *config);

/**
* @brief Disable a group of prelock parameters for ICache.
* However, the locked data will not be released.
* Please do not call this function in your SDK application.
*
* @param uint16_t group : 0 for group0, 1 for group1.
*
* @return None
*/
void Cache_Disable_ICache_PreLock(uint16_t group);

/**
* @brief Lock the cache items for ICache.
* Operation will be done CACHE_LINE_SIZE aligned.
* If the region is not in ICache addr room, nothing will be done.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr: start address to lock
*
* @param uint32_t items: cache lines to lock, items * cache_line_size should not exceed the bus address size(16MB/32MB/64MB)
*
* @return None
*/
void Cache_Lock_ICache_Items(uint32_t addr, uint32_t items);

/**
* @brief Unlock the cache items for ICache.
* Operation will be done CACHE_LINE_SIZE aligned.
* If the region is not in ICache addr room, nothing will be done.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr: start address to unlock
*
* @param uint32_t items: cache lines to unlock, items * cache_line_size should not exceed the bus address size(16MB/32MB/64MB)
*
* @return None
*/
void Cache_Unlock_ICache_Items(uint32_t addr, uint32_t items);

/**
* @brief Lock the cache items in tag memory for ICache or DCache.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr : start address of lock region.
*
* @param uint32_t size : size of lock region.
*
* @return 0 for success
* 1 for invalid argument
*/
int Cache_Lock_Addr(uint32_t addr, uint32_t size);

/**
* @brief Unlock the cache items in tag memory for ICache or DCache.
* Please do not call this function in your SDK application.
*
* @param uint32_t addr : start address of unlock region.
*
* @param uint32_t size : size of unlock region.
*
* @return 0 for success
* 1 for invalid argument
*/
int Cache_Unlock_Addr(uint32_t addr, uint32_t size);

/**
* @brief Disable ICache access for the cpu.
* This operation will make all ICache tag memory invalid, CPU can't access ICache, ICache will keep idle.
Expand Down Expand Up @@ -711,76 +503,6 @@ uint32_t Cache_Get_IROM_MMU_End(void);
*/
uint32_t Cache_Get_DROM_MMU_End(void);

/**
* @brief Lock the permission control section configuration. After lock, any
* configuration modification will be bypass. Digital reset will clear the lock!
* Please do not call this function in your SDK application.
*
* @param int ibus : 1 for lock ibus pms, 0 for lock dbus pms
*
* @return None
*/
void Cache_Pms_Lock(int ibus);

/**
* @brief Set three ibus pms boundary address, which will determine pms reject section and section 1/2.
* Please do not call this function in your SDK application.
*
* @param uint32_t ibus_boundary0_addr : vaddress for split line0
*
* @param uint32_t ibus_boundary1_addr : vaddress for split line1
*
* @param uint32_t ibus_boundary2_addr : vaddress for split line2
*
* @return int : ESP_ROM_ERR_INVALID_ARG for invalid address, 0 for success
*/
int Cache_Ibus_Pms_Set_Addr(uint32_t ibus_boundary0_addr, uint32_t ibus_boundary1_addr, uint32_t ibus_boundary2_addr);

/**
* @brief Set three ibus pms attribute, which will determine pms in different section and world.
* Please do not call this function in your SDK application.
*
* @param uint32_t ibus_pms_sct2_attr : attr for section2
*
* @param uint32_t ibus_pms_sct1_attr : attr for section1
*
* @return None
*/
void Cache_Ibus_Pms_Set_Attr(uint32_t ibus_pms_sct2_attr, uint32_t ibus_pms_sct1_attr);

/**
* @brief Set three dbus pms boundary address, which will determine pms reject section and section 1/2.
* Please do not call this function in your SDK application.
*
* @param uint32_t dbus_boundary0_addr : vaddress for split line0
*
* @param uint32_t dbus_boundary1_addr : vaddress for split line1
*
* @param uint32_t dbus_boundary2_addr : vaddress for split line2
*
* @return int : ESP_ROM_ERR_INVALID_ARG for invalid address, 0 for success
*/
int Cache_Dbus_Pms_Set_Addr(uint32_t dbus_boundary0_addr, uint32_t dbus_boundary1_addr, uint32_t dbus_boundary2_addr);

/**
* @brief Set three dbus pms attribute, which will determine pms in different section and world.
* Please do not call this function in your SDK application.
*
* @param uint32_t dbus_pms_sct2_attr : attr for section2
*
* @param uint32_t dbus_pms_sct1_attr : attr for section1
*
* @return None
*/
void Cache_Dbus_Pms_Set_Attr(uint32_t dbus_pms_sct2_attr, uint32_t dbus_pms_sct1_attr);

/**
* @brief Used by SPI flash mmap
*
*/
uint32_t flash_instr_rodata_start_page(uint32_t bus);
uint32_t flash_instr_rodata_end_page(uint32_t bus);

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 43c899b

Please sign in to comment.