Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/mpu/arm_core_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <kernel.h>
#include <soc.h>

#include <arch/arm/cortex_m/mpu/arm_core_mpu_dev.h>
#include "arm_core_mpu_dev.h"
#include <linker/linker-defs.h>

#define LOG_LEVEL CONFIG_MPU_LOG_LEVEL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,6 @@ struct k_thread;
* ARM_MPU support.
*/

/**
* @brief enable the MPU
*/
void arm_core_mpu_enable(void);

/**
* @brief disable the MPU
*/
void arm_core_mpu_disable(void);

/**
* @brief configure a set of fixed (static) MPU regions
*
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/mpu/arm_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <init.h>
#include <kernel.h>
#include <soc.h>
#include <arch/arm/cortex_m/mpu/arm_core_mpu_dev.h>
#include "arm_core_mpu_dev.h"
#include <arch/arm/cortex_m/mpu/arm_core_mpu.h>
#include <linker/linker-defs.h>

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/mpu/nxp_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <init.h>
#include <kernel.h>
#include <soc.h>
#include <arch/arm/cortex_m/mpu/arm_core_mpu_dev.h>
#include "arm_core_mpu_dev.h"
#include <arch/arm/cortex_m/mpu/arm_core_mpu.h>
#include <misc/__assert.h>
#include <linker/linker-defs.h>
Expand Down
2 changes: 1 addition & 1 deletion tests/kernel/mem_protect/userspace/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#endif

#if defined(CONFIG_ARM)
#include <arch/arm/cortex_m/mpu/arm_core_mpu_dev.h>
extern void arm_core_mpu_disable(void);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this made me look at the actual test, why do we have a disable_mmu_mpu() if we don't have an exposed API related to it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galak I get the feeling that this test is there to show that we can't disable the MPU from user mode, right @andrewboie ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't object if we deleted that test. There's some other dubious cases in there as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that it "tests" that user-mode can't play with the mpu :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we trying to prove whether the CPU works or the software?
Proving that the CPU works is a waste of time IMO

Copy link
Member Author

@ioannisg ioannisg May 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, that's in fact, correct. So do you confirm that this test was all about verifying hardware, in the first place? If so, I'll just add a commit, to delete it :)

#endif

#define INFO(fmt, ...) printk(fmt, ##__VA_ARGS__)
Expand Down