The Agenda flash chip occupies address 0xbf000000 through 0xbfffffff. The PMON range is bfc00000-bfc7ffff. Flash chips are organized into pages of 0x20000 bytes each, each of which can be locked or unlocked.
To do this, you must first access the PMON prompt. Connect a terminal emulator to the agenda serial port, reset the device, and when you see "Press any key to cancel" press any key. You should see the PMON prompt:
To control the flash, you read and write specific data bytes to specific addresses. To lock the flash, you must do this:
The sequence of commands looks like this:
PMON> m -b bfc00000 60 PMON> m -b bfc00000 01 PMON> d -b bfc00000 80 80 80 80 80 .... more... (press `q') PMON> m -b bfc00000 ff
Note that the 0x80 values you read indicate "complete" (bit 7 is zero until the operation is complete, then it's one). They're not actual data stored in the flash. If you redo the -d command after you're done (i.e. after the ff), you'll see the actual data.
You would then repeat that sequence for each block. For example, the next block would be bfc20000, and if your PMON is bigger than 256k, then bfc40000, then finally (384k-512k) bfc60000.
To unlock each block, use the same procedure, but instead of
0x01 (lock), use 0xd0 (unlock).
|webmaster||delorie software privacy|
|Copyright © 2001||Updated Sep 2001|