Commit Graph

2 Commits

Author SHA1 Message Date
Peter Mitsis a0d028c836 doc: Fix mem_safe.h doc build warnings
Change-Id: Id649cf7db5755eea9c636a71de9c20e1ae3971ec
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-05 20:24:54 -05:00
Benjamin Walsh 760f191b1e debug: add safe memory access routines
Introduces the following routines to provide safe access to memory:
   _mem_probe()
   _mem_safe_read()
   _mem_safe_write()
   _mem_safe_write_to_text_section()
Those routines will return an error if the memory is not accessible rather
than potentially crash.

This implementation is based on the image's boundaries; thus it allows
read/write access to the data/bss/init sections and read access only to
the text/rodata sections.  All other memory is considered invalid, even
if addressable. This includes the leftover from the RAM at the end of
the image, since there is no support for using it (e.g. there is no
dynamic allocator).

Change-Id: I6093688ecfd9b00d61be0fd453ada7bb8915c897
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:24:42 -05:00