mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-13 17:44:38 +02:00
hal: mpu: fix signed overflow error
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||||
{
|
{
|
||||||
// vpn - id
|
// vpn - id
|
||||||
// 0x00000000 = 0
|
// 0x00000000 = 0
|
||||||
@@ -33,7 +33,7 @@ static inline uint32_t mpu_ll_id_to_addr(int id)
|
|||||||
// 0xa0000000 = 5
|
// 0xa0000000 = 5
|
||||||
// 0xc0000000 = 6
|
// 0xc0000000 = 6
|
||||||
// 0xe0000000 = 7
|
// 0xe0000000 = 7
|
||||||
return (unsigned)id * SOC_MPU_MIN_REGION_SIZE;
|
return id * SOC_MPU_MIN_REGION_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void mpu_ll_set_region_rw(uint32_t addr)
|
static inline void mpu_ll_set_region_rw(uint32_t addr)
|
||||||
|
@@ -22,7 +22,7 @@ extern "C" {
|
|||||||
|
|
||||||
/* This LL is currently unused for ESP32-C3 - cleanup is TODO ESP32-C3 IDF-2375 */
|
/* This LL is currently unused for ESP32-C3 - cleanup is TODO ESP32-C3 IDF-2375 */
|
||||||
|
|
||||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||||
{
|
{
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||||
{
|
{
|
||||||
// vpn - id
|
// vpn - id
|
||||||
// 0x00000000 = 0
|
// 0x00000000 = 0
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static inline uint32_t mpu_ll_id_to_addr(int id)
|
static inline uint32_t mpu_ll_id_to_addr(unsigned id)
|
||||||
{
|
{
|
||||||
// vpn - id
|
// vpn - id
|
||||||
// 0x00000000 = 0
|
// 0x00000000 = 0
|
||||||
|
@@ -165,7 +165,7 @@
|
|||||||
/*-------------------------- MPU CAPS ----------------------------------------*/
|
/*-------------------------- MPU CAPS ----------------------------------------*/
|
||||||
//TODO: correct the caller and remove unsupported lines
|
//TODO: correct the caller and remove unsupported lines
|
||||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||||
|
@@ -149,7 +149,7 @@
|
|||||||
/*-------------------------- MPU CAPS ----------------------------------------*/
|
/*-------------------------- MPU CAPS ----------------------------------------*/
|
||||||
//TODO: correct the caller and remove unsupported lines
|
//TODO: correct the caller and remove unsupported lines
|
||||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
#define SOC_MPU_CONFIGURABLE_REGIONS_SUPPORTED 0
|
||||||
#define SOC_MPU_MIN_REGION_SIZE 0x20000000
|
#define SOC_MPU_MIN_REGION_SIZE 0x20000000U
|
||||||
#define SOC_MPU_REGIONS_MAX_NUM 8
|
#define SOC_MPU_REGIONS_MAX_NUM 8
|
||||||
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
#define SOC_MPU_REGION_RO_SUPPORTED 0
|
||||||
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
#define SOC_MPU_REGION_WO_SUPPORTED 0
|
||||||
|
Reference in New Issue
Block a user