Re: Data to fill into unused program space on ARM7.



In article <hoCdnYM27N58SqLVnZ2dnUVZ_uqdnZ2d@xxxxxxxxxxxx>,
DanishGuy <mij@xxxxxxxxx> wrote:
One problem with most of the solutions is that I'm using ARM and THUMB
instructions. A THUMB jump to the reset vector might mean something else in
ARM. The best solution would be to find some data that is illegal in both
ARM and THUMB. If for instance 0xDEAD is illegal for THUMB, and 0xDEADDEAD
is illegal for ARM, them my problem would be solved.

Does anybody have a suggestion?

Looking at the ARM manual, the pattern 0xEFFF might work. In Thumb mode,
it's an undefined instruction (BLX with the LSB=1). In 32-bit mode, it's
a software interrupt (SWI #0xFFEFFF). Either one ought to land the processor
in an ISR and you can recover from there. I haven't actually tried this. :)

--
Wim Lewis <wiml@xxxxxxxx>, Seattle, WA, USA. PGP keyID 27F772C1
.



Relevant Pages

  • Re: Fazing out x86
    ... Are there any RISCs that are as dense, apart from ARM with Thumb? ... memory, which required more instructions. ... Its got lots of tricks for compact loading of specific constants, but loading an arbitrary 32-bit constant takes 16 bytes. ...
    (comp.arch)
  • Re: Difference Between ARM and THUMB
    ... >>The above link tells you the advantages of Thumb over ARM, ... since it has 32-bits to encode in. ... >>Thumb instructions (available on almost all ARM ...
    (comp.sys.arm)
  • Re: Difference Between ARM and THUMB
    ... >>>The above link tells you the advantages of Thumb over ARM, ... >>>Thumb instructions (available on almost all ARM ... operand right after the 32-bit instruction? ...
    (comp.sys.arm)
  • Re: Luminary Micro cut the price of their dev boards from $775 to $249.
    ... Some instructions in Thumb-2 are 32 bit instructions!!!! ... 32 bit thumb instructions if same thing can be achieved by ARM ...
    (comp.sys.arm)
  • Re: Difference Between ARM and THUMB
    ... The above link tells you the advantages of Thumb over ARM, ... - no condition codes on most Thumb instructions (available on almost all ARM ... John Penton, posting as an individual unless specifically indicated ...
    (comp.sys.arm)