Add support for writing a serial number into the Adesto Security Page #5

Closed
opened 2018-12-19 03:35:54 +00:00 by mithro · 1 comment

#4 (comment)

The Adesto flash has a writeable serial number that they call “Security Page”. We could support writing this page in fomu-flash, however that is separate from supporting Adesto parts.

tinyprog does the following to support the Adesto flash;

        if flash_id[0:2] == [0x9D, 0x60]:
            # ISSI
            self.security_page_bit_offset = 4
            self.security_page_write_cmd = 0x62
            self.security_page_read_cmd = 0x68
            self.security_page_erase_cmd = 0x64
    
        else:
            # Adesto
            self.security_page_bit_offset = 0
            self.security_page_write_cmd = 0x42
            self.security_page_read_cmd = 0x48
            self.security_page_erase_cmd = 0x44
https://git.xobs.io/xobs/fomu-flash/issues/4#issuecomment-23 > The Adesto flash has a writeable serial number that they call “Security Page”. We could support writing this page in fomu-flash, however that is separate from supporting Adesto parts. tinyprog does the following to support the Adesto flash; ```python if flash_id[0:2] == [0x9D, 0x60]: # ISSI self.security_page_bit_offset = 4 self.security_page_write_cmd = 0x62 self.security_page_read_cmd = 0x68 self.security_page_erase_cmd = 0x64 else: # Adesto self.security_page_bit_offset = 0 self.security_page_write_cmd = 0x42 self.security_page_read_cmd = 0x48 self.security_page_erase_cmd = 0x44 ```
Owner

It is now possible to dump and write security registers:

pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -k 0
Security register 0 contents:
00000000 fe 50 31 31 33 34 38 01  7e 0d 01 01 07 ff ad fd  |.P11348.~.......|
00000010 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000020 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000030 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000040 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000050 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000060 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000070 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000080 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
00000090 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000a0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000b0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000c0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000d0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000e0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000f0 ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
pi@raspberrypi:~/fomu-flash $
It is now possible to dump and write security registers: ```sh pi@raspberrypi:~/fomu-flash $ sudo ./fomu-flash -k 0 Security register 0 contents: 00000000 fe 50 31 31 33 34 38 01 7e 0d 01 01 07 ff ad fd |.P11348.~.......| 00000010 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000020 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000030 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000040 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000050 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000060 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000070 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000080 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000090 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000b0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 000000f0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| pi@raspberrypi:~/fomu-flash $ ```
xobs closed this issue 2018-12-19 05:35:46 +00:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xobs/fomu-flash#5
No description provided.