User’s Manual
289
B.1.6 Stack Protection
Stack overflow and underflow can now be detected. Low and high stack limits can be set
on 256-byte boundaries. When a stack-relative memory access occurs within 16 bytes of
these limits (or outside of them), a new Priority 3 stack violation interrupt occurs. The 16-
byte buffer exists to allow stack protection even if the stack is placed against a memory
segment boundary.
Figure B-2 shows one possible stack layout. A 2048-byte stack is set up by setting
STKHLR to 0xE0, STKLLR to 0xD8, and SP to 0xDFF0. Any stack-relative memory
accesses above 0xDFEF (i.e., stack underflow) or below 0xD810 (i.e., overflow) would
trigger the stack violation interrupt.
Figure B-2. Simple Stack Protection Layout
Stack access in this
region triggers an
interrupt
Stack access in this
region triggers an
interrupt
Stack access in this
region is allowed
0xE000
0xDFF0
0xDFEF
0xD810
0xD80F
0xD800
TKHLR = 0xE0
TKLLR = 0xD8
Summary of Contents for Rabbit 2000
Page 2: ...Rabbit 3000 Microprocessor User s Manual 019 0108 040731 O ...
Page 9: ...Rabbit 3000 Microprocessor ...
Page 29: ...20 Rabbit 3000 Microprocessor ...
Page 64: ...User s Manual 55 5 PIN ASSIGNMENTS AND FUNCTIONS ...
Page 79: ...70 Rabbit 3000 Microprocessor ...
Page 80: ...User s Manual 71 6 RABBIT INTERNAL I O REGISTERS ...
Page 123: ...114 Rabbit 3000 Microprocessor ...
Page 137: ...128 Rabbit 3000 Microprocessor ...
Page 157: ...148 Rabbit 3000 Microprocessor ...
Page 207: ...198 Rabbit 3000 Microprocessor ...
Page 249: ...240 Rabbit 3000 Microprocessor ...
Page 255: ...246 Rabbit 3000 Microprocessor ...
Page 277: ...268 Rabbit 3000 Microprocessor ...
Page 343: ...334 Rabbit 3000 Microprocessor ...
Page 345: ......