« Previous | Next » 

Revision f62cafd4

IDf62cafd4c87fad7bb9b9544b4cf4991d34764b11

Added by Sebastian Ottlik over 10 years ago

target-arm: fix ARMv7M stack alignment on reset

When the initial SP is loaded from the vector table on ARMv7M systems the two
least significant bits are ignored as the stack is always aligned at a four byte
boundary (see ARM DDI 0403C, B1.4.1 and B1.5.5). So far QEMU did not ignore
these bits leading to a stack alignment inconsitent with real hardware for
binaries that rely on this behaviour. This patch fixes this issue by masking the
two least significant bits when loading the SP.

Signed-off-by: Sebastian Ottlik <>
Reviewed-by: Peter Maydell <>
Message-id:
Signed-off-by: Peter Maydell <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences