lib_memoryregion: fix the comments about the memory flags

Follow the elf format, correct the memory region flag description:
Executable 0x1, Writable 0x2, Readable 0x4

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang 2024-09-03 14:15:20 +08:00 committed by Xiang Xiao
parent 143466baed
commit 101b147a24
2 changed files with 6 additions and 6 deletions

View File

@ -4895,5 +4895,5 @@ config BOARD_MEMORY_RANGE
Memory range of board. format: <start>,<end>,<flags>,....
start: start address of memory range
end: end address of memory range
flags: Readable 0x1, writable 0x2, executable 0x4
example:0x1000,0x2000,0x1},{0x2000,0x3000,0x3},{0x3000,0x4000,0x7} ... {0x0,0x0,0x0}
flags: Executable 0x1, Writable 0x2, Readable 0x4
example:{0x1000,0x2000,0x4},{0x2000,0x3000,0x6},{0x3000,0x4000,0x7} ... {0x0,0x0,0x0}

View File

@ -40,11 +40,11 @@
* format - The format string to parse. <start>,<end>,<flags>,...
* start - The start address of the memory region
* end - The end address of the memory region
* flags - Readable 0x1, writable 0x2, executable 0x4
* flags - Executable 0x1, Writable 0x2, Readable 0x4
* region - The memory region to populate
* num - The number of memory regions to parse
*
* example: 0x1000,0x2000,0x1,0x2000,0x3000,0x3,0x3000,0x4000,0x7
* example: 0x1000,0x2000,0x4,0x2000,0x3000,0x6,0x3000,0x4000,0x7
*
****************************************************************************/
@ -106,8 +106,8 @@ ssize_t parse_memory_region(FAR const char *format,
* format - The format string to parse. <start>,<end>,<flags>,...
* start - The start address of the memory region
* end - The end address of the memory region
* flags - Readable 0x1, writable 0x2, executable 0x4
* example: 0x1000,0x2000,0x1,0x2000,0x3000,0x3,0x3000,0x4000,0x7
* flags - Executable 0x1, Writable 0x2, Readable 0x4
* example: 0x1000,0x2000,0x4,0x2000,0x3000,0x6,0x3000,0x4000,0x7
*
* Return:
* The parsed memory region list on success; NULL on failure.