mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'bugfix/lc_not_wakeup_v6.0' into 'release/v6.0'
fix(ble): Fix restore write-back error caused by memory allocated in PSRAM(v6.0) See merge request espressif/esp-idf!46000
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -127,7 +127,7 @@ do{\
|
|||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
#define OSI_FUNCS_TIME_BLOCKING 0xffffffff
|
||||||
#define OSI_VERSION 0x0001000A
|
#define OSI_VERSION 0x0001000B
|
||||||
#define OSI_MAGIC_VALUE 0xFADEBEAD
|
#define OSI_MAGIC_VALUE 0xFADEBEAD
|
||||||
|
|
||||||
#define BLE_PWR_HDL_INVL 0xFFFF
|
#define BLE_PWR_HDL_INVL 0xFFFF
|
||||||
@@ -232,6 +232,7 @@ struct osi_funcs_t {
|
|||||||
void (* _esp_hw_power_down)(void);
|
void (* _esp_hw_power_down)(void);
|
||||||
void (* _esp_hw_power_up)(void);
|
void (* _esp_hw_power_up)(void);
|
||||||
void (* _ets_backup_dma_copy)(uint32_t reg, uint32_t mem_addr, uint32_t num, bool to_rem);
|
void (* _ets_backup_dma_copy)(uint32_t reg, uint32_t mem_addr, uint32_t num, bool to_rem);
|
||||||
|
void *(* _malloc_retention)(size_t size);
|
||||||
void (* _ets_delay_us)(uint32_t us);
|
void (* _ets_delay_us)(uint32_t us);
|
||||||
void (* _btdm_rom_table_ready)(void);
|
void (* _btdm_rom_table_ready)(void);
|
||||||
bool (* _coex_bt_wakeup_request)(void);
|
bool (* _coex_bt_wakeup_request)(void);
|
||||||
@@ -373,6 +374,7 @@ static int task_create_wrapper(void *task_func, const char *name, uint32_t stack
|
|||||||
static void task_delete_wrapper(void *task_handle);
|
static void task_delete_wrapper(void *task_handle);
|
||||||
static bool is_in_isr_wrapper(void);
|
static bool is_in_isr_wrapper(void);
|
||||||
static void *malloc_internal_wrapper(size_t size);
|
static void *malloc_internal_wrapper(size_t size);
|
||||||
|
static void *malloc_retention_wrapper(size_t size);
|
||||||
static int read_mac_wrapper(uint8_t mac[6]);
|
static int read_mac_wrapper(uint8_t mac[6]);
|
||||||
static void srand_wrapper(unsigned int seed);
|
static void srand_wrapper(unsigned int seed);
|
||||||
static int rand_wrapper(void);
|
static int rand_wrapper(void);
|
||||||
@@ -452,6 +454,7 @@ static const struct osi_funcs_t osi_funcs_ro = {
|
|||||||
._cause_sw_intr_to_core = NULL,
|
._cause_sw_intr_to_core = NULL,
|
||||||
._malloc = malloc,
|
._malloc = malloc,
|
||||||
._malloc_internal = malloc_internal_wrapper,
|
._malloc_internal = malloc_internal_wrapper,
|
||||||
|
._malloc_retention = malloc_retention_wrapper,
|
||||||
._free = free,
|
._free = free,
|
||||||
._read_efuse_mac = read_mac_wrapper,
|
._read_efuse_mac = read_mac_wrapper,
|
||||||
._srand = srand_wrapper,
|
._srand = srand_wrapper,
|
||||||
@@ -1059,6 +1062,15 @@ static void *malloc_internal_wrapper(size_t size)
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void *malloc_retention_wrapper(size_t size)
|
||||||
|
{
|
||||||
|
void *p = heap_caps_malloc(size, MALLOC_CAP_RETENTION);
|
||||||
|
if(p == NULL) {
|
||||||
|
ESP_LOGE(BT_LOG_TAG, "Malloc failed");
|
||||||
|
}
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
void *malloc_ble_controller_mem(size_t size)
|
void *malloc_ble_controller_mem(size_t size)
|
||||||
{
|
{
|
||||||
void *p = heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
|
void *p = heap_caps_malloc(size, BLE_CONTROLLER_MALLOC_CAPS);
|
||||||
|
|||||||
Reference in New Issue
Block a user