mfill

Name

mfill -- Fill RAM with a specified pattern

Synopsis

mfill {-b location} {-l length} {-p value} {-a mask} [-1 | -2 | -4]

Arguments

NameTypeDescriptionDefault
-b locationMemory addressLocation in memory for start of data.none
-l lengthNumberLength of datanone
-p patternNumberData value to fill with0
-a maskNumberUse location address ANDed with mask as pattern, overrides -p0
-1 Access one byte (8 bits) at a time. Only the least significant 8 bits of the pattern will be used.-4
-2 Access two bytes (16 bits) at a time. Only the least significant 16 bits of the pattern will be used.-4
-4 Access one word (32 bits) at a time.-4

Description

Fills a range of memory with the given pattern.

Examples

Fill a buffer with zeros.

 
RedBoot> x -b 0x100000 -l 0x20
00100000: 00 3E 00 06 00 06 00 06  00 00 00 00 00 00 00 00  |.>..............|
00100010: 00 00 00 78 00 70 00 60  00 60 00 60 00 60 00 60  |...x.p.`.`.`.`.`|
RedBoot> mfill -b 0x100000 -l 0x20
RedBoot> x -b 0x100000 -l 0x20
00100000: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100010: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Fill a buffer with a pattern.

 
RedBoot> mfill -b 0x100000 -l 0x20 -p 0xDEADFACE
RedBoot> x -b 0x100000 -l 0x20
00100000: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|
00100010: CE FA AD DE CE FA AD DE  CE FA AD DE CE FA AD DE  |................|

Fill a buffer with masked address.

 
RedBoot> mfill -b 0x01000000 -l 0x20 -a 0x0FFF -2
RedBoot> x -b 0x01000000 -l 0x20 -2
01000000: 0000 0002 0004 0006  0008 000A 000C 000E
01000010: 0010 0012 0014 0016  0018 001A 001C 001E

2017-02-09
Documentation license for this page: Open Publication License