zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.01k stars 6.16k forks source link

NXP cortexm7 platform set flexspi_nor in device type by MPU need avoid unaligned data access. #14483

Open hakehuang opened 5 years ago

hakehuang commented 5 years ago

Describe the situation according to the DDI0403E_d_armv7m_arm.pdf A3.5.7 paragraph 3

An instruction that generates an unaligned memory access to Device or Strongly-ordered memory is
UNPREDICTABLE.

so if set the flexspi_nor memory area to device type in MPU, then we shall be careful not to generate unaligned memory access to those area.

hakehuang commented 5 years ago

@MaureenHelm

aurel32 commented 5 years ago

I think this also applies to any Cortex-M4 or Cortex-M7 supported by Zephyr. I don't think it's possible to do configure the flash region as device or strongly ordered in practice.

dleach02 commented 1 week ago

@hakehuang this is an old item and I'm trying to understand what is being requested for us to do?

hakehuang commented 1 week ago

@hakehuang this is an old item and I'm trying to understand what is being requested for us to do? I don't think it's possible to do configure the flash region as device or strongly ordered in practice.

@dleach02 the thing is in two ways:

  1. in normal application, we need ensure the flash region is not configure as device or strongly ordered.
  2. in boot loader, we need ensure the flash access is aligned.
dleach02 commented 1 week ago

@aurel32 comment seems to suggest that this would be a generic thing across all platforms.